473,378 Members | 1,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to start script in the background (using exec())?

Hi!

I have some troubles trying to start php script using exec() and leave
it running in the background.

Manual says: "If you start a program using this function and want to
leave it running in the background, you have to make sure that the
output of that program is redirected to a file or some other output
stream or else PHP will hang until the execution of the program ends."

So, I'm doing this:
exec("/usr/local/bin/php /mydir/myscript.php >/dev/null 2>/dev/null
&");

I don't recieve any output from "child" script, but "parent" script
waits until "child" is doing its work.

What should I do to achive my goal?

--
Adios!
Jul 17 '05 #1
0 2050

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nasir Wasim | last post by:
How can Access DIV Properties in Script while using Netscape 7.2. I want to use the div id with it's Visibility and left propertyin script but it's not working :-( Main File : ----------- ...
2
by: Not Me | last post by:
Hey, Coming back to a piece of work I did a while back, which used a stored procedure to populate a list box. The SP takes a single parameter, and I think this is the reasoning for using 'exec'...
0
by: muntyanu | last post by:
Hi All, I got permission issue when accesing network files from the application that was started using Process component. Actually I have my .NET windows service running. From this service I...
0
by: Nathan Sokalski | last post by:
I am trying to make a transparent background using the Bitmap and Graphics classes by setting the alpha value. However, it looks like what is happening is that it is being painted on top of the...
0
by: hunki | last post by:
Does anybody have a start script for JBOSS on Solaris . ( /etc/init.d/jboss) thanks, hunki
1
by: ksn2007 | last post by:
Hi All, I have to run a shell script from my php script and while shell script is running I have to do some other tasks in my php script.To run the shell script I am using ...
0
by: Chris Rebert | last post by:
On Fri, Nov 14, 2008 at 10:40 AM, Indian <write2abdul@gmail.comwrote: You don't need and shouldn't be using `exec` here. It appears as though you're just doing the following in a much more obtuse...
33
sword117
by: sword117 | last post by:
Im trying to create a video background using frames from a video, and using a timer to run the frames 30FPS , can someone help me out? its for a school project. im here so far, i can make this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.