By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,420 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

calling a wget to run in background?

P: n/a
LRW
In a PHP script I have the following two lines:

$thumbproc = escapeshellcmd("wget -q -T 2000 http://(A
URL)/pa-thumbs/createthumbs.php?dir=".$order_po." &");
exec("$thumbproc 2>&1", $output);

Works perfectly...except, it always waits until it finished with the
wget before it continues in the script.
Normally this wouldn't be a problem, except this wget is calling a
page that's doing some image manipulation that can take up to two
minutes to complete.

In the meantime I've added an echo at the top of the page saying
"please wait..." but there's got to be a way to have it send the wget
command in the background.

And I read the wget MAN, and that's what the -q and the & were for, I
thought.

What am I missing?

Thanks!
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You're missing the PHP manual.

http://www.php.net/ look up program execution functions

"LRW" <de**@celticbear.com> wrote in message
news:3a**************************@posting.google.c om...
In a PHP script I have the following two lines:

$thumbproc = escapeshellcmd("wget -q -T 2000 http://(A
URL)/pa-thumbs/createthumbs.php?dir=".$order_po." &");
exec("$thumbproc 2>&1", $output);

Works perfectly...except, it always waits until it finished with the
wget before it continues in the script.
Normally this wouldn't be a problem, except this wget is calling a
page that's doing some image manipulation that can take up to two
minutes to complete.

In the meantime I've added an echo at the top of the page saying
"please wait..." but there's got to be a way to have it send the wget
command in the background.

And I read the wget MAN, and that's what the -q and the & were for, I
thought.

What am I missing?

Thanks!

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.