How to modify the value of max_execution_time (SOLVED)

Discussion regarding Joomla! Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
enticer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 127
Joined: Tue Oct 02, 2007 3:19 am

How to modify the value of max_execution_time (SOLVED)

Post by enticer » Mon Jan 28, 2008 8:02 am

I would like to change the value of max_execution_time.

What file should I open and where is it located?

I am using joomla 1.0.13 + CB 1.1 + Fireboard 1.04

I am encountering this error in my website: http://sms-cebu.org

[Mon Jan 28 00:35:24 2008] [error] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/smscebu/public_html/components/com_fireboard/sources/interpreter.fireboard.inc.php on line 88
Last edited by enticer on Mon Feb 04, 2008 10:54 am, edited 1 time in total.

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: How to modify the value of max_execution_time

Post by Robin » Mon Jan 28, 2008 8:04 am

Hi,

You will need to add this to a htaccess file, or edit the php.ini file if you have access. If you do a search on "max execution time" (on the forum) you will find lots of post explaining how to do this in detail.

enticer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 127
Joined: Tue Oct 02, 2007 3:19 am

Re: How to modify the value of max_execution_time

Post by enticer » Mon Jan 28, 2008 8:10 am

Thanks for this quick reply. Before I decided to post this problem here, I was already searching for the file php.ini in the www folder of my hosting and seems unable to locate this file. I also read other threads as .htaccess being modified instead.
I am confused and wanted to make sure I will be properly guided because I will be modifying on my live website that is seemed crashing awhile ago.

I will try to search again here.

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9352
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: How to modify the value of max_execution_time

Post by RussW » Mon Jan 28, 2008 9:25 am

The php.ini file is primarily a server based configuration file, and as such your host is likely to be the only with access to it, however....  depending on the server configuration you might be able to make use of either a local (your hosting account) .htaccess or if required php.ini file.


In the first instance, it is normally beneficial to speak with your hosting provider, ask them if they can increase PHP max_execution_time for your hosting account, if they are unable to assist then ask them if they support the use of PHP variables in local .htaccess and/or local php.ini files. Depending on their reply;

Your host might not allow the use of the php_flag tagging in .htaccess files, however if they do, there are several variations;

  php_flag max_execution_time        

In the case of .htaccess files, and in the case of Joomla!, rename htaccess.txt to .htaccess in the top-level " / " Joomla! directory (this file is recursive to lower directories) and place ONE of the above lines at the top of the file, and retest, if that does not work, try the alternate option.

If this does not work, then you might be in the situation where you need to use a php.ini file instead. So, on your local computer, make a new file named "php.ini" and place ONE of the following lines in that file.

  max_execution_time =          
  max_execution_time = ""

Place this test php.ini file in the Joomla! " / " and "administrator/" directories first, if the Security Message is resolved, then, to fully secure your site, (this is NOT recursive to lower directories, each directy needs its own directive) you will need to copy this file in to ALL directories that have a .php file in it.
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/

enticer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 127
Joined: Tue Oct 02, 2007 3:19 am

Re: How to modify the value of max_execution_time

Post by enticer » Mon Jan 28, 2008 9:41 am

Thanks RussW

I will try your advises and feedback here as soon as I can.

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: How to modify the value of max_execution_time

Post by ircmaxell » Mon Feb 04, 2008 3:41 am

ummm...

From within php,

Code: Select all

set_time_limit($x);
Where $x is the number of seconds to set the limit to...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

enticer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 127
Joined: Tue Oct 02, 2007 3:19 am

Re: How to modify the value of max_execution_time (RESOLVED)

Post by enticer » Mon Feb 04, 2008 10:43 am

This has been resolved.
Thanks to RussW!

I let our hosting to modify php.ini file.

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9352
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: How to modify the value of max_execution_time (RESOLVED)

Post by RussW » Mon Feb 04, 2008 10:45 am

Pleased to hear that. Good luck with your site.

If you are happy that the post is now resolved, could I ask if you could now go back to your FIRST post and update it to SOLVED in the Message Icon drop down box to allow other users to quickly find resolved issues. Thank you.
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/

gost59
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Mar 22, 2010 8:06 am

Re: How to modify the value of max_execution_time

Post by gost59 » Tue Mar 30, 2010 11:04 am

RussW wrote:
In the case of .htaccess files, and in the case of Joomla!, rename htaccess.txt to .htaccess in the top-level " / " Joomla! directory (this file is recursive to lower directories) .
Hi!
I solwed my maximum_execution_time problem by adding:
php_value max_execution_time 50
to my .htaccess file.

But Joomla had a default installed htaccess.txt file that i had to rename to .htaccess to make it work. There was quite a lot of code in the Joomla default htaccess.txt file, SEF section etc.

Can these Joomla default settings stop working when changing the suffix from htaccess.txt to .htaccess ?

Thanks for any input!


Locked

Return to “Performance - 1.0.x”