Home  >  Article  >  Backend Development  >  Brief description of the configuration method of PHP connecting to MSSQLServer under Linux 1. Sybase library_PHP tutorial

Brief description of the configuration method of PHP connecting to MSSQLServer under Linux 1. Sybase library_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:28:30765browse

If you need to access Microsoft SQL Server or Sybase database under Linux, the following software packages are recommended. SybaseCommon http://download.sybase.com/pub/ase1192_linux/sybase-common-11.9.2-3.i386.rpm SybaseOpenClient http://download.sybase.com/pub/ase1192_linux/sybase-openclient-11.1.1 -3.i386.rpm The following process passed in versions before RedHat 8 (excluding 8). Versions after RedHat 8 seem to conflict with the Sybase library due to a system package upgrade. I have reported this problem to PHP DEV TEAM, but seems to have no solution. Other Linux distributions launched at similar times have the same problem. SybaseOpenClient depends on SybaseCommon. The main function of these two packages is to provide client connections to Sybase. Because of the well-known relationship between MSSQL and Sybase, their underlying protocols are roughly the same, so... # rpm -ivh sybase-common-11.9.2-3.i386 .rpm sybase-openclient-11.1.1-3.i386.rpm The default installation location is /opt/sybase-11.9.2/ After the installation is complete, perform some simple settings in /opt/sybase-11.9.2/ Add a new file named interfaces in the directory, the content is roughly as follows: DBServerName query tcp tds7.0 DBServerIPAddress DBServerTCPPort master tcp tds7.0 DBServerIPAddress DBServerTCPPort If you need to connect to multiple servers, just add such a configuration line. Package these two before you configure PHP, and then add --with-sybase-ct=/opt/sybase-11.9.2, or --with-sybase=/opt/sybase- to the PHP configuration parameters. 11.9.2 is enough. Note that in recent versions of php, there is an additional configuration option --with-mssql. This is used with the FreeTDS library and is not suitable for the Sybase library. Other installation and configuration procedures are omitted.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531770.htmlTechArticleIf you need to access Microsoft SQL Server or Sybase database under Linux, the following software packages are recommended. SybaseCommon http://download.sybase.com/pub/ase1192_linux/sybase-common-11.9.2-3.i...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn