您好,登錄后才能下訂單哦!
------------------------報錯------------------------
Fatal error: Class 'PDO' not found in /usr/share/nginx/html/Core/Library/Think/Db.class.php on line 39
:(
Class 'PDO' not found
錯誤位置
FILE: /usr/share/nginx/html/Core/Library/Think/Db.class.php LINE: 39
-----------------------------------------------------
1、進行源碼包ext/pdo目錄
# cd php-5.6.14/ext/pdo
2、執行/usr/local/php/bin/phpize
3、配置、編譯、安裝擴展PDO
# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-pdo=shared && make && make install
……………
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files: /usr/local/php/include/php/
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
4、配置、編譯、安裝pdo_mysql
# cd ../pdo_mysql/
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql2
……………
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
5、在php配置文件中加入
vi /usr/local/php/lib/php.ini
…………
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo.so
6、啟動php-fpm服務
# /usr/local/php/sbin/php-fpm
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。