It's only when I try to submit a form that I get the error message. It's happening consistently when I submit a form, though - it's not just one form.
So I guess the target of this form is not this "init.php". This "init.php" is included in some other file. And at this point your/the correct "config.php", which defines this constant, is not included.