• Resolved kech61

    (@kech61)


    Hi,

    Thanks for this fantastic plugin, just a minor issue:
    In /shariff/backend/index.php the first line is WP_DEBUG=true.

    This filles up the error log :
    2015/06/10 00:12:15 [error] 1499#0: *573977 FastCGI sent in stderr: "PHP message: PHP Notice: Constant WP_DEBUG already defined in /var/www/vhosts/mysite/httpdocs/wp-config.php on line 93" while reading response header from upstream, client: ##########, server: mysite, request: "GET /wp-content/plugins/shariff/backend/?url=http%3A%2F%2Fwww.mysite%2Fen%2Falps-map-with-minor-bug HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/mysite/php-fpm.sock:", host: "www.mysite", referrer: "https://www.mysite/en/"

    Thanks for all your efforts,
    Christian

    https://www.ads-software.com/plugins/shariff/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jan-Peter

    (@starguide)

    Actually, the first line should be

    define( 'WP_DEBUG', false );

    Just checked the the repo and it states false, as it is supposed to be. So I don’t know, why it is set to true in your case, but it is supposed to be set to false. As soon, as you change this, the errors will disappear.

    Plugin Author 3UU

    (@3uu)

    The backend will not work properly if debug is on. This is not our fault. The original backend was not developed with WP in mind. And there are many good reasons for us not to change the original code. At least not within the wrapper plugin. Therefor we set WP debug to off because this will avoid errors at the frontend. The frontend view of the backend ?? But we need to include the wp-config for dynamic setup of the backend. The problem is that a CONSTANT should be constant. If do you have set WP_DEBUG too it will end up with this error in your logfiles… But counter will work also if somebody has set WP_DEBUG on. I think this is the best way the plugin will work with common WP installations.

    Not nice – I know ?? On the other hand at a production system all error reporting, WP_DEBUG and so on should allways be disabled. This is the default of WP_DEBUG too. So usually there is no need to set this constant in wp-config. Therefor I do not want change this in the backend of the Shariff plugin. However if at any time the developers of the original backend code will clean up I would be more than happy to remove this WP constant from the the backend wrapper.

    Hi,

    Just my 2 cents, as this “bug” is also triggered on my hosts (WP_DEBUG is defined in wp-config.php for some reasons that i cannot influence)

    Imho it should be sufficient to check if the constant is already defined:

    if(!defined(‘WP_DEBUG’)){
    define(‘WP_DEBUG’, false);
    }

    Kind regards,

    mg

    Plugin Author Jan-Peter

    (@starguide)

    The underlying issue was resolved with release 2.4.0. The backend now works fine with WP_DEBUG enabled.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP_DEBUG=true causes a bloated error log’ is closed to new replies.