TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   PHP.ini (http://www.talkphp.com/advanced-php-programming/3575-php-ini.html)

9three 11-07-2008 02:28 PM

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?

Salathe 11-07-2008 03:40 PM

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)

9three 11-07-2008 03:54 PM

yea I tried that but I just reloaded my phpinfo and it still set to 30

Enfernikus 11-07-2008 04:35 PM

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.

9three 11-07-2008 04:44 PM

Quote:

Originally Posted by Enfernikus (Post 19432)
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.

Wildhoney 11-07-2008 05:19 PM

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
 


All times are GMT. The time now is 10:43 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0