473,796 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling a wget to run in background?

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

$thumbproc = escapeshellcmd( "wget -q -T 2000 http://(A
URL)/pa-thumbs/createthumbs.ph p?dir=".$order_ po." &");
exec("$thumbpro c 2>&1", $output);

Works perfectly...exc ept, 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
1 4009
You're missing the PHP manual.

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

"LRW" <de**@celticbea r.com> wrote in message
news:3a******** *************** ***@posting.goo gle.com...
In a PHP script I have the following two lines:

$thumbproc = escapeshellcmd( "wget -q -T 2000 http://(A
URL)/pa-thumbs/createthumbs.ph p?dir=".$order_ po." &");
exec("$thumbpro c 2>&1", $output);

Works perfectly...exc ept, 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8174
by: Martin | last post by:
I have a PHP script that should be run a few times a day. Currently I run this script manually as I haven't been able to set up Lynx or wget to run it as a cronjob. Or to be more specific: the script works, but both wget and Lynx fail after 10 or 20 redirects, then it warns: wget: 20 redirections exceeded. Lynx: Alert!: Redirection limit of 10 URL's reached. What the scripts does is download various HTML pages (allowed by the owners)...
4
3614
by: arenaTR | last post by:
I have some processing I want to do. I have a cgi scrpt that I want to call, it just sends an email. Can I use a simple "header" command for that? But then I want to use "header" again in order actually redirect for a script. Your help is, as always, appreciated. Mike
7
7723
by: Ken | last post by:
How do I call c:\wget\wget.exe from a php or html file? so I can use php variables to define the file names to download. I want to set up wget to download several files from a server to my hard drive so they can be used internally. Ken
8
2418
by: Matthew Bell | last post by:
Hi, I've got a question about whether there are any issues with directly calling attributes and/or methods of a threaded class instance. I wonder if someone could give me some advice on this. Generally, the documentation suggests that queues or similar constructs should be used for thread inter-process comms. I've had a lot of success in doing that (generally by passing in the queue during the __init__ of the thread) and I can see...
2
4776
by: Google Mike | last post by:
I have an RH9 Linux PHP 4.2.2 web page that I need to call a Bash file under the context of root and do the wget command to download a file, clobbering the previous download of this same filename. It's bombing without leaving any trace. I tried introducing all manner of chmod, chown, sudo, and sticky bit, but this fails. The only thing I see in the syslog is failed sudo authenticaiton for user Apache. What's the technique to get this...
9
7756
by: olivier HARO | last post by:
Hello everybody, I have a little problem with a littre program i'm writting : I use the system(char* s) function in my program to retreve an information. The problem is that when wget in launched and as retrieved the file, my program stops instatanly.... So I see two possible solutions :
7
9495
by: petr pilsl | last post by:
sorry - no idea where to post my question, so I crossposted to a linux and a html-authoring-group. Both groups might be familiar with wget. wget -p http://www.goldfisch.at does not load the images embedded in this website. I wonder why? according to the man-page : -p
3
7852
by: Jesse | last post by:
Hi all, I have a problem using wget and Popen. I hope someone can help. -- Problem -- I want to use the command: wget -nv -O "dir/cpan.txt" "http://search.cpan.org" and capture all it's stdout+stderr. (Note that option -O requires 'dir' to be existing before wget is executed) Popen doesn't work, while os.system and shell do. Popen will give the error:
2
3560
by: Don69 | last post by:
I have a problem with PHP where wget generates 0 byte files. Below is the code that I use. // ******************** $savedir = "/webroot/vifs/app/webroot/static/1234567890"; $url = "http://www.google.com"; $test = mkdir( $savedir, 0777);
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.