我试图设置服务器环境的本地版本(Apache2,CiviCRM,Drupal7,PHP7.3),以便在本地测试某些代码更改。
但是在/var/log/apache2/error.log文件中,我收到有关PHP扩展的以下错误:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20180731/mysqli.so' (tried: /usr/lib/php/20180731/mysqli.so (/usr/lib/php/20180731/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20180731//usr/li>
PHP Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: /usr/lib/php/20180731/gd2 (/usr/lib/php/20180731/gd2: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/gd2.so (/usr/lib/php/2018073>
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20180731/pdo_firebird.so' (tried: /usr/lib/php/20180731/pdo_firebird.so (/usr/lib/php/20180731/pdo_firebird.so: undefined symbol: php_pdo_unregister_driver), /usr/l>
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.>
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: /usr/lib/php/20180731/pdo_oci (/usr/lib/php/20180731/pdo_oci: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_oci.so (/usr>
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20180731/pdo_pgsql (/usr/lib/php/20180731/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_pgsql.>
PHP Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/lib/php/20180731/pgsql (/usr/lib/php/20180731/pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pgsql.so (/usr/lib/php>
PHP Warning: PHP Startup: Unable to load dynamic library 'xmlrpc' (tried: /usr/lib/php/20180731/xmlrpc (/usr/lib/php/20180731/xmlrpc: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/xmlrpc.so (/usr/lib>
PHP Warning: PHP Startup: Unable to load dynamic library 'xsl' (tried: /usr/lib/php/20180731/xsl (/usr/lib/php/20180731/xsl: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/xsl.so (/usr/lib/php/2018073>
PHP Warning: Module 'curl' already loaded in Unknown on line 0
PHP Warning: Module 'exif' already loaded in Unknown on line 0
PHP Warning: Module 'gd' already loaded in Unknown on line 0
PHP Warning: Module 'intl' already loaded in Unknown on line 0
PHP Warning: Module 'mbstring' already loaded in Unknown on line 0
PHP Warning: Module 'sockets' already loaded in Unknown on line 0
浏览器中的phpinfo()
在“已解析的其他.ini文件”部分中显示了所有上述扩展名,但gd2除外。 (尽管它确实显示了gd。)
我已经检查了php.ini
文件并在“扩展”部分中激活了所需的扩展,并将“路径和目录”部分中的extension_dir
更改为正确的路径(/ usr / lib / php / 20180731)。
我还尝试安装错误日志先前版本中标记为“找不到文件”的扩展名(pdo_firebird
):实际上,文件pdo_firebird.so
在/ usr / lib中不存在。 / php / 20180731目录。当我安装它并且文件pdo_firebird.so
确实存在时,它开始抛出当前错误(pdo_firebird.so: undefined symbol: php_pdo_unregister_driver
)。
所以我感觉到正在发生更深层的错误,安装丢失的扩展名并不能解决问题,因为新的错误将会出现。
有人有什么提示吗? :)
编辑:我在/ usr / lib / php / 20180731目录上做了chmod -R 777
,但是错误仍然存在。