PHP cron-job

Status
Not open for further replies.

kb147

New Member
Messages
10
Reaction score
0
Points
0
Ever time the cron-job goes off I get this email:
/bin/sh: /home/kb14/public_html/lib/cron-update.php: Permission denied

What does this mean and what do I need to do in order to get this cron-job to work?
 
Last edited:

dlukin

New Member
Messages
427
Reaction score
25
Points
0
Code:
/usr/bin/php  /home/kb14/public_html/lib/cron-update.php >> /home/kb14/public_html/cronOutput.txt  2>&1

Should work.
 

kb147

New Member
Messages
10
Reaction score
0
Points
0
It still doesn't work.

What I had originally was: /home/kb14/public_html/lib/cron-update.php
But I would keep getting this:
/bin/sh: /home/kb14/public_html/lib/cron-update.php: Permission denied

Please help!
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
It still doesn't work.

What I had originally was: /home/kb14/public_html/lib/cron-update.php
But I would keep getting this:
/bin/sh: /home/kb14/public_html/lib/cron-update.php: Permission denied

Please help!

Did you get an error email when you used my method? Did you check the error file, cronOutput.txt?

The /bin/sh method does not work on PHP scripts on x10 .
 

kb147

New Member
Messages
10
Reaction score
0
Points
0
It would say Permission denied when it did the cronOutput.txt.

The instructions i got with the script was:
At this line “Command to run:” put up the command in their, it should look like this php <home directory>/public_html/lib/cron-update.php(in our example: php /home/yourdomain/public_html/lib/cron-update.php)
Change Minute(s) and Hour(s) to your refresh time.

I have done this but it never works.
 

kb147

New Member
Messages
10
Reaction score
0
Points
0
I still cant get it to work.
I have use the following codes:

Code:
/home/kb14/public_html/lib/cron-update.php

php /home/kb14/public_html/lib/cron-update.php

/usr/local/bin/php  -q  /home/kb14/public_html/lib/cron-update.php

php - q /home/kb14/public_html/lib/cron-update.php

But if i use this code:
Code:
/usr/bin/php /home/kb14/public_html/lib/cron-update.php
I will get this:
Code:
X-Powered-By: PHP/5.2.13
Set-Cookie: PHPSESSID=b753ee98c9f8d4e72ca95c3418b53d18; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
What does this mean?
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
But if i use this code:
Code:
/usr/bin/php /home/kb14/public_html/lib/cron-update.php
I will get this:
Code:
X-Powered-By: PHP/5.2.13
Set-Cookie: PHPSESSID=b753ee98c9f8d4e72ca95c3418b53d18; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
What does this mean?

It means it's working; that's some debug stuff that php kicks back for logging purposes when you run a cron job.

If your php file were to use echo/print to add more debug of it's own, it would appear below Content-type: text/html.
 
Last edited:

kb147

New Member
Messages
10
Reaction score
0
Points
0
OK, I will try this. If it doesn't work then I guess I'll be back here.
 
Last edited:

kb147

New Member
Messages
10
Reaction score
0
Points
0
It means it's working; that's some debug stuff that php kicks back for logging purposes when you run a cron job.

If your php file were to use echo/print to add more debug of it's own, it would appear below Content-type: text/html.

It doesn't work. My website still does not update.
This is what I am suppose to get in the email:
Code:
<!-- Cron Started --!>
Stats updated
Ads renewed
Auto renew done
Autopay done
Rented refs done
Vacation done
Activeclicks done
Prevbalance done
Suspend cheaters done
<!-- Cron Ended --!>
Is there a way I can have someone look at this or someone tell me what is wrong because it is getting really annoying when your site can't update?

Also the server is chopin. The script and cron-update is found in my parked domains. Could this be a reason it is not working?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
View the page in a browser. If it doesn't work then, you'll know there's a problem with the script.
 
Status
Not open for further replies.
Top