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.

dblib_pdo installation error

Discussion in 'Database Discussions' started by M373H, Apr 18, 2015.

  1. M373H

    M373H Member

    Joined:
    Jan 18, 2015
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm trying to install dblib_pdo on my server but on the last step I always get an error.

    PHP version: 5.4
    Apache 2.4
    CentOS 6.6 64-bit


    Here are the steps I performed:

    - First I installed FreeTDS using the following:
    Code:
    wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
    tar zfvx freetds-stable.tgz
    cd freetds-*; ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --with-gnu-ld; make ; make install
    I then created a symlink using the following:
    Code:
    ln -s /usr/local/freetds/lib/libsybdb.so.5 /usr/lib64/libsybdb.so.5
    Then,
    Code:
    touch /usr/local/freetds/lib/libtds.a
    touch /usr/local/freetds/include/tds.h
    Then rebuilt Apache.

    ========

    Second installing dblib_pdo:
    Code:
    wget http://pecl.php.net/get/PDO_DBLIB-1.0.tgz
    tar -zxvf PDO_DBLIB-1.0.tgz
    cd PDO_DBLIB-1.0
    phpize
    ./configure --with-pdo-dblib=/usr/local/freetds
    Until here, everything looks fine and no errors.
    However, when I lastly run the following command, it outputs error:

    Code:
    make ; make install
    ======

    The error:
    Code:
    /root/PDO_DBLIB-1.0/pdo_dblib.c:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__a                                          ttribute__’ before ‘pdo_dblib_functions’
    /root/PDO_DBLIB-1.0/pdo_dblib.c:62: error: ‘pdo_dblib_functions’ undeclared here                                           (not in a function)
    /root/PDO_DBLIB-1.0/pdo_dblib.c: In function ‘zm_startup_pdo_dblib’:
    /root/PDO_DBLIB-1.0/pdo_dblib.c:196: warning: passing argument 1 of ‘dbmsghandle                                          ’ from incompatible pointer type
    /usr/local/freetds/include/sybdb.h:725: note: expected ‘MHANDLEFUNC’ but argumen                                          t is of type ‘int (*)(struct DBPROCESS *, DBINT,  int,  int,  char *, char *, ch                                          ar *, DBUSMALLINT)’
    make: *** [pdo_dblib.lo] Error 1
    ======

    I'd really appreciate it if anyone can tell how to solve this issue or review commands I used and see if there is anything wrong, or anything that should be added in order to install the dblib_pdo correctly.

    Any answer would be greatly appreciated.

    Thank you in advance :)
     
  2. M373H

    M373H Member

    Joined:
    Jan 18, 2015
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You can close the thread, I solved the problem. Thank you :)
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    dmitrii Registered

    Joined:
    Aug 4, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russia
    cPanel Access Level:
    Root Administrator
    Hello, some days I struggle with this problem , tell me how did you solve it ?
     
  5. 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 :)

    Could you confirm if you are experiencing the exact same error message, or just general trouble installing the module?

    Thank you.
     
  6. stefan.ceparu

    stefan.ceparu Registered

    Joined:
    Jun 16, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Website Owner
    Hello,
    I have the same problem on Centos 7, PHP v5.6

    PDO_DBLIB-1.0/pdo_dblib.c:37:1: error: unknown type name 'function_entry' function_entry pdo_dblib_functions[] .... etc

    Can you please help?
     
  7. stefan.ceparu

    stefan.ceparu Registered

    Joined:
    Jun 16, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Website Owner
    I've found the solution:

    I had to manually edit the pdo_dblib.c file and change function from:

    function_entry pdo_dblib_functions[] = {
    {NULL, NULL, NULL}
    };


    to

    zend_function_entry pdo_dblib_functions[] = {
    {NULL, NULL, NULL}
    };


    I don't know why this isn't fix by now.
     
  8. 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,

    I'm happy to see you were able to address the issue. Thank you for updating this thread with the solution. Note it looks like an older PECL module with no recent updates:

    PECL :: Package :: PDO_DBLIB

    Thank you.
     
Loading...
Similar Threads - dblib_pdo installation error
  1. sunnyzunnie
    Replies:
    4
    Views:
    589

Share This Page