2017-09-14 146 views
0

我已經在我的ubuntu 16.04上運行Symfony,它返回啓動錯誤。 ,我跑在cmd中的PHP --ini命令PHP警告:PHP啓動:無法加載動態庫

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll' - /usr/lib/php/20151012/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_pgsql.dll' - /usr/lib/php/20151012/php_pdo_pgsql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pgsql.dll' - /usr/lib/php/20151012/php_pgsql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 
Configuration File (php.ini) Path: /etc/php/7.0/cli 
Loaded Configuration File:   /etc/php/7.0/cli/php.ini 
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d 
Additional .ini files parsed:  /etc/php/7.0/cli/conf.d/10-opcache.ini, 
/etc/php/7.0/cli/conf.d/10-pdo.ini, 
/etc/php/7.0/cli/conf.d/20-calendar.ini, 
/etc/php/7.0/cli/conf.d/20-ctype.ini, 
/etc/php/7.0/cli/conf.d/20-exif.ini, 
/etc/php/7.0/cli/conf.d/20-fileinfo.ini, 
/etc/php/7.0/cli/conf.d/20-ftp.ini, 
/etc/php/7.0/cli/conf.d/20-gettext.ini, 
/etc/php/7.0/cli/conf.d/20-iconv.ini, 
/etc/php/7.0/cli/conf.d/20-json.ini, 
/etc/php/7.0/cli/conf.d/20-mbstring.ini, 
/etc/php/7.0/cli/conf.d/20-phar.ini, 
/etc/php/7.0/cli/conf.d/20-posix.ini, 
/etc/php/7.0/cli/conf.d/20-readline.ini, 
/etc/php/7.0/cli/conf.d/20-shmop.ini, 
/etc/php/7.0/cli/conf.d/20-sockets.ini, 
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini, 
/etc/php/7.0/cli/conf.d/20-sysvsem.ini, 
/etc/php/7.0/cli/conf.d/20-sysvshm.ini, 
/etc/php/7.0/cli/conf.d/20-tokenizer.ini 

上述警告運行PHP --ini命令時發生。 如何解決警告我還清除並安裝了php7。 我刪除了一些dll的php.ini擴展中的註釋

+1

'PHP -r 「回聲php_ini_loaded_file();」' 將顯示在CLI當前ini加載的文件中,在那裏搜索您的擴展名,路徑不正確。「 –

+0

@AlivetoDie上面的命令也返回相同的警告錯誤,顯示路徑'/etc/php/7.0/cli/php.ini'我已經編輯了輸出路徑 – Tharunkumar

+0

這裏有什麼問題?你有關於丟失文件的警告。那麼你想怎麼做呢? – eis

回答

0

PHP警告:PHP啓動:無法加載動態庫...是錯誤無法運行命令,您尚未安裝此擴展。

第一站的Symfony:

php bin/console server:stop 

然後

sudo apt-get install php7.0-curl php7.0-mbstring php7.0-pgsql php7.0-intl 

安裝運行的Symfony後:

php bin/console server:start 
+0

我已經運行了上述命令,但警告仍然發生,但Elasticsearch-PHP需要cURL或自定義HTTP處理程序。此錯誤已解決。你知道爲什麼嗎? – Tharunkumar

+0

重新啓動apache –

相關問題