简体   繁体   English

错误消息Joomla网站中的严格标准

[英]Error message Strict standards in Joomla Website

Joomla Website URL: http://gero-teufert.de/impro_for_biz3/index.php Joomla网站URL: http : //gero-teufert.de/impro_for_biz3/index.php

We are getting several errors on this Joomla Website since we updated the PHP version. 自从更新PHP版本以来,我们在此Joomla网站上遇到了一些错误。

Errors Like: 错误如:

Strict Standards: Non-static method JApplication::getMenu() should not be called statically in /var/www/l3s8433/html/impro_for_biz3/includes/application.php on line 540 严格的标准:非静态方法JApplication :: getMenu()不应在第540行的/var/www/l3s8433/html/impro_for_biz3/includes/application.php中静态调用

We have solved the errors on our local machine by editing the php.ini file and Joomla config file but since we do not have access to this file on server, we could not do it. 我们已经通过编辑php.ini文件和Joomla配置文件解决了本地计算机上的错误,但是由于我们无法访问服务器上的该文件,因此无法执行此操作。

Is there anyway we could solve these errors by editing Joomla files as we were were able to solve some errors and few are still left. 无论如何,我们可以通过编辑Joomla文件来解决这些错误,因为我们能够解决一些错误,而剩下的很少。

You are getting this error because your error reporting is set to On in your configuration.php . 之所以收到此错误,是因为您的错误报告在configuration.php设置为On To fix go to "global config" and go to /server/ Error reporting/ set to none . 要解决此问题,请转到“全局配置”,然后转到/server/ Error reporting/设置为none This should work. 这应该工作。

If your hosting service uses FastCGI, you must have your own copy of php.ini (maybe with a slightly different name) somewhere in your FTP account. 如果您的托管服务使用FastCGI,则必须在FTP帐户中的某个位置拥有自己的php.ini副本(名称可能稍有不同)。 Alternatively, you should be able to configure PHP with a .user.ini file. 或者,您应该能够使用.user.ini文件配置PHP。

If it runs PHP as Apache module, you can use .htaccess . 如果将PHP作为Apache模块运行,则可以使用.htaccess It's worth nothing that the syntax is different and you cannot use constants like E_ALL : 语法不同E_ALL ,您不能使用像E_ALL这样的常量,这E_ALL

php_value error_reporting -1

If it's using another SAPI, please provide the appropriate info. 如果使用其他SAPI,请提供适当的信息。

BTW, you aren't actually solving the errors. 顺便说一句,您实际上并没有解决错误。 You are just hiding them ;-) 你只是把它们藏起来;-)

Open configuration.php in the main joomla directory. 在joomla主目录中打开configuration.php Set $error_reporting to '6135' . $error_reporting设置$error_reporting '6135'

For me it was line 23, and after editing it looked like this: 对我来说,它是第23行,在编辑之后看起来像这样:

public $error_reporting = '6135';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM