Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm trying to use postgres with PHP, but Apache can't load the extension.

I'm using:

Windows 7 (64bit) with xampp, and I have php version 5.4.7 I already set up postgres, and other applications can access the databases.

When I uncomment the following lines in my php.ini

extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll

I get some errors in the php-error-log:

[22-Jun-2013 13:15:22 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pdo_pgsql.dll' - Das angegebene Modul wurde nicht gefunden. in Unknown on line 0

But the path is correct, and the files are there.

After some research, I added this line to my http.conf:

LoadFile "C:/Program Files/PostgreSQL/9.2/bin/libpq.dll"

But whereever I put this line, the apache-service isn't able to start anymore. So I removed the line.

I also tried to add these 2 paths to my PATH-Variable:

C:\Program Files\PostgreSQL\9.2\bin
C:\xampp\php\ext

Now the error changed to

in Unknown on line 0

Everything is running on the same, local machine. And using Linux / seperate servers is not an alternative.

My phpinfo() doesn't show any postgres-related things.

I hope someone knows how to solve the problem, Google didn't help me at all.

share|improve this question
permission problem? – Denis 10 mins ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.