安装 Siberian CMS zend 时出现致命错误
Fatal error when installing Siberian CMS zend
我尝试安装名为 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
Zend Framework 1 使用 ini 文件进行配置,就像您尝试安装的 CMS 一样。 PHP 可以使用名为 parse_ini_file()
的函数本地读取 ini 文件。此功能已在您的服务器上明确禁用。您需要联系您的房东,看看他们是否会为您启用此功能(我不会让您抱有希望)。如果没有,您可以将 CMS 配置为使用不同类型的配置文件(ZF 支持很多)的可能性很小,但这不太可能是直截了当的,而且可能根本不可能。
Tim 说得对,parse_ini_file()
功能在您的服务器上被禁用,因此 Zend 无法解析 app.ini 文件并启动 Siberian。
如果您有根 SSH 访问权限,您可以编辑您的 php.ini 并从 disable_functions
列表中删除 parse_ini_file
。
您可以通过执行此命令找到正确的 php.ini 路径:
php --ini
有趣的一行是:
Loaded Configuration File: /path/to/php.ini
您也可以使用phpinfo()
找到正确的路径。不过由于parse_ini_file()
被禁用了,我对phpinfo()
也不抱太大希望了,可能也是。
完成后,不要忘记重启 Apache 或 PHP-FPM(这可能是必需的,取决于您如何使用 PHP)。
我尝试安装名为 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
Zend Framework 1 使用 ini 文件进行配置,就像您尝试安装的 CMS 一样。 PHP 可以使用名为 parse_ini_file()
的函数本地读取 ini 文件。此功能已在您的服务器上明确禁用。您需要联系您的房东,看看他们是否会为您启用此功能(我不会让您抱有希望)。如果没有,您可以将 CMS 配置为使用不同类型的配置文件(ZF 支持很多)的可能性很小,但这不太可能是直截了当的,而且可能根本不可能。
Tim 说得对,parse_ini_file()
功能在您的服务器上被禁用,因此 Zend 无法解析 app.ini 文件并启动 Siberian。
如果您有根 SSH 访问权限,您可以编辑您的 php.ini 并从 disable_functions
列表中删除 parse_ini_file
。
您可以通过执行此命令找到正确的 php.ini 路径:
php --ini
有趣的一行是:
Loaded Configuration File: /path/to/php.ini
您也可以使用phpinfo()
找到正确的路径。不过由于parse_ini_file()
被禁用了,我对phpinfo()
也不抱太大希望了,可能也是。
完成后,不要忘记重启 Apache 或 PHP-FPM(这可能是必需的,取决于您如何使用 PHP)。