--------
a) unixODBC
b) freeTDS
c) PHP mssql.so
---------
Setup 1: Install unixODBC package :
----------------
# wget http://www.unixodbc.org/unixODBC-2.2.14-p2.tar.gz //You can download latest tar file
# tar -xvzf unixODBC-2.2.12.tar.gz
# cd unixODBC-2.2.12
# ./configure -prefix=/usr/local -enable-gui=no
# make
# make install
----------------
Step 2: Install freeTDS package :
---------------
#wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
# tar -xvzf freetds-stable.tgz
# cd freetds-0.82
# ./configure -with-tdsver=8.0 -with-unixODBC=/usr/local
# make
# make install
---------------
Step 3: Configuration freeTDS : -
---------------
#cd freetds-0.82
# vi freetds.conf file and add the entry for the MS SQL server.
Quote:
[MSHOSTNAME]
host = MSHOSTNAME //hostname or IP address of mssql server
port = 1433 //port of the mssql server, default 1433
tds version = 8.0
----------------
Step 4: Getting the mssql.so file :
-----------------
In Cpanel servers the extensions are located in
# cd /home/cpeasyapache/src/php-5.2.9/ext/mssql/
# phpize
# ./configure
# make
# make install
-----------------
This commands will automatically create a copy of mssql.so in the installed extension in the following folder.
-----------------
/usr/local/lib/php/extensions/no-debug-non-zts-20060613
-----------------
Now do the following :
php -i |grep php.ini //to find out global php.ini on the server.
# echo "extension=mssql.so" >> /usr/local/lib/php.ini
Step 6: Restarting Apache Server!
# /etc/init.d/httpd restart
-----------------
By : webhostingtalk.com
Labels :
Sever Linux

Previous Article


Responses
0 Respones to "How to install mssql php extension on linux or cpanel server?"
Post a Comment
»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment