i have done this
Code:
INSTALLING FREETDS
1-. Download freetds -> www.freetds.org
2-. tar -zxvf freetds-stable-tgz
3-. cd freetds-*
4-. ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld
Note: tdsver=8.0 if you use SQL 2000, tdsver=7.0 if you use SQL 7.0
5-. make
6-. make install
7-. /usr/local/freetds/bin/tsql -S <ip of the server> -U <User SQL>
Note: For default User SQL is sa and the it have not password
For example: /usr/local/freetds/bin/tsql -S 198.168.100.2 -U sa
8-. Add the next text in freetds.conf ( /usr/local/freetds/etc )
[TDS]
host = <ip of the Server with Sql>
port = 1433
tds version = 8.0
Note: If you use SQL 2000 then tds version = 8.0
if you use SQL 7.0 then tds version = 7.0
9-. Add the following line in the file /etc/ld.so.conf and run ldconfig -v:
include /usr/local/freetds/lib
10- Recompile PHP with --with-mssql=/usr/local/freetds flag.
Create a file called all_php4 or all_php5 in:
/var/cpanel/easy/apache/rawopts/
The file doesnt exist by default, just create it and add the line to the file:
--with-mssql=/usr/local/freetds
11- Copy entire folder where you uncompress the Freetds in my case was /root to:
/usr/local/freetds
12- Go to /usr/local/freetds/src/tds/.libs/ and copy libtds.a to /usr/local/freetds/lib
I do that, because when im trying Recompile PHP send me this error:
checking for MSSQL support via FreeTDS... yes
configure: error: Could not find /usr/local/freetds/lib/libtds.a
13- Then go to WHM >> Main >> Software >> Apache Update
Select: Previously Saved Config (** DEFAULT **)
and press
Build Profile Now.
but when building apache it gives this error
Code:
checking for Oracle Database OCI8 support... no
/include/sqlext.h' not found!... configure: error: ODBC header file '/usr
!! './configure --disable-fileinfo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-mbstring --enable-pdo=shared --enable-sockets --enable-zip --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --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-libxml-dir=/opt/xml2/ --with-mssql=/usr/local/freetds --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-png- --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr' failed with exit code '256' !!
!! Restoring original working apache !!
!! Executing '/scripts/initsslhttpd' !!
!! Restarting 'httpd' ... !!
!! 'httpd' restart complete. !!
Building global cache for cpanel...Done
!! Executing '/scripts/initfpsuexec' !!
!! Executing '/scripts/initsslhttpd' !!
!! Executing '/scripts/update_apachectl' !!
Compiling report...
seems something wrong with /var/cpanel/easy/apache/rawopts/all_php5 file
it contains
Code:
--with-unixODBC=/usr
--with-mssql=/usr/local/freetds
something is wrong with path of unixODBC in all_php5 file, as per my knowledge.
thanks