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?

7
  • 1
    Just a little question back: Why do you think that adding extension=pgsql.ini in your php.ini would enable that extension? Commented Sep 3, 2013 at 7:52
  • 1
    possible duplicate of How do I enable php to work with postgresql? Commented Sep 3, 2013 at 7:54
  • @gordonM I checked that question, it doesn't solve the issue Commented Sep 3, 2013 at 7:56
  • @hakre because I did that with the mongoDB driver (and it worked), and that's how you load extensions in php Commented Sep 3, 2013 at 7: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. Commented Sep 3, 2013 at 7:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.