|
#1
|
|||
|
|||
|
I have been trying to run a cron every 30 mins. the command is as follows:
/usr/bin/php /home/username/public_html/myfile.php But it is giving me a Internal 500 Error. Please suggest solutions as soon possible. Thanks All. |
|
#2
|
||||
|
||||
|
Change the permissions (chmod) of the file to 644.
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss |
|
#3
|
|||
|
|||
|
Thanks for the reply. But the file is already in 644. Is there any alternative to perform the task.
Thanks |
|
#4
|
|||
|
|||
|
An internal server error (500) is a HTTP error code, not a error a php script would give.
http://en.wikipedia.org/wiki/List_of...x_Server_Error Its impossible to say without looking at the code, but either you php script is calling a website which returns a 500 error or your cron job is not actually setup as you listed in the first post. If it really is exactly what you listed, I would open up a ticket with the Hostgator admins, because this is not something we can tell you how to fix without looking at the specific code itself. |
|
#5
|
||||
|
||||
|
It's difficult to provide much help with the limited information given. A 500 error is pretty generic, there may be more details in your Error Log in your cPanel that would help. The most common reason is permissions. What is the purpose of the file the cron is calling?
|
|
#6
|
||||
|
||||
|
Quote:
If a php file has too wide permissions (like 777 or 666 or even 664) you will get a 500-error when you try to execute that file. And yes, that error does come from the http server (Apache), not from the php script itself. EDIT: Just came to think of it... if that is running as a crontab job, how can it give a 500 error?
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss Last edited by quietFinn; 06-26-2009 at 09:43 AM. |
|
#7
|
|||
|
|||
|
Thanks all for your replies.
The php script i am using is working with the twitter api's to search profiles and tweets. When i am running the script independently its fine. but the script take about 5-8 minutes to execute. The error is resolved when i am removing the cron. Is it the process time of the script? i am not very well versed with cpanel. But there is a place in cpanel where its showing the process logs. The max processes is 25. But when ever the cron is running its going upto 32. Then is when the error is getting fired. I hope this information will be of some use to resolve the problem. Thanks. |
|
#8
|
||||
|
||||
|
Quote:
Quote:
__________________
- David |
|
#9
|
||||
|
||||
|
Plus this might considered to violate the next TOS provision, "b) Run stand-alone, unattended server-side processes at any point in time on the server".
__________________
Hosting term analogies, revised and improved (?) |
|
#10
|
|||
|
|||
|
Unfortunately, this rule is impossible to comprehend since all .php scripts (including the ubiquitous phpinfo.php) are "stand-alone, unattended server-side processes."
|
|
#11
|
||||
|
||||
|
Quote:
phpinfo.php, though is normally run by the person browsing to that address, so it's not unattended. and while cron entries are normally unattended, they're not stand-alone, since they run something else. eLiant, you might bring this provision up in the thread in the suggestons category about clarifying the TOS.
__________________
Hosting term analogies, revised and improved (?) Last edited by gwyneth; 06-27-2009 at 01:20 PM. |
|
#12
|
|||
|
|||
|
Good point. Thread updated.
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ssh/cron | aetchell | Pre-Sales Questions | 11 | 07-01-2009 11:40 AM |
| Cron Job | osirion | Suggestions | 1 | 01-29-2008 02:39 AM |
| Cron Job | Dwight | Shared Hosting Support | 7 | 07-27-2006 05:10 PM |
All times are GMT -5. The time now is 07:54 PM.










