Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    cPanel Staff cPanelDavidL's Avatar
    Join Date
    Nov 2007
    Posts
    17

    Default Definitive FreeTDS installation instuctions

    1) Download FreeTDS
    Code:
    wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
    2) Extract

    Code:
    tar zfvx freetds-stable.tgz
    3) Configure $ Make

    Code:
    cd freetds-*;
    ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld; make ; make install
    4) Edit /var/cpanel/easy/apache/rawopts/all_php5

    In this version, PHP 5 is the focus hence that specific file.

    add the following:

    Code:
    --with-mssql=/usr/local/freetds
    *If you are using other Builds of Apache or PHP you may refer to the following for the correct file to edit
    instead of /var/cpanel/easy/apache/rawopts/all_php5 such as the case here.

    * Apache 1.3.x - /var/cpanel/easy/apache/rawopts/Apache1
    * Apache 2.0.x - /var/cpanel/easy/apache/rawopts/Apache2
    * Apache 2.2.x - /var/cpanel/easy/apache/rawopts/Apache2_2
    * All PHP 4.x versions - /var/cpanel/easy/apache/rawopts/all_php4
    * All PHP 5.x versions - /var/cpanel/easy/apache/rawopts/all_php5
    * Mod_suPHP - /var/cpanel/easy/apache/rawopts/all_suphp
    * Specific PHP Version - /var/cpanel/easy/apache/rawopts/PHP-X.X.X


    5) Touch the following files as these are what are checked for by PHP. The following error will result if they are not in place.

    configure: error: Directory /usr/local/freetds is not a FreeTDS installation directory

    Here are the files to create for PHP's conditional check:
    Code:
    touch /usr/local/freetds/lib/libtds.a
    touch /usr/local/freetds/include/tds.hp
    6) Now run Easy Apache and make sure that Mysql, Mysql of the system, amd Mysqli are all selected.

    7) Simply build.

    Code:
    /scripts/easyapache
    I want to restate that at this time we do not support FreeTDS but we know many of you implement it's use. The main issue is with PHP not recognizing the build changes that FreeTDS developers have put in place. PHP's onditionals are still looking for 2 files that no longer exist in recent builds of FreeTDS hence PHP will always fail unless the files instructed to be `touched` here are in place.

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default Typo

    In step 5 it should say

    touch /usr/local/freetds/include/tds.h

  3. #3
    Member
    Join Date
    Nov 2006
    Posts
    337

    Default

    There is no files nor directories inside
    /var/cpanel/easy/apache/rawopts

    Please explain what to do.

    I'm using PHP 5 / Apache 2.2

    Do I simply do a "touch" on those to create the files?

    Also, how can I determine freetds was properly compiled?
    Last edited by Zion Ahead; 03-20-2009 at 04:53 PM.

  4. #4
    Member
    Join Date
    Dec 2007
    Posts
    30

    Default

    Yes, touch the file in question, then edit it to populate it's content.

  5. #5
    Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    168
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Doesn't seem to be working for x64 systems , wish the post owner would make instructions for x64 aswell thanks !

  6. #6
    Member usercpanel's Avatar
    Join Date
    Aug 2007
    Posts
    15

    Default Definitive FreeTDS installation instuctions and install MSSQL module

    - If running a 64bit OS and get an error about

    configure: error: Could not find /usr/local/freetds/lib64/libsybdb.a|so
    you'll need to link a directory.

    In this example it was an easy fix.

    #cd /usr/local/freetds/
    #ln -s /usr/local/freetds/lib lib64
    #ll /usr/local/freetds/lib64/libsybdb.a
    #ll /usr/local/freetds/lib64/libsybdb.so
    #/scripts/easyapache


  7. #7
    Registered User
    Join Date
    Jul 2011
    Posts
    2

    Default Re: Definitive FreeTDS installation instuctions

    I'm on PHP 5.3.5 on WHM 11.30.1 (build 4) CENTOS 5.6 x86_64 standard. I need to use PDO so I've also added

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

    No matter what I do, I keep getting the configure error:

    configure: error: Directory /usr/local/freetds is not a FreeTDS installation directory

    I've touched the indicated files and symlinked the lib folder but it simply isn't working. Has something changed recently to cause this to stop working? Are there additional files that PHP is looking for now? Please help, I'm tearing my hair out!

    I was able to get php to compile with just the line referencing mssql in the all_php5. It was after I added the line for pdo-dblib that I get the configure error. Seems like there may be some other files that this option is expecting to be in place. I see reference to include/sybdb.h in the config.m4 file of pdo_dblib but that that file does exist where expected as well as libsybdb.a being in the lib folder.
    Last edited by ponchorage; 07-20-2011 at 01:30 PM. Reason: Give more information.

  8. #8
    Member minosjl's Avatar
    Join Date
    Jun 2011
    Location
    India
    Posts
    112

    Default Re: Definitive FreeTDS installation instuctions

    In order to enable PHP MSSQL Extension, There are few modules need to be installed before you enable MSSQL Extension for PHP on server.

    a) Txt2man
    b) unixODBC
    c) freeTDS
    d) PHP mssql.so

    Please check on your server have these modules installed on the server.

  9. #9
    Member
    Join Date
    Oct 2011
    Location
    Venezuela
    Posts
    7
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Definitive FreeTDS installation instuctions

    Good morning.

    Well as the title of the message says.

    I need to install the mssql support and my vps.

    I've done this

    Definitive FreeTDS installation instuctions

    but I can not go from step 4

    since in this path / var / cpanel / easy / apache / rawopts / (nofiles) ..


    pending any solution or help.

    Greetings.

  10. #10
    Registered User
    Join Date
    Nov 2011
    Location
    Houston, Texas, United States
    Posts
    1
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default Re: Definitive FreeTDS installation instuctions

    I just wanted to update this due to the brilliance of a colleague at our office here. We had a customer come in needing Freetds to be installed - while we weren't familiar with it, we followed these instructions but still ran into problems on the EasyApache compile. There was a simple solution fortunately, and in fact I'll simply copy and paste the chat conversation.

    Jason *****: what was happening was that two header files were defining LPBYTE
    Jason *****: you can't retype a variable like that
    Jason *****: so it errors out
    Jason *****: I commented out the LPBYTE in the sqlfront.h since its already defined by PHP
    Ryan *****: so essentially it's become a cpanel-compatible version of freetds? could probably post that in the forum
    Jason *****: prolly
    Jason *****: but my philosphy has always been if you can't puzzle it out from the object dump you shouldn't be running it

    So I figured I'd pass this info along in the event that it may help anyone out.

  11. #11
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2003
    Location
    .pt
    Posts
    142

    Default Re: Definitive FreeTDS installation instuctions

    Hi there,

    i have freetds installed and working, but i cannot connect to the server because of TDS Version. I used the instructions provided on the inital post. Installed this on one server, and one vps. On server the TDS version is 8, and on the vps the TDS version is 5. But, both servers are equal configs.

    How can i update the TDS Version to 8?

  12. #12
    Member
    Join Date
    Sep 2011
    Posts
    12
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Definitive FreeTDS installation instuctions

    i have followed same as on 1st post, but still giving error :

    Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /home/frendzho/public_html/xyz.co.cc/mssql.php on line 5

    Warning: odbc_exec() expects parameter 1 to be resource, boolean given in /home/frendzho/public_html/xyz.co.cc/mssql.php on line 10
    Error in SQL

    i have centOS

Similar Threads & Tags
Similar threads

  1. WebMail Logout Should be Definitive
    By webr00t in forum E-mail Discussions
    Replies: 9
    Last Post: 01-21-2010, 04:18 AM
  2. Custom php install with freetds
    By totaltec in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-06-2005, 11:37 AM
  3. freetds for php build
    By wolfgang in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-06-2005, 05:41 AM
  4. SSL - A definitive answer
    By DuxAranea in forum cPanel and WHM Discussions
    Replies: 18
    Last Post: 06-29-2004, 01:21 AM
  5. freetds.org
    By jdawes in forum cPanel Developers
    Replies: 0
    Last Post: 08-31-2003, 08:13 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube