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

A simple method of PHP compiling and installing mysql.so extension

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces the simple method of PHP compilation and installation of mysql.so extension, the contents of the article are carefully selected and edited by the author, with a certain pertinence, the reference significance for you is still relatively great, the following with the author to understand the simple method of PHP compilation and installation of mysql.so extension.

1. Enter the pdo_mysql directory in the installation path of the php source package

/ usr/local/src/php/package/php-5.6.29/ext/pdo_mysql

2. Run phpize and generate a configure file in this directory

/ usr/local/php/bin/phpize

3. Run config and specify the location of the mysql and php directories

. / configure-prefix=/data/php-with-pdo-mysql=/data/mysql/bin/mysql_config-with-php-config=/data/php/bin/php-config-with-zlib-dir=/root/php-5.6.25/ext/zlib

4. Compile and install to generate mysql.so

Make & & make install

5. Modify php.ini file, add mysql.so extension configuration, and save and exit.

Vim / data/php/etc/php.ini

Extension=pdo_mysql.so

6. Restart php-fpm

Service php-fpm restart

7. Test, add a php file, such as / data/nginx/html/mysql.php, in the web directory

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

Database

Wechat

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

12
Report