Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 XiaoRulez

XiaoRulez
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 08 July 2006 - 04:06 AM

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.

#2 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 08 July 2006 - 04:12 AM

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.
"Confidence in the face of risk."

#3 XiaoRulez

XiaoRulez
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 10 July 2006 - 06:39 AM

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

#4 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 10 July 2006 - 11:38 AM

there is a tutorial here at phpfreaks.com for setting up cron jobs
check out:
http://www.phpfreaks...orials/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.
"Confidence in the face of risk."




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users