Installing MS SQL Module to PHP on DirectAdmin [cite]

If you need to connect to an MS Sql Server remotely from your DirectAdmin server via php, you need to rebuild PHP with necessary components.

Get the latest stable release of FreeTDS and install it.

#cd /root
#wget ftp://ftp.astron.com/pub/freetds/current/freetds-current.tg
#tar -xvzf freetds-current.tgz
#cd freetds-dev.0.92.377
#./configure --prefix=/usr/local/freetds
#make
#make install


Now we should tell Direct Admin’s custom build that we want the MS Sql libraries installed using freetds.Edit the file :/usr/local/directadmin/custombuild/configure/ap2/configure.php5

add
–with-mssql=/usr/local/freetds \
to anywhere in the file. If you’re adding it the to end of the file, don’t add the \ at the end, instead add to the end of the line “before” the last line.

Now go to custombuild and build the new PHP.

#cd /usr/local/directadmin/custombuild
#./build clean
#./build update n

Check if MS Sql is intalled.

#php -m|grep mssql
#mssql
  • 9636 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Compile and build Apache + MySQL + PHP from the source [cite]

This is a complete working solution to build Apache (httpd-2.2.25), MySQL (MySQL-5.6.14) and PHP...

Using vi Editor

Vi is the one of the mostly used editor in Linux via terminal. In most cases where Linux is used...

Firewall Settings With IpTables on CentOS and RedHat [cite]

Here on this article we’ll discuss some basic methods to quickly apply to the iptables...

PHP : Convert/Replace Short Open Tags

Using short open tags, such as <? on your PHP code is not so clever. Other than the debate...

How to grep Compressed Files?

Sometimes you need to search the contents of .gz files in your system. Unfortunately, grep...