Pdo_mysql extension Support in PHP

Source: Internet
Author: User
Tags zend

1. Prepare the installation files

: Http://pecl.php.net/package/PDO_MYSQL

2. Installation

# tar zxf pdo_mysql-1.0.2.tgz

# CD pdo_mysql-1.0.2

#/usr/local/php/bin/phpize #生成configure等文件, if there are errors see below error action handling


#make #如果有错误看下面错误操作

#make Install

When you are done, look at the last line pdo_mysql.so the build path

# Vim/usr/local/php/lib/php.ini #每个的ini文件位置不同, add the path to pdo_mysql.so in the last line

Extension =/usr/local/php/lib/php/extensions/no-debug-zts-20131226/pdo_mysql.so

Restart Apache to see that the Pdo_mysql has been loaded successfully.

When you run/usr/local/php/bin/phpize, it appears:

Configuring for:

PHP Api version:20041225

Zend Module Api no:20060613

Zend Extension Api no:220060519

Cannot find autoconf. Please check your autoconf installation and the

$PHP _autoconf environment variable. Then, rerun the this script.

The solution is:


# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz

# TAR-ZVXF M4-1.4.9.tar.gz

# CD m4-1.4.9/

#./configure && make && make install

# CD: /

# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz

# TAR-ZVXF Autoconf-2.62.tar.gz

# CD autoconf-2.62/

#./configure && make && make install

A simpler approach.

# Yum Install M4

# yum Install autoconf

Make occurs when:

Make: * * * [Pdo_mysql.lo] Error 1


This problem occurs because the file is required for MySQL header at compile time, and it does not find the location of the head file by default search. So to link the MySQL header file under the/usr/local/mysql/include/directory to/usr/local/include /In the directory:


This article is from the "Home_tang" blog, make sure to keep this source http://yagetang.blog.51cto.com/1780698/1670251

Pdo_mysql extension Support in PHP

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.