I have a file that I include on every page of my site that looks like this:
<?php date_default_timezone_set('US/Eastern'); //functions and variables and what not ?>
When I require() that file from a page, it loads fine. But when I require() that file from /cron/main.php (outside the public directory), I get an error that says something like "Call to undefined function date_default_timezone_set()".
If it means anything, main.php is run by a...you guessed it...cron. main.php also require()s two other files, and they get included fine.