当nginx mysql php php-fpm pdo_mysql 都安装完后
php 测试页面都可以看到,但是当用pdo 程序连接数据库时,不能获得页面。
php编译参数 添加如下
--enable-pdo --with-pdo-mysql=shared --with-pdo-sqlite=shared
然后编译参数为
./configure --prefix=/usr/local/php-fcgi --enable-fastcgi --enable-fpm --enable-discard-path --enable-force-cgi-redirect --with-config-file-path=/usr/local/php-fcgi/etc --enable-zend-multibyte --with-mysql=/usr/local/mysql5/ --with-mysqli=/usr/local/mysql5/bin/mysql_config --with-libxml-dir --with-xmlrpc --with-gd=/usr/local/gd2 --with-jpeg-dir --with-png-dir --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-curl --with-curlwrappers --with-openssl --with-mcrypt --with-mhash --enable-pcntl --enable-sockets --enable-sysvsem --enable-inline-optimization --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-debug --disable-ipv6 --enable-pdo --with-pdo-mysql=shared --with-pdo-sqlite=shared
之后 让程序员改下连接数据库的名字和host 就ok了
阅读(1264) | 评论(1) | 转发(0) |