tgavin Posted March 3, 2006 Share Posted March 3, 2006 [code]ignore_user_abort();set_time_limit(0); [/code]not working for me. Any suggestions? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 3, 2006 Share Posted March 3, 2006 Try: ignore_user_abort(TRUE); Quote Link to comment Share on other sites More sharing options...
tgavin Posted March 3, 2006 Author Share Posted March 3, 2006 [!--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. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 4, 2006 Share Posted March 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
tgavin Posted March 4, 2006 Author Share Posted March 4, 2006 [!--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? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 4, 2006 Share Posted March 4, 2006 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 Link to comment Share on other sites More sharing options...
tgavin Posted March 4, 2006 Author Share Posted March 4, 2006 [!--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. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 4, 2006 Share Posted March 4, 2006 Your original post did not use 'TRUE' as the parameter:ignore_user_abort(TRUE); Quote Link to comment Share on other sites More sharing options...
tgavin Posted March 4, 2006 Author Share Posted March 4, 2006 [!--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? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 4, 2006 Share Posted March 4, 2006 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 Link to comment Share on other sites More sharing options...
tgavin Posted March 4, 2006 Author Share Posted March 4, 2006 [!--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 :) Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 4, 2006 Share Posted March 4, 2006 Try this to verify whether the setting took:ignore_user_abort(TRUE); //should change the setting to TRUEecho ignore_user_abort(); //when used without an argument returns the current setting //should print 1 Quote Link to comment Share on other sites More sharing options...
tgavin Posted March 5, 2006 Author Share Posted March 5, 2006 [!--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 TRUEecho 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.