Jump to content

Archived

This topic is now archived and is closed to further replies.

XiaoRulez

Execution time. Can i make exeption without php.ini?

Recommended Posts

well, i got this file db_update.php normal execution time for the current database size is about just over 5 minutes. all it does is it updates a few variables for each user.

The execution timeout for the new another server i'm working on is only 120 seconds. Is there a way for me to change the execution time within the script? Because it also decides wether or not to update based on a few things. i can't have it allowing a 10 minute execution for all files.

Share this post


Link to post
Share on other sites
you should be able to use ini_set() to temporarily override the php.ini settings.

check out the manual page on it:  http://us3.php.net/ini_set

see if that helps.

Share this post


Link to post
Share on other sites
kool, thanks. ;D

Kinda off the php topic:
I was told about, by someone, that i might be able to set a Cron job for the updates... I'm using CPanel, how might i do this?
eg, all rows in table 'users' change the value of all 'credit' +1 if 'credit' isn't over 300

Share this post


Link to post
Share on other sites
there is a tutorial here at phpfreaks.com for setting up cron jobs
check out:
http://www.phpfreaks.com/tutorials/28/0.php

I don't use cPanel, so i'm not sure if it has a GUI for this, but  I know that my host (using sphera) doesn't.
it has to be done through the command lins (using a SSH client like PuTTy)

The tutorial link above was pretty helpful, but not exactily compatible with my host, so I had to do some research and tweak it a bit.  Give it a try and post any questions you still have.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.