Max Execution Time On Local Machine Error

Discussion in 'PHP' started by phaze3131, Nov 1, 2009.

  1. #1
    Hey guys, I am using Easyphp 2.0 on my localmachin and am having a problem with max execution fatal error.

    I have changed the value of the php.ini file of:
    max_execution_time = 9999

    which by default was like 30 seconds I think.

    I have restarted easy php and I even put an .htaccess file in the www directory which says this:
    php_value max_execution_time 6000


    But I keep getting this error:
    Fatal error: Maximum execution time of 60 seconds exceeded in C:\Program Files\EasyPHP5.3.0\www\conv.php on line 82



    Yea my code is doing many iterations and I need to store many values in my database and this is just giving me problems because it is not able to run till completion.


    Thanks for the help!
     
    phaze3131, Nov 1, 2009 IP
  2. tonythetiger

    tonythetiger Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try using the php function set_time_limit(int seconds) at the top of your script, that might work. check out php.net/set_time_limit for more details.
     
    tonythetiger, Nov 1, 2009 IP
  3. xenon2010

    xenon2010 Peon

    Messages:
    237
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    make it 0
    it will execute ur script till it finishes.
     
    xenon2010, Nov 2, 2009 IP
  4. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You might want to check that this is not being set in your script too if it's not 100% your coding
     
    JAY6390, Nov 2, 2009 IP
  5. dhaval300

    dhaval300 Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    make it 0....than check out d time.....
     
    dhaval300, Nov 2, 2009 IP
  6. jgalvez

    jgalvez Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Also, you can create a page with the following in it:

    <?php phpinfo(); ?>

    Then visit the page you save that in, it will give you the details of your php configuration, including the max_execution time that is being loaded, and the exact location of the php.ini you should be modifying.
     
    jgalvez, Nov 2, 2009 IP
  7. ramysarwat

    ramysarwat Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    what version php you use ?
     
    ramysarwat, Nov 3, 2009 IP