Use php (4.x) on a Linux machine to connect to the SQL Server 2000 database apt-getinstallphp-odbcunixODBC-develunixODBC or yumins
Use php (4.x) on a Linux machine to connect to the SQL server2000 Database apt-get install php-odbc unixODBC-devel unixODBC or yum ins
Homepage → Database Technology
Background:
Read News
Connecting PHP to SQL server2000 in Linux
[Date:] Source: Linux community Author: Linux organization [Font:]
Use php (4.x) on a Linux machine to connect to the SQL server2000 Database
Apt-get install php-odbc unixODBC-devel unixODBC
Or
Yum install php-odbc unixODBC-devel unixODBC
And then from here () The current freetds source code
Cd/tmp
Wget
Tar xzvf freetds-stable.tgz
Cd freetds -*
./Configure-prefix =/usr/local/freetds-with-tdsver = 8.0-with-unixodbc =/usr
(Because SQL server2000 is connected, "-with-tdsver = 8.0" is used ")
Make; make install
Vim/usr/local/freetds/etc/tds. driver. template
Insert in file:
[FreeTDS]
Description = v0.64 with protocol v8.0
Driver =/usr/local/freetds/lib/libtdsodbc. so
(The freetds version here is 0.64)
Then install the driver
Odbcinst-I-d-f/usr/local/freetds/etc/tds. driver. template
Create a dsn.
Vim/usr/local/freetds/etc/tds. datasource. template
Content:
[MSSQLTestServer]
Driver = FreeTDS
Description = test sample database
Trace = No
Server = 192.168.1.1
Port = 1433
Database = testdb
Then
Odbcinst-I-s-f/usr/local/freetds/etc/tds. datasource. template-l
Restart apache
Now php supports connecting to the SQL Server database.
0
In Linux, ybase cannot be started due to environment variables.
View MySQL in Linux
Related information: php SQL Server2000 Linux PHP
Image Information
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2014 Linux community All rights reserved Zhejiang ICP backup No. 06018118