I have just installed the postgreSQL on windows 7. I am trying to integrate postgreSQL with WAMP server.
For this i have done the following changes in httpd.conf and php.ini file
1 LoadModule c:/path
to libpq.dll
in httpd.conf
and then
2 extension=php_mod_pgsql.dll
, extension=php_pgsql.dll
-- enable(reemove ;) in php.ini
If I do the above changes the localhost does not work.
If I do the second changes the localhost work but does not load the libpq.dll
.
I checked the pgsql by php script by this
<?php
echo extension_loaded('pgsql') ? 'yes':'no';
?>
The script shows "yes", but apache is not loading the libpq.dll
.
Now what i should do for load the postgreSQL into the Apache2.2* (wamp)
Thank you. These instructions worked once I also added
'Require local' to the phppgadmin.conf file:
Alias /phppgadmin "C:/wamp/apps/phpPgAdmin-5.1/"
<Directory "C:/wamp/apps/phpPgAdmin-5.1/">
Require local
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
it worked thank you
Alias /phppgadmin "C:/wamp/apps/phpPgAdmin-5.1/"
<Directory "C:/wamp/apps/phpPgAdmin-5.1/">
Require local
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
Probably the best place to start is with the msdn docs. It looks like the simplest fix is to set the %PATH%
environment variable system-wide to include the path to libpq.dll.
Note that %PATH
is searched last, so if a libpq is ever put into the system directory or the Apache directory it will be caught first.
Don't forget that WAMP has two php.ini
files. One in Apache directory, one in php directory (bin\php\php5.X.X
). Wampserver Tray manages the one in Apache directory.
To be able to run php cli tools (e.g php artisan
), you need to uncomment the php_pgsql
and php_pdo_pgsql
in the php.ini
in php directory.