The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to install pdo_pgsql

Discussion in 'EasyApache' started by Damian Georgiou, Jun 30, 2016.

Tags:
  1. Damian Georgiou

    Damian Georgiou Registered

    Joined:
    Jun 30, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    I have tried installing pdo_pgsql a number of ways but without success.

    1. Easyapache 3 doesn't have it available in the exhaustive custom list (PHP 5.5.37)
      only pdo sqlite and mysql is available

    2. Software -> Module Installers -> PHP PECL fails to install (see below)
    Code:
    [running: make[/I]
    [I]/bin/sh /root/tmp/pear/pear-build-root3VcYqR/PDO_PGSQL-1.0.2/libtool --mode=compile cc -I  -I. -I/root/tmp/pear/PDO_PGSQL -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-root3VcYqR/PDO_PGSQL-1.0.2/include -I/root/tmp/pear/pear-build-root3VcYqR/PDO_PGSQL-1.0.2/main -I/root/tmp/pear/PDO_PGSQL -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/PDO_PGSQL/pdo_pgsql.c -o pdo_pgsql.lo[/I]
    [I]mkdir .libs[/I]
    [I] cc -I -I. -I/root/tmp/pear/PDO_PGSQL -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-root3VcYqR/PDO_PGSQL-1.0.2/include -I/root/tmp/pear/pear-build-root3VcYqR/PDO_PGSQL-1.0.2/main -I/root/tmp/pear/PDO_PGSQL -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/PDO_PGSQL/pdo_pgsql.c  -fPIC -DPIC -o .libs/pdo_pgsql.o[/I]
    [I]/root/tmp/pear/PDO_PGSQL/pdo_pgsql.c:22:20: error: config.h: No such file or directory[/I]
    [I]make: *** [pdo_pgsql.lo] Error 1[/I]
    [I]ERROR: `make' failed[/I]
    [I]The pdo_pgsql.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20121212
    
    
    Any thoughts?
     
    #1 Damian Georgiou, Jun 30, 2016
    Last edited by a moderator: Jun 30, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if PostgreSQL is already installed on your system? You can follow the instructions on the Install or Update PostgreSQL document if you have not yet completed this step.

    Thanks!
     
  3. Damian Georgiou

    Damian Georgiou Registered

    Joined:
    Jun 30, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Yes postgreSQL is installed on the system and has been in operation for the last 3 years using php pg_connect. Unfortunately a new app to be installed requires PDO.

    Code:
    PostgreSQL 8.4.20 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Here's an unsupported guide on installing the module with EasyApache 3. Keep in mind the PostgreSQL driver for PDO was last released in 2006 and it's generally a better idea to consult with the developer of the script you are using to see the available alternatives.

    Code:
    cd /root/
    wget http://pecl.php.net/get/PDO_PGSQL-1.0.2.tgz
    tar -xzf PDO_PGSQL-1.0.2.tgz
    cd PDO_PGSQL-1.0.2/
    phpize
    ./configure
    make && make install
    Next, edit your php.ini file and add the following entry before saving and restarting Apache:

    Code:
    extension=pdo_pgsql.so
    Thank you.
     
  5. Damian Georgiou

    Damian Georgiou Registered

    Joined:
    Jun 30, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    that did the trick. Thankyou good sir !
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page