Move base_path up, as it needs to be configured as long as it's not passed by the PHP script.