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.

FreeTDS Support in PHP 5.3.8

Discussion in 'General Discussion' started by darlanart, Nov 22, 2011.

  1. darlanart

    darlanart Well-Known Member

    Joined:
    Sep 15, 2011
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hello,

    I need make work the support for SQLServer for PHP 5.3.8, in CloudLinux 6.1 64bits.

    The followed the instructions in http://forums.cpanel.net/f5/definitive-freetds-installation-instuctions-88561.html, but during the compilation of EasyApache I have the error:

    In file included from /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:33:
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.h:68: error: redefinition of typedef âLPBYTEâ
    /usr/local/freetds/include/sqlfront.h:35: note: previous declaration of âLPBYTEâ was here
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c: In function âphp_mssql_do_connectâ:
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:767: warning: cast from pointer to integer of different size
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c: In function âphp_mssql_get_column_content_without_typeâ:
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:1120: warning: passing argument 1 of âspprintfâ from incompatible pointer type
    /home/cpeasyapache/src/php-5.3.8/main/spprintf.h:40: note: expected âchar **â but argument is of type âunsigned char **â
    make: *** [ext/mssql/php_mssql.lo] Error 1
    make: *** Waiting for unfinished jobs....


    Anyone out there that could support this work?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello darlanart,

    Was ticket 2019946 also submitted on this issue? Just checking as we have almost exactly the same setup you've noted in a ticket submitted today.

    If a ticket was opened, please ensure to post on the forum thread with the ticket number. Please also post in the ticket that you have an open forum thread with the url link to that thread.

    Next, did you review this post in that thread guide?

    http://forums.cpanel.net/f5/definitive-freetds-installation-instuctions-88561.html#post992772

    You appear to be receiving the same type of error. Try following the instructions noted:

    Thanks!
     
  3. darlanart

    darlanart Well-Known Member

    Joined:
    Sep 15, 2011
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hello Tristan,

    The reply of my ticket was "the EasyApache does not support the FreeTDS"...

    So, I don't understand what I have to do in this file? which the location of it?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Whether the reply to your ticket was EasyApache does not support FreeTDS, we still need to know that a ticket was opened. Mentioning the ticket number to see the results of the discussion in it helps me to help you on the forum in understanding what has already been done or passed along as information. It is vital to mention that ticket number in the thread.

    As for the file, it should be in whatever directory you extracted freetds. For example, on my system, it is at /root/freetds-0.91/include/sqlfront.h location.

    Next, if you open up the file sqlfront.h and search for the only instance of LPBYTE in it, you will see this line:

    Code:
    typedef       BYTE *   LPBYTE;
    The quoted suggestion was to comment it out:

    Code:
    #typedef       BYTE *   LPBYTE;
    If that does not work, I highly suggest posting on the guide thread itself to get assistance from those who have used the guide and might have run into any further errors associated with it. In fact, I would love to merge your thread into the guide thread to ensure all information is kept in that thread for installation issues with FreeTDS.
     
  5. darlanart

    darlanart Well-Known Member

    Joined:
    Sep 15, 2011
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    I made the modifications, and the error persists:

    In file included from /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.h:29,
    from /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:33:
    /usr/local/freetds/include/sqlfront.h:35:2: error: invalid preprocessing directive #typedef
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c: In function âphp_mssql_do_connectâ:
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:767: warning: cast from pointer to integer of different size
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c: In function âphp_mssql_get_column_content_without_typeâ:
    /home/cpeasyapache/src/php-5.3.8/ext/mssql/php_mssql.c:1120: warning: passing argument 1 of âspprintfâ from incompatible pointer type
    /home/cpeasyapache/src/php-5.3.8/main/spprintf.h:40: note: expected âchar **â but argument is of type âunsigned char **â
    make: *** [ext/mssql/php_mssql.lo] Error 1
    make: *** Waiting for unfinished jobs....
    !! 'make -j2' failed with exit code '512' !!
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The one error has disappeared after fixing the file and it is simply the other error remaining. How about we merge this into the guide thread to see if anyone who has read the guide and got it working can help rather than hoping one of those people might on the off chance happen to read this entirely new thread?
     
  7. darlanart

    darlanart Well-Known Member

    Joined:
    Sep 15, 2011
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    The problem was the comment in the file sqlfront.h
    The corret mode is
    /*typedef TYBETE */
     
  8. darlanart

    darlanart Well-Known Member

    Joined:
    Sep 15, 2011
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    My problem my is this:

    You've configured extension pdo_dblib to build statically, but it
    depends on extension pdo, which you've configured to build shared.
    You either need to build pdo_dblib shared or build pdo statically for the
    build to be successful.
    !! './configure --disable-fileinfo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-pdo=shared --enable-safe-mode --enable-sockets --enable-zip --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-bz2 --with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mssql=/usr/local/freetds --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-dblib=/usr/local/freetds --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pgsql=/usr --with-pic --with-png-dir=/usr --with-sqlite=shared --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr' failed with exit code '256' !!

    Some ideia?
     
  9. Veras

    Veras Registered

    Joined:
    Feb 23, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    darlanart

    In
    /var/cpanel/easy/apache/rawopts/all_php5

    where have
    --with-pdo-dblib=/usr/local/freetds

    replace to
    --with-pdo-dblib=shared,/usr/local/freetds

    But in my case, with PHP 5.3.10, despite not give error in easyapache, I'm still getting on my pages:
    Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The dblib driver is not currently installed'

    Can anybody help us?
     
    #9 Veras, Feb 23, 2012
    Last edited: Feb 23, 2012
Loading...

Share This Page