Zubrag.com
May 20, 2012, 11:51:10 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 'Cannot set time limit' warning  (Read 3553 times)
RK
Newbie
*
Posts: 2


« on: November 11, 2007, 04:16:09 pm »

I'm getting the following message:

Warning: set_time_limit(): Cannot set time limit in safe mode in /home/..../download.php on line 81

What is the cause / remedy?

Thanks.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #1 on: November 12, 2007, 07:30:49 am »

Php is running in safe mode. In order to turn it off you have to change following in the php settings file (if you have permissions to modify it):
safe_mode = Off

Unfortunately i cannot help if you have no permissions to modify php.ini file.

The only thing you could do is remove set_time_limit(0); from the download.php. This will set max allowed script execution time to default value set by hosting provider. Usually 30 seconds.
Logged
RK
Newbie
*
Posts: 2


« Reply #2 on: November 12, 2007, 08:00:02 am »

Thanks for the get-back.  I was afraid of that.

Unfortunately, the web site I'm working on is hosted by an ISP who won't let me change PHP parameters.   I'm looking at transferring files that are typically 25-30 MB to clients who usually connect from their homes by cable and DSL.  Dialup is not a significant concern.

Thoughts, anybody?
Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #3 on: November 12, 2007, 09:23:28 am »

This is from php manual.
Note that set_time_limit() has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the configuration file.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC