When I use the following code:
print_r($_SERVER); ?>
I get a nice list off all server variables. However, when I enter the same code i
When you execute via cron, are you just calling php myscript.php or are you accessing the php script via http? If you're executing directly via http then the apache variables (such as DocumentRoot) will not be available.
php myscript.php