How to recompile the PHP with --with-pgsql

6,541

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.

Share:
6,541

Related videos on Youtube

fixer1234
Author by

fixer1234

Updated on September 18, 2022

Comments

  • fixer1234
    fixer1234 over 1 year

    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.

    • Admin
      Admin almost 11 years
      Are you sure there's not a some php + postgresql package available for that platform, rather than compiling everything from scratch?