This one has me stumped!
Had a server running Redhat 4 and WHM/cPanel (up to date stable). Got a new server, running RedHat 5 and WHM/cPanel (up to date release). Used the WHM Transfer function to migrate the sites over to the new server.
Now, what I am finding is that CRON jobs that were running fine on the old server will no longer work on the new one. Here's the specifics:
We run a program on this server for weather creation (forecasts, current condition images, etc.) In particular, we have a PHP script which calls the weather program to generate an image which shows the current conditions for a town and saves it in a folder on the server. This script works fine when we run it on the command line and produces the desired output.
However, when we setup this script to run as a CRON job, we don't get the output of the image. Instead, it looks like it is just interpreting the script as text and spitting that out as a result of the CRON, but no image.
Again, I can run this PHP script at the command line and it works every time, but getting it to run as a CRON has me stopped in my tracks. What is really confusing is that it was working on the previous server!
Here's an example of the script (forecast.php) which runs fine at the command line:
This will execute properly on the command line in the following two ways:/usr/bin/php /full_server_path/hw3.php forecast=hourly pands=27524 state=nc config=png alt=4042front hwvusename=weatherimage
1. If I am in the folder with the script and type:
./forecast.php
2. I am anywhere on the server and type:
/full_server_path_to_script/forecast.php
When setting up the CRON, I have tried setting the command to run as:
/full_server_path_to_script/forecast.php
php /full_server_path_to_script/forecast.php
Neither of those produce the output of the image as it does when I execute on the command line.
The version of PHP being used is: PHP 4.4.7 (cli)
Any words of wisdom about how to get this to run properly again on a CRON?
Thanks!



LinkBack URL
About LinkBacks
Reply With Quote




