[PHP] exec timing out, want to leave process running in bg
I'm trying to develop a front-end using php for mpg123 so that various members of my household don't need to access a shell to start/play music. I'm using something similiar to exec('$null'), w/ $null being equal to "mpg123 -y -Z --all >/dev/null/ &". The problem I'm having, is about 5 minutes after it starts, it dies, with no core dump or anything, the process just stops. I'm sure this is done so that a process won't run forever in the background (bonus/bug), but what if that's what I want? Is there any work around? This is using php4.0.4pl1 and FreeBSD 4.0 release with apache 1.3.12. Thanks in advance. PKnull -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] preprocessing
I have what I feel to be a strange problem (I'm most likely wrong here). I have page A, which is an internal page, which posts to page C which is external (belongs to another company). What I would like is to insert a preprocessing script (let's call it page b). So, the end result would be, users input data to page a, page a then posts to page b, page b processes all variables etc and then posts to page c. I don't want the customer, to ever really have to interact with page b. Is that possible? If there is a command to do this, which I must've missed, that would really be all I need ;) Louis G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re: [PHP] preprocessing
Unfortunately, I don't control page c, or else this would be a mute point. That's why I need page B. Good idea though. >At 10:18 AM 5/17/01 -0700, [EMAIL PROTECTED] wrote: >>I have what I feel to be a strange problem (I'm most likely wrong here). >>I have page A, which is an internal page, which posts to page C which is >>external (belongs to another company). What I would like is to insert a >>preprocessing script (let's call it page b). So, the end result would be, >>users input data to page a, page a then posts to page b, page b processes >>all variables etc and then posts to page c. I don't want the customer, to >>ever really have to interact with page b. Is that possible? >>If there is a command to do this, which I must've missed, that would >>really be all I need ;) >You can have tons of processing going on in a php script, but it sounds >like what you need is to do the processing at the top of page C, then once >that's done, generate output to the user as page C is doing now. Just put >the processing code on top of the page, and you should be ok. >Might need a while statement to check if it's "done" before proceeding. >-- >Dave's Engineering Page: http://www.dvanhorn.org >Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re: [PHP] preprocessing
This is a fairly solid suggestion, and it may be what I have to do. But, unfortunately, Page C is expecting a POST, not a GET, which may make it not work. Also, I would like to avoid this if possible due to some of the sensitive information that will be being passed to and fro. Even if it will be done using SSL. >Try going to the page with the vars you need in the URL. i.e.: >http://www.www.com/cgi-bin/script?var1=test&var2=testing >If that works then just use a simple header location forward in script 'b': >// process vars >header("LOCATION:http://www.www.com/cgi-bin/script?var1=test&var2=testing";); >That way the user will never have to interact with page 'b'. Note: do not start >any output before the header command. >If that doesn't work then there should be some other way of assembling cgi-post >headers with the header() function. >Good Luck. >Nathan Cook >[EMAIL PROTECTED] >- Original Message - >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, May 17, 2001 11:18 AM >Subject: [PHP] preprocessing >> >> I have what I feel to be a strange problem (I'm most likely wrong here). >> I have page A, which is an internal page, which posts to page C which is >external (belongs to another company). What I would like is to insert a >preprocessing script (let's call it page b). So, the end result would be, users >input data to page a, page a then posts to page b, page b processes all >variables etc and then posts to page c. I don't want the customer, to ever >really have to interact with page b. Is that possible? >> If there is a command to do this, which I must've missed, that would really be >all I need ;) >> >> Louis G >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Array Cleansing
Maybe someone could help with this? I'm trying to remove white space values from my array, and resequence them, so that the following: foo[0] = "value", foo[1] = " ", foo[2] = "value", foo[3] = " ", foo[4] = "value" after running through a piece of code would turn into foo[0] = "value", foo[1] = "value", foo[2] = "value", foo[3] = null, foo[4] = null, The code I wrote, and deleted out of frustration ended up with all of the variables equal to null. Maybe someone could show me the proper way? PKshifted -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Array Cleansing
This is the code I'm currently using /* testing stuff */ echo "\n"; /* end of test */ And this is the output I'm getting