Configure PostgreSQL and phpPgAdmin in WAMP

As i told earlier am trying to switch to Flex , i am trying to learn connection between PHP and Flex. When searched i got a excellent tutorial . But the problem is that it uses PostgreSQL. As i don't have any prior experience in PostgreSQL i try to install it in my Windows 7 and configure it in WAMP . I got different errors and spend almost two days in searching and using different methods . Atlast i got it right. I will try to figure out the steps i have done.
Am using
  1. PostgreSQL 9.1
  2. WAMP Server 2.0e
  3. phpPgAdmin 5.0.2
WAMP consists
1. Apache Version :2.2.17  
2. PHP Version :5.3.5 
3. MySQL Version :5.5.8
First install PostgreSQL , no need to install additional plugins like phpPgAdmin.
Install WAMP server where ever you need.
Download PhpPgAdmin  and unzip it to WWW folder in WAMP installation.

At this point if you try to access the http://localhost/phpPgAdmin/ you may get this error.

Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

This is because you need to enable two extensions.
  1.  php_pgsql
  2. php_pdo_pgsql
After enabling this extensions you may not see installed  extension in phpinfo. if you check the Apache error log you see this error
PHP Warning:  PHP Startup: Unable to load dynamic library 
'D:/wamp/bin/php/php5.3.5/ext/php_pdo_oci.dll' - The specified module 
could not be found.\r\n in Unknown on line 0

 Warning:  PHP Startup: Unable to load dynamic library
 'D:/wamp/bin/php/php5.3.5/ext/php_pdo_oci.dll' - The specified module 
could not be found. in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 
'D:/wamp/bin/php/php5.3.5/ext/php_pdo_pgsql.dll' - The specified module 
could not be found.\r\n in Unknown on line 0
Warning:  PHP Startup: Unable to load dynamic library
 'D:/wamp/bin/php/php5.3.5/ext/php_pdo_pgsql.dll' - The specified module
 could not be found. in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 
'D:/wamp/bin/php/php5.3.5/ext/php_pgsql.dll' - The specified module 
could not be found.\r\n in Unknown on line 0
Warning:  PHP Startup: Unable to load dynamic library
 'D:/wamp/bin/php/php5.3.5/ext/php_pgsql.dll' - The specified module 
could not be found

To correct this error you need to copy libpq.dll from wamp\bin\php\php5.3.5 to  wamp\bin\apache\Apache2.2.17\bin . Then try to enable PHP extension and check apache error log you will not see the error . And pgsql will be shown in Loaded extensions in http://localhost/.

Now try this http://localhost/phpPgAdmin/ and you will see the PostgreSQL server. Select the PostgreSQL and login using the deafult user "postgres" and  the password you given when PostgreSQL installed. You may not able to login. It may say "Login disallowed for security reasons." . You need to set some parameters in \www\phpPgAdmin\conf\
find
$conf['extra_login_security'] = true;
and change
$conf['extra_login_security'] = false;
and find
$conf['owned_only'] = false;
and change it to
$conf['owned_only'] = true;

Now you can login to PostgreSQL  using phpPgAdmin and work on it. You can now create database and work on it. But If you tried to export the database you will get another error

Export error: Failed to execute pg_dump (given path in your conf/config.inc.php : /usr/bin/pg_dump). Please, fix this path in your configuration and relog.

This is because you did not set the path correctly . You need to change two other parameters in config.inc.php
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
change these params to
 $conf['servers'][0]['pg_dump_path'] = 'C:\Program Files\PostgreSQL\9.1\bin\pg_dump.exe';
 $conf['servers'][0]['pg_dumpall_path'] = 'C:\Program Files\PostgreSQL\9.1\bin\pg_dumpall.exe';
check your PostgreSQL installation directory. Now you can export the database.

Hope this post helps to configure PostgreSQL and phpPgAdmin successfully.

Comments

Miro said…
First install PostgreSQL , no need to install additional plugins like phpPgAdmin.
Install WAMP server where ever you need.
Download and unzip it to WWW folder in WAMP installation.

in this section - what did you mean download and unzip "IT"?
logicmania said…
Am sorry it's my fault. IT means PhpPgAdmin
Ashish Kulkarni said…
Very useful, thanks
varshini devi said…
Great blog..You have clearly explained how to install PHP ..Step by step explanation is too good to understand..Its very useful for me to understand..Keep on sharing..
Regards,
PHP Training in Chennai|PHP Course in Chennai
caroline jesi said…
Hello Admin,
Awesome Post! I like writing style, how you describing the topics throughout the post. I hope many web reader will keep reading your post at the end, Thanks for sharing your view.
Regards,
web design training chennai|Best web designing institute in chennai
Melisa said…
Thanks for your informative guide on SQL technology. As we all know, SQL is most used database tool and your article offer clear insight about the technology. Your blog is recommended for freshers and experienced ones looking for ideal blog to learn SQL technology.
Regards,
JAVA Training in Chennai|JAVA J2EE Training in Chennai|java courses
Sri Nithya said…
Excellent blog post. Thanks for sharing this. Learning a new technology is useful to achieve the hard part of the career. Keep posting stuff like this.
Java Training in chennai | Java course in chennai | J2EE Training in Chennai
Nikshitha S said…
PHP provides the best option to build the website where we can design our website in a very interactive manner that provides better functioning in data management.
PHP Training in Chennai | PHP course in Chennai
geethu said…

The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The python programming language is very popular and most widely used.
Python Training in Chennai | Python Course in Chennai
Evelin Harriet said…
I have read your blog its very Interesting. Thanks for sharing. Call for low cost ERP software. ERP Software Providers in Chennai | ERP Software Solutions in Chennai
Really Nice Blog. Thank you for Sharing. We are the best erp software providers in chennai. For more details call +91 9677025199 or email us on info@bravetechnologies.in.
ERP in Chennai
sivanesan said…
The best thing is that your blog really informative thanks for your great information!
erp software in chennai
Good post..Keep Sharing.! I'm working in brave technologies private limited. We are the leading ERP software development company in chennai.
Mehgna Sharma said…
Nice post Thanks for the Sharing this information Big Data Hadoop Training | PHP Training in Noida
Priya Kannan said…
Such a great articles in my carrier, It's wonderful commands like easiest understand words of knowledge in information's. PHP Training in Chennai
sunitha vishnu said…
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai
isabella jacob said…
it is really amazing...thanks for sharing....provide more useful information...
Mobile app development company
My Task said…
Good post! Thanks for sharing this information. I appreciate it. It is very beneficial for visitors. GST Accounting Software
Sas Training Institute in Noida-Webtrackker is the best sas training institute in noida. SAS has taken the lead role for a long time, where most companies have standard software. While you have this certification under your belt, give big rewards to the IT industry, it can also serve as an important payer on the business side of the economy. SAS can read data files created by other statistical packages. Therefore, for experienced users of these statistical packages, SAS does not threaten to create data files created by these packages in a SAS file format.
Sap Training Institute in Noida
PHP Training Institute in Noida
Hadoop Training Institute in Noida
Oracle Training Institute in Noida
Linux Training Institute in Noida
Dot net Training Institute in Noida
Salesforce training institute in noida
Java training institute in noida
Luckperson said…
Your step by step explanation is good to understand easily. Thanks for sharing this useful information with us. Great effort.
PHP training institute in Chennai | PHP training course
ALINAAMEL said…
I would like to say thank you for the amazing details and concepts you are sharing in this.
Webseiten Gestaltung L├╝denscheid
devo said…
Wonderful post. Thank you for updating such a informative post...MBA Project Center in Chennai | MBA Project Center in Velachery

Popular posts from this blog

Angular4 - primeng, ngx-bootstrap

MEAN js Application structure

Change Android AVD location in Windows7

Angular 4 - Modules, components and routing