All the PHP developers out here, who use Windows is familiar with WAMP. I the WAMP stack we get a lot of packages like sqlbuddy and phpmyadmin. But a project came to me that uses PostgreSQL. So I had to install PostgreSQL in Wamp. Well it was a tricky job to do. At last I did it. So today in this topic I am going to share this with the developers who need to use PostgreSQL in Windows and Wamp.
In this article I am going to use, Audacity fosshub virus.
Windows Xampp Phpstorm
Wamp环境搭建好后,接下来我们看一下在phpstorm下的调试环境如何配置和搭建 配置php interpreter 找到设置-语言和框架-PHP 在路径找到之间安装wamp时,装好的php.exe和php.ini两个文件路径,设置好后填上去即可。. Under the Xdebug section, change the Debug port to 9001. The last thing I had to do was create a PHP Web Application server in PHPStorm and point it to the localhost location for the site. I also made mappings from where my project files were to where the copied files are located in the WAMP folder. Tags: debug, php, wamp, webstorm. HOW TO CONFIGURE PHPSTORM WITH WAMPHelmanitys Channel seriesBy Helmi DallagiFACEBOOK page https://twitter.com/H. Open php.ini from WAMP System Tray Icon. Once you open the php.ini file navigate to the bottom of the file where usually the XDebug settings are located (or you can search for XDebug and get there.) and there make sure that the XDebug Extention is installed (As you can see in the image bellow, the path to the “zendextension” leads to where the Xdebug extension is installed.) and xdebug.
- WampServer 2.1. Download it from Here.
- PostgreSQL 9.1. Download it from Here.
- phpPgAdmin 5.0.2. Download it from Here.
Phpstorm Wamp
It is assumed that, you have installed the WampServer already. Now, let us proceed with the new Installations.
- First, install the PostgreSQL. It is a simple installation procedure. Just click Next Until, when you come to the screen where you give the installation directory. Make it to your suitable directory. I installed it in “C:wampappsPostgreSQL”. Then provide the Data path according to “C:wampappsPostgreSQL9.1data”.
- Then you will be presented a Password Screen where you can give the main login password. I have made it as “root“.
- Then in the next screen you will be prompted with the Port number. Make sure it does not conflict with the MySQL port 3306. So I used the default as 5432.
- Set the Locale as the Default Locale.
- Now click on Next and it will start the installation.
- Next click on Finish. And we are done with the installations.
- Check installation of PostgreSQL by clicking Start ->Programs ->PostgreSQL 9.1 ->PgAdmin III.
- Click on Server(1) and Right Click on PostgreSQL Database Server 9.1 (localhost:5432) and Select Connect to obtain a connection to server and give password. It will connect to Database server.
- Now it is time to bridge PHP to it. So Go on the task bar and Left Click on the Wamp Tray icon. Navigate to PHP > PHP extension. Then enable,
- php_pgsql
- php_pdo_pgsql extension.
- Restart the Wampserver. This time you will probably see some errors saying like,
- PHP Warning: PHP Startup: Unable to load dynamic library ‘C:wampbinphpphp5.3.5extphp_pdo_pgsql.dll’ – The specified module could not be found.
- PHP Warning: PHP Startup: Unable to load dynamic library ‘C:wampbinphpphp5.3.5extphp_pgsql.dll’ – The specified module could not be found.
- To eleminate them you need to copy libpq.dll from wampbinphpphp5.3.5 to wampbinapacheApache2.2.17bin. Again restart the Wamp Server. By now we are done with the php configuration. Next we will install phpPgAdmin and use it.
- So download phpPgAdmin and copy it in C:wampapps assuming, Wampserver is in C Drive. So the path will be, C:wampappsphpPgAdmin-5.0.2.
- To make a shortcut in Wamp Index page in the Your Aliases section create a file called, phppgadmin.conf in C:wampalias. And copy paste the following,
- Restart the Wamp server and go to http://localhost/. You will see a link came under Your Aliases as phppgadmin. Click on that link and you will see the following screen.
- Then click on the PostgreSQL link on the left hand side. You will be prompted for the username and the password. By default postgrey creates an user called postgres. So give it in the username field and give the password same as you have entered in the time of the installation. For me it is root.
- Last we will see the following screen after successful login.
- Last is is time to test a simple database connection PHP script. So to do that, create a database called test and create a php page with the following code in it.
If it does not show any error, then we are good to go. We can use PostgreSQL.
- If you face any problem then you can write to me. I will try to solve the problem.