Question about PHP requests

Mr_Parham

Well-Known Member
#1
Hi

We have a PHP script which remote upload links, so users give a direct link to the script and it start using different ways using PHP to download the file on our server, now my problem/question is that on other servers if user give the url to the script and it close the browser it would still carry on with the process but right now our server is not doing that, we want the job to carry on even when user close the browser, is that possible?

Regards
Parham
 

NiteWave

Administrator
#4
I did simple test on this feature,
Code:
#cat noabort.php
<?php
$f=fopen("/tmp/noabort.log","w");
$t1=date("c");
fwrite($f,"$t1\n");
echo $t1 . "<br>";
sleep(20);
$t2=date("c");
fwrite($f,"$t2\n");
echo $t2 . "<br>";
fclose($f);
test URL is
http://192.168.0.102:8088/test/noabort.php
it worked as expected
if
lsws web admin->Server->General->External Application Abort:No Abort
in browser, open test URL for a few seconds, then close the tab,
check /tmp/noabort.log
2014-02-09T01:17:44-05:00
2014-02-09T01:18:04-05:00
so the request is completed.

if
lsws web admin->Server->General->External Application Abort:Enable Abort for All Requests
check /tmp/noabort.log, only
2014-02-09T01:18:53-05:00
there.so the request not completed.

see if this is any help/hint for you to trouble-shooting.
 
Top