WDCP php5.3 Add Pdo_mysql module

Source: Internet
Author: User
Tags zts

Check the probe first:

PDO does not support MySQL. Some programs that use PDO for MySQL operations Phpwind and thinkphp are not able to run.

The php5.3 is encapsulated by default PDO_MYSQ. Then there is no need to download the extension package separately.

Below, to install this pdo_mysql component for WDCP.

First delete the php.ini inside:

Extension_dir=/www/wdlinux/php/lib/php/extensions/no-debug-zts-20060613extension=pdo.soextension=pdo_mysql.so

If not, please ignore it.

Then create a new pdo_mysql_53_ins.sh script and copy the following code in:

#!/bin/bash# Pdo_mysqlInstallscripts# author:wdlinux# Url http://www.wdlinux.cnif[!-f/usr/bin/GCC]; Then        Yum Install-YGCC GCC-c++ Makeautoconf libtool-ltdl-devel gd-devel freetype-devel libxml2-devel libjpeg-devel libpng-devel openssl-devel curl-develPatchLibmcrypt-devel Libmhash-devel Ncurses-develsudo bzip2fiif[!-d/www/wdlinux/php/lib/php/extensions/no-debug-zts-20090626]; Then    mkdir-p/www/wdlinux/php/lib/php/extensions/no-debug-zts-20090626fiif[-d/www/wdlinux/php/lib/php/extensions/no-debug-non-zts-20090626]; Then    CP/www/wdlinux/php/lib/php/extensions/no-debug-non-zts-20090626/*/www/wdlinux/php/lib/php/extensions/no-debug-zts-20090626 rm-rf/www/wdlinux/php/lib/php/extensions/ no-debug-non-zts-20090626filn-sf/www/wdlinux/php/lib/php/extensions/no-debug-zts-20090626/www/wdlinux/php/lib/ php/extensions/no-debug-non-zts-20090626ln-sf/www/wdlinux/mysql/include/mysql/*/usr/local/include/cd/tmpwget-c http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgztar zxvf pdo_mysql-1.0.2.tgzcd pdo_mysql-1.0.2/www/wdlinux/php/bin/phpize./configure--with-php-config=/www/ Wdlinux/php/bin/php-config--with-pdo-mysql=/www/wdlinux/mysqlmake[$?! = 0] && exitmake installecho grep ' no-debug-zts-20090626 '/www/wdlinux/etc/php.iniif [$?! = 0];then echo ' extension_dir=/www/wdlinux/php/lib/php/ext ensions/no-debug-zts-20090626 ' >>/www/wdlinux/etc/php.inifigrep ' pdo_mysql.so '/www/wdlinux/etc/php.iniif [$ ?! = 0];then echo ' extension=pdo_mysql.so ' >>/www/wdlinux/etc/php.inifiif [-d/www/wdlinux/apache];then SE Rvice httpd restartelse service nginxd restartfiecho echo "Pdo_mysql install is OK" echo
View Code

Then upload it to the server and run it.

Then look at Phpinfo:

This will be OK.

WDCP php5.3 Add Pdo_mysql module

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.