chris.ecs Posted February 15, 2009 Share Posted February 15, 2009 Hi Guys, I am having trouble getting a new install to run on Win32. We are using Apache/PHP/Postgres as the backend successfully, but it is sharing the server with a number of other apps, so we have decided to give it its own box. I have downloaded the latest versions of the 3 main apps and after wrestling with the installs, I have got the 3 of them running OK. But my problem now is that PHP is not seeing the Postgres at all. I spent a few hours on this last week, and have done a lot of googling etc. and have checked everything I can think of, but still no go. Troubleshooting so far: The 3 main apps are installed on the D drive, in the root as follows: Apache = D:\Apache2.2\ PHP = D:\PHP5\ Postgres = D:\PostgreSQL\8.3\ -Checked php.ini for correct entries - OK. Attached as php.ini.txt -Checked system path - looks fine as follows - D:\PHP5\:\PHP5\ext\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem -Checked phpinfo - no Postgres support found - output attached as phpinfo.txt The phpinfo says it is looking for the php.ini in C:\Windows even though the httpd.conf (attached) is pointing to the D drive, but it also says it is loading it from the D:\PHP5 folder. But it still doesn't work. I have checked the location of the dll, and it is correctly located in the \ext folder. But the Apache error log says it can't be found - See below for log of Apache restart ******** Start of Log ************* [Fri Feb 13 14:55:53 2009] [notice] Parent: Received restart signal -- Restarting the server. [Fri Feb 13 14:55:53 2009] [notice] Child 1320: Exit event signaled. Child process is ending. PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP5\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Fri Feb 13 14:55:53 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.8 configured -- resuming normal operations [Fri Feb 13 14:55:53 2009] [notice] Server built: Dec 10 2008 00:10:06 [Fri Feb 13 14:55:53 2009] [notice] Parent: Created child process 3220 PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\PHP5\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Fri Feb 13 14:55:53 2009] [notice] Child 3220: Child process is running [Fri Feb 13 14:55:54 2009] [notice] Child 3220: Acquired the start mutex. [Fri Feb 13 14:55:54 2009] [notice] Child 3220: Starting 64 worker threads. [Fri Feb 13 14:55:54 2009] [notice] Child 1320: Released the start mutex [Fri Feb 13 14:55:55 2009] [notice] Child 1320: All worker threads have exited. [Fri Feb 13 14:55:55 2009] [notice] Child 3220: Starting thread to listen on port 80. [Fri Feb 13 14:55:55 2009] [notice] Child 1320: Child process is exiting ********** End of Log ********** All the permissions are fine on all of the relevant folders. Apache is running under a dedicated service account with admin rights on the server. The things that I don't get are: The httpd.conf points to the right location for the php.ini, yet the phpinfo still says it is looking somewhere else for it, and the php.ini (that Apache finds in the PHP5 folder) correctly tries to load the postgres support, yet the Apache startup says the module could not be found, even though the file is in the directory where the conf file says it is. Any ideas? Assistance greatly appreciated! [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
JonEBee Posted May 4, 2009 Share Posted May 4, 2009 Chris: Any response on this? I see the same PHP Startup error message in my installation (with MySQL) and need to resolve this. Thanks. Jon Quote Link to comment Share on other sites More sharing options...
headhair Posted June 5, 2009 Share Posted June 5, 2009 This is small problem.. 1. Open php.ini at D:\PHP5\ folder 2. Look for the word extension=php_pgsql.dll 3. Put a ; in front of that line..(ie) before change extension=php_pgsql.dll after change ;extension=php_pgsql.dll save the file. restrart apache server now it will not give you any error messages. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 5, 2009 Share Posted June 5, 2009 When checking phpinfo() to see what php.ini PHP is reading you only need to focus on the line labelled as Loaded Configuration File. Ignore the line above it. Also php_pgsql.dll requires an external library called libpq.dll. This file should be located in D:/PHP5. If PHP cannot find this library it will say it cant find php_pgsql.dll Make sure when you make any changes to the php.ini that you restart Apache in order for the changes to take affect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.