0

I've installed postgreSQL under Ubuntu, with nginx server but I can't make it work with php (php cgi). The error I'm getting is:

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

I've installed the extension apt-get install php5-pgsql and I checked it exists under /usr/lib/php5/20090626.

I added the line in php.ini extension=pgsql.so and also with full path. I restarted PHP.

What else should I try?

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
Alexandru R
  • 8,560
  • 16
  • 64
  • 98
  • 1
    Just a little question back: Why do you think that adding `extension=pgsql.ini` in your php.ini would enable that extension? – hakre Sep 03 '13 at 07:52
  • 1
    possible duplicate of [How do I enable php to work with postgresql?](http://stackoverflow.com/questions/10640821/how-do-i-enable-php-to-work-with-postgresql) – GordonM Sep 03 '13 at 07:54
  • @gordonM I checked that question, it doesn't solve the issue – Alexandru R Sep 03 '13 at 07:56
  • @hakre because I did that with the mongoDB driver (and it worked), and that's how you load extensions in php – Alexandru R Sep 03 '13 at 07:56
  • I hardly doubt that adding `extension=pgsql.ini` did load mongoDB. You perhaps should check what exactly you've entered there to enable it last time, copy and paste both, but then next or under each other (or meld them) and compare closely. You computer only does what you configure it for. And as it's ubuntu, it tends to be a little more complicated than normal linux, however it is still pretty straight forward. – hakre Sep 03 '13 at 07:59
  • @hakre sorry, it was pgsql.so and mongo.so. I typed wrong. – Alexandru R Sep 03 '13 at 08:01
  • The configuration is correct, what might happen is that the php-cgi daemons do not restart properly thus the new extension is not loaded. – alexandru.topliceanu Sep 05 '13 at 09:01

0 Answers0