paul bennett

PHP and Cron

Posted on: May 30, 2007

If you’re using the cron process to automate parts of your site / application, ensure you aren’t relying on superglobal variables like $_SERVER.

Apache provides information for the $_SERVER array (‘SERVER_NAME‘, ‘DOCUMENT_ROOT‘ etc), and as cron doesn’t run underApache, it has no access to information inside the $_SERVER array.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

%d bloggers like this: