Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- php script as a cron job
- Paul Lautman
January 2, 2008, 10:52 pm
rate this thread
years. Recently my hosting company moved to new servers and now the job does
They have said that "The server configuration is newer and your script will
not run as it's a PHP file which contains some HTML."
By this I think they mean that there is some HTML output outside the <?php
Is it really the case that there is a configuration that will not allow
output outside the braces?
Re: php script as a cron job
Greetings, Paul Lautman.
In reply to Your message dated Thursday, January 3, 2008, 01:52:36,
It's most silly answer I have heard. And it is nominated as the siliest one in
the started year. What a shame!
It's not a problem for PHP itself.
Please check the way You are using to start Your crontab job.
Basically, it should contain a string like:
/usr/local/bin/php -f /home/username/path/jobfile.php
Some companies configure crontab to send any output generated by user
jobs back to the user's email.
If You do not want to flood Your email address from crontab output, make sure
Your job does not output anything except error messages.