Page 1 of 1

Apache crash when pgsql ext is enabled in php.ini [SOLVED]

PostPosted: 10. October 2011 17:16
by mgcrit
Hello

I'm using XAMPP 1.7.7 on Windows 7 Enterprise 64-bit (Version 6.1 (Build 7601: Service Pack 1)).
I'm directly editing the php.ini found on c:\xampp\php\php.ini and restarting apache using the Services snap-in of the Microsoft Management Console so the Control Panel version used is irrelevant.
Whenever I enable a PostgreSQL extension (both php_pgsql.dll and php_pdo_pgsql.dll were tested separately with identical results), apache crashes when starting without printing any useful information to error.log.
Can anybody confirm this behavior and eventually point to a solution?

Thanks

Re: Apache crashes when pgsql extension is enabled in php.in

PostPosted: 10. October 2011 17:37
by mgcrit
Solved! The php postgresql extensions depend on the native libraries. Copying the libpq.dll to the C:\xampp\php\ext\ solved the problem. However I would prefer a cleaner solution not involving messing around with the installation directories apart from changing the configuration files. Any ideias?

Re: Apache crashes when pgsql extension is enabled in php.in

PostPosted: 10. October 2011 17:42
by mgcrit
Ooops, with the hurry I hadn't removed the comment on the php.ini. The problem still persists... :(

Re: Apache crashes when pgsql extension is enabled in php.in

PostPosted: 10. October 2011 19:00
by JonB
Actually, using that Control Panel 3 beta revealed this error:

httpd.exe
this application has failed to start because LIBPQ.dll was not found. Re-installing the application may fix this problem.


http://postgresql.1045698.n5.nabble.com ... 29898.html

http://www.postgresql.org/docs/8.1/stat ... win32.html

Good Luck
8)

Re: Apache crashes when pgsql extension is enabled in php.in

PostPosted: 10. October 2011 19:07
by hackattack142
You could try copying the libpq.dll from "xampp/php" to the "xampp/apache/bin" directory. Adding required DLLs to this directory has fixed similar problems with other extensions.

Re: Apache crashes when pgsql extension is enabled in php.in

PostPosted: 11. October 2011 09:33
by mgcrit
Thanks. Copying the libpq.dll from "xampp/php" to the "xampp/apache/bin" directory solved the issue!

Re: [SOLVED] Apache crash when pgsql ext is enabled in php.i

PostPosted: 11. October 2011 09:39
by Sharley
Thanks for the feedback. 8)

Good luck. :)