My setup is as follows:
/index.php
/php/init.php
/php/config.php
/php/functions.php
The very first thing index.php does is:
<?php include 'php/init.php'; ?>
init.php then goes on like this:
<?php
define('DEBUG',true);
if(DEBUG){
error_reporting(E_ALL);
ini_set('display_errors', '1');
}
require_once 'config.php';
require_once 'functions.php';
?>
When the page is loaded, I get a bunch of errors from functions.php, complaining about missing variables that should have been set in config.php. Turns out, everything within config.php is simply ignored as if the require_once statement wasn't there. var_dump( get_included_files());
confirms this.
It does not display any errors, and if I simply replace the require_once line with the content of config.php, it works perfectly fine. The same thing also happens when both config.php and functions.php contain nothing more than a single echo command. So the contents of the files should not be an issue in this. I'm a bit out of ideas on how to determine where the error is and why it would include one file, but not the other.
Can anyone help?