Activated display_error in php.ini now get error

We activated display_error in php.ini and now we get this error:

Constant GLOBAL_PATH already defined in /var/www/vhosts/yourdomain.com/httpdocs/admin/projects/index.php</b> on line <b>3</b><br />

Why is this? Thank you

You’re welcome :wink:

The short answer?
Because you have an error in /var/www/vhosts/yourdomain.com/httpdocs/admin/projects/index.php on line 3.

The long answer?
You’re defining GLOBAL_PATH, but it has already been defined before. You can only define a constant once, and you can’t change it.

You could do something like this (on line 3, in that file):


if(!defined('GLOBAL_PATH')) define('GLOBAL_PATH', 'your/global/path/goes/here');

The reason you didn’t see it before is because display_errors was turned off. You turned it on, hence, you get to see the errors in your code :slight_smile:

Thanks Immerse for the explanation!