Jump to content

Recommended Posts

[!--quoteo(post=351424:date=Mar 3 2006, 08:59 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 3 2006, 08:59 PM) [snapback]351424[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Try:
ignore_user_abort(TRUE);
[/quote]
no go. I looked into my php info and it's actually turned off. But, I can't find it in my php.ini file to turn it on.
If it is set to FALSE in your php info that means that it will NOT ignore user disconnect. What you want is a value of TRUE so it will ignore user disconnect.
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]ignore_user_abort() allows developers to control whether a remote client can abort the running of a script. If the user_abort_setting argument is set to FALSE, client aborts (and some network errors) will cause the script to stop running. If user_abort_setting is set to TRUE, the script continues running until an error occurs, the script finishes execution, or the script times out. [/quote]
--It would probably be unwise to set it from php.ini if you could , you should set it on a single script basis. I did some research and it's seem to be unsettable from php.ini or from the apache configuration file.
[!--quoteo(post=351591:date=Mar 4 2006, 02:59 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 02:59 PM) [snapback]351591[/snapback][/div][div class=\'quotemain\'][!--quotec--]
If it is set to FALSE in your php info that means that it will NOT ignore user disconnect. What you want is a value of TRUE so it will ignore user disconnect.

--It would probably be unwise to set it from php.ini if you could , you should set it on a single script basis. I did some research and it's seem to be unsettable from php.ini or from the apache configuration file.
[/quote]
Thanks for your reply.
I'm trying to set it on a single script basis, but it's not working. Maybe I'm not understanding you?
Did you try putting this at the top of your page?
[code]<?php
    ignore_user_abort(TRUE);
    set_time_limit(0);
?>[/code]
--You do know the the page will still terminate when all the code is executed? This will not make the page continue running beyond the execution of all the code. What method are you using to test that it is not working?
[!--quoteo(post=351615:date=Mar 4 2006, 04:34 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 04:34 PM) [snapback]351615[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Did you try putting this at the top of your page?
[code]<?php
    ignore_user_abort(TRUE);
    set_time_limit(0);
?>[/code]
--You do know the the page will still terminate when all the code is executed? This will not make the page continue running beyond the execution of all the code. What method are you using to test that it is not working?
[/quote]
Yes, that was in my original post :)

I have a batch email script that - for testing - I have set to send 1 email every 3 seconds. All addresses are mine. So The first email gets sent and I close the browser. I should receive 2 more emails and a confirmation/success email. All of which I don't receive.
[!--quoteo(post=351623:date=Mar 4 2006, 04:51 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 04:51 PM) [snapback]351623[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Your original post did not use 'TRUE' as the parameter:
ignore_user_abort(TRUE);
[/quote]
You're correct :)
I did try using TRUE, it didn't work. I've tried it with register globals on and off as well.
Would output buffering have anything to do with this?
[!--quoteo(post=351708:date=Mar 4 2006, 10:27 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 10:27 PM) [snapback]351708[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Do you have control of your own server or do you have a web host? Web hosts can make some of the php.ini settings unchangable by the user for security reasons and i've run across this many times.
[/quote]
It's my server. cPanel to be exact.

Again, thanks for your time :)
[!--quoteo(post=351718:date=Mar 4 2006, 11:25 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 11:25 PM) [snapback]351718[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Try this to verify whether the setting took:

ignore_user_abort(TRUE); //should change the setting to TRUE
echo ignore_user_abort(); //when used without an argument returns the current setting
//should print 1
[/quote]
Good call, I didn't even think of that. It returned a 1.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.