[英]Turn off Joomla debug mode
I have a website with Joomla 2.5.8. 我有一个使用Joomla 2.5.8的网站。 There was an issue happening only on the production server, so I turn on the logs for a few minutes.
仅在生产服务器上发生了问题,因此我打开了几分钟的日志。
I went to Global Configuration > Server >Error reporting and change it from "Simple" to "Development". 我转到“ 全局配置”>“服务器”>“错误报告” ,并将其从“简单”更改为“开发”。
The thing is, the logs generated are not in the same encoding as the rest of the website. 事实是,生成的日志与网站其余部分的编码不同。 So it basically broke it down.
因此它基本上将其分解。 Front-office and back-office are unavailable.
没有前台和后台。
I need to turn off the debug mode without using the administration console. 我需要在不使用管理控制台的情况下关闭调试模式。
Does someone knows which file or database table to amend ? 有人知道要修改哪个文件或数据库表吗?
The goal is to have a temporary fix, so I can access the admin tools and revert the broken setting. 目标是拥有一个临时修复程序,因此我可以访问管理工具并还原损坏的设置。
EDIT: Since I see you turned on error reporting, you will need to edit the variable $error_reporting
within the JConfig
class in the configuration.php file to: public $error_reporting = 'default';
编辑:由于我看到您打开了错误报告,因此您需要在configuration.php文件的
JConfig
类中将变量$error_reporting
编辑为: public $error_reporting = 'default';
. 。
I finally found the answer with a 20 minutes server downtime. 我终于在服务器停机20分钟后找到了答案。
I opened /includes/framework.php and /administrator/includes/framework.php and added this line : 我打开了/includes/framework.php和/administrator/includes/framework.php并添加了这一行:
// System configuration.
$config = new JConfig();
// XXX : Line to add for a temporary fix
$config->error_reporting = 'default';
// Set the error_reporting
switch ($config->error_reporting)
{
case 'default':
case '-1':
break;
case 'none':
case '0':
error_reporting(0);
break;
Then the administration console is available again and I can change the settings properly. 然后管理控制台再次可用,我可以正确更改设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.