WDCP Ultimate Tutorial on pdo installation

Source: Internet
Author: User
The idea of installing pdo on inux hosts is the same for both apache and nginx environments. <Br>, I don't know how to solve it. & Lt; br & gt; & lt; br inux host installation pdo, regardless of the apache environment or nginx environment, the idea is the same.

I found a few clear tutorials on the Internet, but I didn't explain them. many webmasters followed the instructions and encountered errors in the middle. I don't know how to solve them.


The wdlinux package is used as an example.



1. find a temporary directory, such as/home.
Cd/home
 

2. use wget to download the pdo package officially provided by php

Wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz  
3. extract

Tar zxvf PDO_MYSQL-1.0.2.tgz  

4. go to the extracted directory.
Cd PDO_MYSQL-1.0.2
5. use phpize to add dynamic extensions for PHP


/Www/wdlinux/php/bin/phpize  

Note: you must install phpize in the bin directory of the php installation directory based on the php installation location on your server. If this statement is executed and no phpize is displayed, install phpize (Baidu)



6. Compile

./Configure -- with-php-config =/www/wdlinux/php/bin/php-config -- with-pdo-mysql =/www/wdlinux/mysql  


In this step, you must modify the php path.



7. make

  1. Make


8. make install
  1. Make install

9. There is also the last step. sometimes, the system will automatically help you during compilation, and sometimes you do not need to operate it yourself.

Edit the/www/wdlinux/etc/php. ini file,
Add at last
  1. [Pdo_mysql]

  2. Extension = "pdo_mysql.so"

  3. Extension =/www/wdlinux/apache_php-5.2.17/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so 

10. restart apache or nginx

  1. Service httpd restart

  2. Service nginxd restart 


Finally, test: phpinfo. php to see if pdo_mysql is available. if pdo is available

This tutorial is taken from the wdlinux Forum http://www.wdlinux.cn/bbs ~

Related Article

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.