安装Siberian CMS zend时出现致命错误

问题描述 投票:0回答:2

我尝试安装名为Siberian CMS的CMS系统。我试过很多次安装它,但我一次又一次地得到这个错误。

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file() has been disabled for security reasons' in /home/korsbjer/public_html/ww15/lib/Zend/Config/Ini.php:182 Stack trace: #0 /home/korsbjer/public_html/ww15/lib/Zend/Config/Ini.php(202): Zend_Config_Ini->_parseIniFile('/home/korsbjer/...') #1 /home/korsbjer/public_html/ww15/lib/Zend/Config/Ini.php(126): Zend_Config_Ini->_loadIniFile('/home/korsbjer/...') #2 /home/korsbjer/public_html/ww15/lib/Zend/Application.php(386): Zend_Config_Ini->__construct('/home/korsbjer/...', 'production') #3 /home/korsbjer/public_html/ww15/lib/Zend/Application.php(85): Zend_Application->_loadConfig('/home/korsbjer/...') #4 /home/korsbjer/public_html/ww15/index.php(37): Zend_Application->__construct('production', '/home/korsbjer/...') #5 {main} thrown in     /home/korsbjer/public_html/ww15/lib/Zend/Config/Ini.php on line 182
php zend-framework
2个回答
0
投票

Tim是对的,parse_ini_file()函数在您的服务器上被禁用,因此Zend无法解析app.ini文件并启动Siberian。

如果您具有root SSH访问权限,则可以编辑php.ini并从parse_ini_file列表中删除disable_functions

您可以通过执行以下命令找到正确的php.ini路径:

php --ini

有趣的是:

Loaded Configuration File: /path/to/php.ini

您还可以使用phpinfo()找到正确的路径。但由于parse_ini_file()被禁用,我对phpinfo()没有太大的希望,它可能也是如此。

完成后,不要忘记重新启动Apache或PHP-FPM(可能需要,取决于您如何使用PHP)。


0
投票

Zend Framework 1使用ini文件进行配置,因为您尝试安装的CMS似乎也是如此。 PHP可以使用名为parse_ini_file()的函数本机读取ini文件。已在您的服务器上明确禁用此功能。您需要联系您的主机,看看他们是否会为您启用此功能(我不会满怀希望)。如果没有,您可能很少有机会将CMS配置为使用不同类型的配置文件(ZF支持许多),但这不太可能是直截了当的,可能根本不可能。

© www.soinside.com 2019 - 2024. All rights reserved.