简体   繁体   中英

Disable strict standards in PHP 5.3.8

I am using strict standards option in PHP but I want to disable it because Joomla doesn't like it and I have to use Joomla on my localhost.

In response to another question on this site, this solution was given: E_ALL & ~E_DEPRECATED & ~E_STRICT but this didn't work for me. I think it only works for PHP 5.4 while I am using 5.3.8.

Can anyone tell me what I should use? I am currently using error_reporting(E_ALL & ~E_NOTICE) . Also I am using ini_set('display_errors') but there are still errors shown that are related to strict standards.

So how can I disable strict standard errors?

I have the same problem. This is how I fix it in joomla.

Set error_reporting in configuration.php of joomla to "30711" (equal to E_ALL & ~E_NOTICE & ~E_STRICT)

just messed around with this and would like to share my own results. I did not do it runtime using php, I did it in the php.ini file.

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

Remeber to restart the server afterwards ....

I tried thanhtd's solution, but it didn't not work for me. However, I changed the error_reporting value to '1' instead of the default '0' in my configuration.php file for Joomla (2) and that worked. So thanks to thanhtd for getting me on the right path.

to suppress all errors use E_NONE

you might also want to use display_errors(0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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