Jump to content


Photo

ignore_user_abort not working


  • Please log in to reply
12 replies to this topic

#1 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 03 March 2006 - 08:25 PM

ignore_user_abort();
set_time_limit(0);
not working for me. Any suggestions?
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#2 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 03 March 2006 - 08:59 PM

Try:
ignore_user_abort(TRUE);


#3 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 03 March 2006 - 09:36 PM

[!--quoteo(post=351424:date=Mar 3 2006, 08:59 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 3 2006, 08:59 PM) View Post[/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.
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#4 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 04 March 2006 - 02:59 PM

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.


#5 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 04 March 2006 - 03:20 PM

[!--quoteo(post=351591:date=Mar 4 2006, 02:59 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 02:59 PM) View Post[/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?
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#6 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 04 March 2006 - 04:34 PM

Did you try putting this at the top of your page?
<?php 
    ignore_user_abort(TRUE);
    set_time_limit(0); 
?>
--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?

#7 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 04 March 2006 - 04:48 PM

[!--quoteo(post=351615:date=Mar 4 2006, 04:34 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 04:34 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Did you try putting this at the top of your page?
<?php 
    ignore_user_abort(TRUE);
    set_time_limit(0); 
?>
--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.
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#8 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 04 March 2006 - 04:51 PM

Your original post did not use 'TRUE' as the parameter:
ignore_user_abort(TRUE);

#9 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 04 March 2006 - 05:57 PM

[!--quoteo(post=351623:date=Mar 4 2006, 04:51 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 04:51 PM) View Post[/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?
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#10 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 04 March 2006 - 10:27 PM

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.

#11 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 04 March 2006 - 10:44 PM

[!--quoteo(post=351708:date=Mar 4 2006, 10:27 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 10:27 PM) View Post[/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 :)
A noble spirit embiggens the smallest man.
- Jebediah Springfield

#12 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 04 March 2006 - 11:25 PM

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

#13 tgavin

tgavin
  • Members
  • PipPipPip
  • Advanced Member
  • 176 posts
  • LocationNaples, FL

Posted 05 March 2006 - 12:25 AM

[!--quoteo(post=351718:date=Mar 4 2006, 11:25 PM:name=mainewoods)--][div class=\'quotetop\']QUOTE(mainewoods @ Mar 4 2006, 11:25 PM) View Post[/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.
A noble spirit embiggens the smallest man.
- Jebediah Springfield




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users