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.

Install PGSQL driver for PHP PDO under cPanel/WHM

Discussion in 'General Discussion' started by batfastad, Aug 24, 2012.

  1. batfastad

    batfastad Member

    Joined:
    Jun 13, 2012
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi everyone

    What's the best way to install the PDO PostgreSQL driver under cPanel?

    A quick googling turned up this... http://forums.cpanel.net/f34/php-5-pdo-support-144089.html#post625749

    When using PHP PECL Module Installer under WHM I can search and find the PDO_PGSQL package but I get the following message when trying to install PDO_PGSQL...
    Code:
    WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
    downloading PDO_PGSQL-1.0.2.tgz ...
    Starting to download PDO_PGSQL-1.0.2.tgz (14,961 bytes)
    .....done: 14,961 bytes
    Could not get contents of package "/root/tmp/pear/cache/PDO_PGSQL-1.0.2.tgz". Invalid tgz file.
    Download of "pecl/PDO_PGSQL" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/PDO_PGSQL"
    downloading PDO-1.0.3.tgz ...
    Starting to download PDO-1.0.3.tgz (52,613 bytes)
    ...done: 52,613 bytes
    Could not get contents of package "/root/tmp/pear/cache/PDO-1.0.3.tgz". Invalid tgz file.
    Download of "pecl/PDO" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/PDO"
    Download failed
    install failed
    The PDO_PGSQL.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    Tidying /usr/local/lib/php.ini...
    No changes
    Tidying /usr/local/cpanel/3rdparty/etc/php.ini...
    No changes
    Anyone know the current recommended way to do this?
    Since my cPanel can provide the PostgreSQL database it makes sense for me to also have that PDO driver installed.

    If the best way is through SSH then that's fine, I just wanted to check.

    Cheers, B
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please confirm if you encounter the same problem when installing this PECL module via the command line:

    Code:
    # pecl install pdo_pgsql
    If you do, please feel free to submit a support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number here so we can track the issue.

    Thank you.
     
  3. batfastad

    batfastad Member

    Joined:
    Jun 13, 2012
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yep still having a problem when running that under 'su'
    Code:
    WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
    downloading PDO_PGSQL-1.0.2.tgz ...
    Starting to download PDO_PGSQL-1.0.2.tgz (14,961 bytes)
    .....done: 14,961 bytes
    Could not get contents of package "/root/tmp/pear/cache/PDO_PGSQL-1.0.2.tgz". Invalid tgz file.
    Download of "pecl/pdo_pgsql" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/PDO_PGSQL"
    downloading PDO-1.0.3.tgz ...
    Starting to download PDO-1.0.3.tgz (52,613 bytes)
    ...done: 52,613 bytes
    Could not get contents of package "/root/tmp/pear/cache/PDO-1.0.3.tgz". Invalid tgz file.
    Download of "pecl/PDO" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/PDO"
    Download failed
    install failed
    I don't have a support contract or anything with cPanel directly.
    Should I contact my hosting provider for support instead?

    Cheers, B
     
  4. arvin_webzias

    arvin_webzias Registered

    Joined:
    Aug 29, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Neyattinkara, Kerala, India, India
    cPanel Access Level:
    Root Administrator
    Hello,

    The problem is caused by differences in the way PHP 5.2.x parses code, and can be fixed by manually patching the listContent function in PEAR’s Archive_Tar package.

    The fix is to track down the /usr/local/lib/php/Archive/Tar.php and/or /usr/lib/php/Archive/Tar.php files and change the following removing the line marked ‘-’ and adding the lines marked ‘+’…

    ===============================
    function listContent()
    {
    $v_list_detail = array();

    if ($this->_openRead()) {
    + $r = $this->_extractList('', $v_list_detail, "list", '', '');
    + if (!$r) {
    - if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
    unset($v_list_detail);
    $v_list_detail = 0;
    }
    $this->_close();
    }

    return $v_list_detail;
    }
    ===============================

    If this couldn't help you try updating pecl. I had this same issue and it got fixed by updating my pecl.

    Regards
     
Loading...

Share This Page