Disabling Strict Standards in PHP 5.4

前端 未结 5 1974
予麋鹿
予麋鹿 2020-11-28 04:18

I\'m currently running a site on php 5.4, prior to this I was running my site on 5.3.8. Unfortunately, php 5.4 combines E_ALL and E_STRICT, which m

5条回答
  •  天命终不由人
    2020-11-28 04:51

    .htaccess php_value is working only if you use PHP Server API as module of Web server Apache. Use IfModule syntax:

    # PHP 5, Apache 1 and 2.
    
        php_value error_reporting 30711
    
    

    If you use PHP Server API CGI/FastCGI use

    ini_set('error_reporting', 30711);
    

    or

    error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
    

    in your PHP code, or PHP configuration files .user.ini | php.ini modification:

    error_reporting = E_ALL & ~E_STRICT & ~E_NOTICE
    

    on your virtual host, server level.

提交回复
热议问题