B
Bill H
Background:
I have a flash program that posts user enter data to a php program on
the server.
The php program then saves this data in a database and then uses system
() to call the perl program which takes the data and generates a pdf
file and thumbnail images.
The php program, on completion of the perl program then sends a status
back to flash telling it was done. Flash then calls the php script to
get thes thumbnails for the view to see. This process can take 10 or
more seconds on the perl side to complete.
We are changing the flash aplication so that there is no need for it
to display the thumbnails after posting the data over and I am looking
for a way of having the php program just start the perl program but
not wait for it to complete before sending back the status to flash.
From all the possible PHP commands, exec(), shell_exec(), passthru()
and system(), it seems that they all wait for the called program to
finish, is there a way to just start the program and not wait for it
to complete?
The other method would be to send the results back to flash prior to
calling the perl program and not care how long perl took to do its
job. Would flush() and ob_flush() be sufficient to force this
information out to flash (the only information being sent back is
"result=saved" or "result=fail")?
If this is not possible, then on the perl side (crossposted to
comp.lang.perl.misc for this question), is there a way of having a
script take the command line arguments passed by php's shell() and
forking (is this right term?) the real perl program and ending so that
php is not waiting for the real program to finish?
Bill H
I have a flash program that posts user enter data to a php program on
the server.
The php program then saves this data in a database and then uses system
() to call the perl program which takes the data and generates a pdf
file and thumbnail images.
The php program, on completion of the perl program then sends a status
back to flash telling it was done. Flash then calls the php script to
get thes thumbnails for the view to see. This process can take 10 or
more seconds on the perl side to complete.
We are changing the flash aplication so that there is no need for it
to display the thumbnails after posting the data over and I am looking
for a way of having the php program just start the perl program but
not wait for it to complete before sending back the status to flash.
From all the possible PHP commands, exec(), shell_exec(), passthru()
and system(), it seems that they all wait for the called program to
finish, is there a way to just start the program and not wait for it
to complete?
The other method would be to send the results back to flash prior to
calling the perl program and not care how long perl took to do its
job. Would flush() and ob_flush() be sufficient to force this
information out to flash (the only information being sent back is
"result=saved" or "result=fail")?
If this is not possible, then on the perl side (crossposted to
comp.lang.perl.misc for this question), is there a way of having a
script take the command line arguments passed by php's shell() and
forking (is this right term?) the real perl program and ending so that
php is not waiting for the real program to finish?
Bill H