Forum Moderators: phranque
I recently moved host because my PHP script that I ran on CRON was supposedly taking too much load on the server.
But I now have a new problem at hand. The CRON job at the new host is not updating. The script which was set to run every hour is not running. I had set the CRON to email me the output each time it runs (i.e. one mail every hour). I do get the email, but the email reads 'Permission Denied', which is possibly the reason for the script not running.
There is nothing wrong with the PHP script, as I have now been manually running it every hour. So, the problem is with the CRON. My host is also unsure of what the problem is. Can someone advice? Thanks.
Sorry for replying so late, but the CRON still seems to have some problem. I now get the following message:
/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 1:?php
: No such file or directory
/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 2: syntax error near unexpected token `'includes/application_top.php''
/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 2: ` require('includes/application_top.php');
'
What do you think is the mistake here?
Thanks
usr/bin/GET http://www.example.com/cron_update.php
But, I get this error message..
/bin/sh: usr/bin/GET: No such file or directory
Any inputs on what is going wrong in this one?
Sorry for replying so late, but the CRON still seems to have some problem. I now get the following message:/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 1:?php
: No such file or directory
/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 2: syntax error near unexpected token `'includes/application_top.php''
/home/ACCOUNTNAME/public_html/FOLDER/cron_update.php: line 2: ` require('includes/application_top.php');
'What do you think is the mistake here?
it might help to see the php source.
i'm not sure what the "line 1" error is.
regarding the 2 "line 2" errors, i would guess that you need to specify a complete path to the file instead of using a relative filepath.
of course i have no practical knowledge of php syntax, so it may actually be a syntax error in the "require" statement.
perhaps someone who knows php will weigh in or you could repost in that forum.
This apart, as I had already mentioned, I run the PHP link every now and then to cover up the CRON's malfunction. My host suggested this:usr/bin/GET http://www.example.com/cron_update.php
But, I get this error message..
/bin/sh: usr/bin/GET: No such file or directory
Any inputs on what is going wrong in this one?
you probably don't have the GET command installed or it is the wrong path for that command.
you could try "whereis GET" to see if it can be found elsewhere.
you could also try the lwp-request command or the wget command instead of GET.
or you could just use your favorite web browser to "GET" the script.