How to recompile the PHP with --with-pgsql

2

I have installed the postgresql, php and apache to Amazon Linux AMI. Now I want to use the phpPgAdmin, it prompts "Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option."! How can I recompile it for Amazon Linux AMI? Please suggest. Thanks.

wing suet cheung

Posted 2013-06-14T05:59:39.327

Reputation:

Are you sure there's not a some php + postgresql package available for that platform, rather than compiling everything from scratch? – None – 2013-06-14T06:57:35.197

Answers

5

If your OS is RPM based (Fedora/CentOS) and you installed PHP from RPM, execute the following command:

yum install php-pgsql

If your OS is Debian based (Ubuntu/Debian), execute the following command:

apt-get install php5-pgsql

Do not forget to restart your Apache service for the changes to take effect.

RoseHosting

Posted 2013-06-14T05:59:39.327

Reputation: 2 091