简体   繁体   中英

php error_reporting E_STRICT

I just changed hosts. Everything is set up and working except I get a ton of errors that all start out PHP Strict Standards:

I turned off E_STRICT in php.ini. When I run phpinfo() to verify it, it shows as off. It shows

error_reporting = 22519 = 01010111 11110111. E_STRICT is bit 11 (2048).

My first question is, is it possible for these errors to be generated without E_STRICT somehow?

My phpinfo() call is at the root directory. But I've also checked each directory between root and the directories where these functions occur. Neither there is any other php.ini, nor is there a .htaccess file with a conflicting suPHP_ConfigPath call.

These PHP files get called anytime someone presses a link or button on my site, so I'll get a MB per hour or some such of these darned warnings. But I can't figure out how I'm getting them if E_STRICT is turned off.

Anyone got a bright idea of something else I should check?

Best Mikekehrli,

Please try to add:

error_reporting(E_ERROR | E_WARNING | E_PARSE);

at the start of your script, and look if you still get strict messages.

Ok, the problem is solved.
But changing error_reporting in the file that was reported in the error didn't change anything.

I had to find the file that had the class that the error said was in conflict, and when I changed error_reporting in that file, the errors stopped proppping.

Note, that changes the the php.ini error_reporting variable were not effective in changing this situation. Only changing it in the script itself handled the problem.

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