Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add php mssql extensions

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

How to increase php mssql expansion, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Add php mssql expansion methods: 1, download freetds and php source code package; 2, install freetds;3, extract php source code package, and enter the mssql expansion directory; 4, generate configure;5, edit php.ini files, and add mssql extension.

This article operating environment: linux5.9.8 system, php-5.2.17 version, DELL G3 computer

How to add php mssql extensions?

Php installs the mssql extension

About freetds compile-time with-tdsver parameters

After version 1.1 of FreeTDS, it can be set to auto, and the version needs to be specified manually before.

Mssql module installation has been written before, this time it is only supplementary to specify the with-tdsver parameter when compiling freetds

1. Download freetds and php source code packages

[root@VM_0_11_centos ~] # wget-c ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.1.21.tar.gz[root@VM_0_11_centos ~] # wget-c http://museum.php.net/php5/php-5.2.17.tar.gz

2. Install freetds

# decompress the freetds source code package

[root@VM_0_11_centos ~] # tar zxvf freetds-1.1.21.tar.gz [root@VM_0_11_centos ~] # cd freetds-1.1.21/

# start compilation and installation

[root@VM_0_11_centos] # / configure-- prefix=/usr/local/freetds-- with-tdsver=7.3-- enable-msdblib [root@VM_0_11_centos ~] # make & & make install

3. Compile the mssql module

# decompress the php source code package

[root@VM_0_11_centos ~] # tar zxvf php-5.2.17.tar.gz

# enter the mssql extension directory

[root@VM_0_11_centos ~] # cd php-5.2.17/ext/mssql/

# generate configure

[root@VM_0_11_centos mssql] # / www/server/php/52/bin/phpize

# start compilation

[root@VM_0_11_centos php-5.2.17] # / configure-- with-php-config=/www/server/php/52/bin/php-config-- with-mssql=/usr/local/freetds [root@VM_0_11_centos php-5.2.17] # make & & make install

4. Edit the php.ini file, add the mssql extension, and add it under line 491 (if you don't know how to use the vi editor, you can download and modify the file and upload it)

[root@VM_0_11_centos ~] # vi / www/server/php/52/etc/php.iniextension_dir = "/ www/server/php/52/lib/php/extensions/no-debug-non-zts-20060613/" extension = mssql.so # New Line

Save exit, restart php or restart the server.

After reading the above, do you know how to add php mssql extensions? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report