2013-08-22 65 views
0

我想與cPanel一起運行Nginx Web服務器。 我已經讓Nginx運行並且網站運行正常,但是在安裝cPanel後,看起來像是覆蓋了PHP。cPanel覆蓋PHP

從error.log中當前的錯誤:

connect() failed (111: Connection refused) while connecting to upstream

此錯誤表明有FastCGI的或php-fpm的一個問題。當我試圖重新啓動的php-fpm的服務,我得到這個錯誤:

Starting php-fpm: [23-Aug-2013 00:30:31] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0 [23-Aug-2013 00:30:31] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0 [23-Aug-2013 00:30:31] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

回答

0

這樣看來,你做要麼最近的變化重寫PHP安裝或路徑,以你的模塊/usr/lib64/php/modules/不再有效。

我想看看PHP配置使用:

<?php phpinfo(); ?> 

然後模仿你所看到的配置,並添加你需要的配置額外的模塊,並從源頭重新編譯PHP。這應該爲您解決問題。

如果你不能讓PHP目前完全運行,您仍然可以通過在命令行中運行此獲取配置:

php -i | head 

您也可以暫時通過編輯你的PHP禁用這些失蹤模塊。 ini文件。這樣做後,PHP應該開始沒有任何問題。

編輯1:您可以在php.ini文件中找到並更改您的extension_dir路徑。

+0

我到底在哪裏改變?我在哪裏可以配置模塊路徑?因爲它從FTP看起來沒問題。 – user2298995

+0

我已經更新了答案,請參閱編輯#1。 – Diemuzi