I Need to Allow set_time_limit() (PHP Advanced)

Status
Not open for further replies.

GG-Xtreme

New Member
Messages
430
Reaction score
0
Points
0
I have a simple sitemap generator script that does not use a lot of resources and is supposed to be run by cron jobs every hour or two. The problem is, this script takes a very long time to complete, and if it times out, you must click a certain link in the script output so that it may complete successfully . Of course, cron jobs is unable to do this, and the script never completes a successful run. Is it possible to allow set_time_limit() for PHP Advanced? Are sitemap generators not allowed? Is there another sitemap generator that can successfully complete without using this function?
 

GG-Xtreme

New Member
Messages
430
Reaction score
0
Points
0
Ok, I'll forget about this for now. I've found a sitemap generator that is better suited to my site, that never runs for more than 2 seconds and that takes up hardly any memory at all. It's not perfect, but it will do for now.
Edit:
Now this is becoming a bit annoying. Every time I get a function enabled or change my script to get things working, two more functions are disabled that break everything again. As has been the problem for the past week or so, I need fopen working, as file_get_contents gives me an invalid resource error when using any variables tied to it.
Edit:
Okay, I have noticed the major problem here. All of these functions (fopen, file_get_contents, etc.) work just fine if I run the script from my browser. But if I run it via cron jobs, it keeps telling me that the function has been disabled. This makes cron jobs mostly useless. Can an admin look into this?
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
If you run them via cron job use php-cron as the binary instead of php.

For example:
php-cron -q /home/user/public_html/mycron.php

-Corey
 
Status
Not open for further replies.
Top