TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-07-2008, 02:28 PM   #1 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default PHP.ini

I'm trying to change the default max_execution_time = 30 to 60 because my Magento seems to be stalling while downloading some files. I've tried different methods to change the ini file to 60 but non seem to work. in the php.ini file I should have the following:

PHP Code:
php_value_max_execution_time 60 
right? or did I do something wrong? How long does it take for it to take affect?
9three is offline  
Reply With Quote
Old 11-07-2008, 03:40 PM   #2 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

In php.ini, max_execution_time = 60
In a .htaccess file (if your server configuration allows it) php_value max_execution_time = 60.

You can also change the time limit inside your script by calling set_time_limit(60)
Salathe is offline  
Reply With Quote
Old 11-07-2008, 03:54 PM   #3 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default

yea I tried that but I just reloaded my phpinfo and it still set to 30
9three is offline  
Reply With Quote
Old 11-07-2008, 04:35 PM   #4 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

set_time_limit() will only change the time limit while the file it's in and the file it's attached to are being executed.
Enfernikus is offline  
Reply With Quote
Old 11-07-2008, 04:44 PM   #5 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default

Quote:
Originally Posted by Enfernikus View Post
set_time_limit() will only change the time limit while the file it's in and the file it's attached to are being executed.
i dont see that option in the ini file.
9three is offline  
Reply With Quote
Old 11-07-2008, 05:19 PM   #6 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

The set_time_limit function can only be called at runtime, so the code must be in each file, or in the root file, to which that'll then affect all the others below it.

php Code:
include_once 'File-1.php'; // Default timeout
set_time_limit(60); // 60 second timeout
include_once 'File2-.php'; // 60 second timeout
include_once 'File3-.php'; // 60 second timeout
 
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 12:29 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design