Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2007
    Posts
    130
    Thanks
    9
    Thanked 0 Times in 0 Posts

    changing the overall page execution timeout.

    Hi,

    I've been working on a script to mailshot my clients from a mysql database, which contains quite a lot of email addresses, about 1000 to be exact. As you may know, this could take a lot of script processing time.

    My webhost wont increase any timeouts to more than 30 seconds for 'security reasons' but I have managed to get around this with ini_set's for max_execution_time and mysql.connect_timeout within the script, which have worked.

    But now I get a 'page cannot be found' error if the process takes longer than about 30/40 seconds.

    SO... I have managed to set the script execution times long enough... but is there a way to increase the execution time of the actual page? I think with asp there is an http runtime executionTimeout or something, but is there anything similar in php? or general html?

    I could split the email addresses down into batches of 100 and re-direct the page if it hasent sent to all of them yet, but i thought I would check if there was a better way first?

    Any help is appreciated! Thanks!

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    You're probably timing out because of an apache setting, and not a php setting at this point.

    Your best bet is probably to set up some type of queuing system and send out small chunks of emails rather than 1000 at a time.

  • #3
    Regular Coder
    Join Date
    May 2007
    Posts
    130
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Thanks bcarl, I thought that might be best... Would that be like I said, with doing 100 at a time and then automatically refreshing the page to do the next 100?

    Ive also come across the ignore_user_abort(true); function. would this work?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •