Home > php教程 > php手册 > body text

php添加mysqli扩展_PHP教程_编程技术

WBOY
Release: 2016-06-20 12:33:01
Original
1427 people have browsed it

任何php的扩展都可以在php的源码包内单独编译安装

此处因phpmyadmin需mysqli扩展,编译该模块安装,过程及一些问题记录如下:

php编译安装路径/usr/local/php5.6

mysql编译安装路径/usr/local/mysql5.6

进入php源码安装包的mysqli扩展路径下

# cd /tmp/php-5.6.15/ext/mysqli

生成configure文件

# /usr/local/php5.6/bin/phpize

配置

# ./configure --with-php-config=/usr/local/php5.6/bin/php-config /

    --with-mysqli=/usr/local/mysql/bin/mysql_config

编译安装,如果配置过程中没有错误,在编译时遇到任何错误的话,需要重新编译PHP,并附加

--with-mysql=shared,mysqlnd --enable-sockets=shared这两个参数再重新编译即可

# make && make install

Installing shared extensions:     /usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/

Installing header files:        /usr/local/php5.6/include/php/

查看so文件

ls /usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/

mysqli.so

修改php.ini

在Dynamic Extensions注释下方添加即可

extension=/usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/mysqli.so



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template