PHP databases support off fail Zabbix

Source: Internet
Author: User
Tags curl fpm install php php source code zend

PHP installation parameters./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--enable-fpm--with-fpm-user =PHP-FPM--with-fpm-group=php-fpm--with-mysql=/usr/local/mysql--with-mysql-sock=/tmp/mysql.sock--   With-libxml-dir--with-gd--with-jpeg-dir--with-png-dir--with-freetype-dir--with-iconv-dir--with-zlib-dir --with-mcrypt--enable-soap--enable-gd-native-ttf--enable-ftp--enable-mbstring--enable-exif--enable-zend-mul Tibyte--disable-ipv6--with-pear--with-curl--enable-bcmath--enable-sockets--with-gettext

-----------------------------------------------------------------------------

PHP databases support off fail by query is missing mysqli

Installing mysqli

You need to compile the module and load it in the PHP source code.

Let's start with some knowledge:
What is Phpize? PHP Official Description: Http://php.net/manual/en/install.pecl.phpize.phpphpize is used to extend the PHP extension module, through the phpize can build PHP plug-in module.
For example, you want to add JSON or mysqli to the original compiled PHP, you can use the Phpize implementation.
When PHP is compiled, there will be a phpize program in the bin directory of PHP. Enter the relevant extension directory under PHP source ext, and execute phpize to generate the Configure file before compiling the module to be added.
If you are the RPM package to install PHP, then install php-devel This package, there will be phpize command.

[Email protected] mysqli]#/usr/local/php/bin/phpize

Configuring for:
PHP Api version:20100412
Zend Module Api no:20100525
Zend Extension Api no:220100525
You have new mail in/var/spool/mail/root
[Email protected] mysqli]#/configure--prefix=/usr/local/mysqli \
>--with-php-config=/usr/local/php/bin/php-config \
>--with-mysqli=/usr/local/mysql/bin/mysql_config

[[email protected] mysqli]# make

[[email protected] mysqli]# make install
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/
Installing header files:/usr/local/php/include/php/

Vim/usr/local/php/etc/php.ini Add extension=mysqli.so Save restart PHP at the lowest line.

--------------------------------------------------------------------------------------------------------------- ----

After installation is found in fact directory/usr/lib/php/modules under Mysqli.so can try to directly change the next time php.ini do not reinstall is feasible.

[Email protected] lib]# Cd/usr/lib/php/modules
[[email protected] modules]# ls
bcmath.so curl.so fileinfo.so json.so mysqli.so mysql.so pdo_mysql.so pdo.so pdo_sqlite.so phar.so sqlite3.so Z Ip.so

Reference http://www.cnblogs.com/rusking/p/4471503.html

PHP databases support off fail Zabbix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.