|
Posted by Easynews on 09/25/06 11:34
"ZeldorBlat" <zeldorblat@gmail.com> wrote in message
news:1134272377.896009.228450@z14g2000cwz.googlegroups.com...
>
> Easynews wrote:
>> I've looked back at some old posts, and all seem to point to no answer
>> for
>> this. These posts were old so I'm wondering if there if someone has come
>> up
>> with anything new lately.
>>
>> Basically I have one PHP command line script that uses the exec funtion
>> to
>> open a 2nd PHP script. The 2nd PHP script runs the 'mount' command to
>> mount
>> some cifs shares. Occasionally the mount command will hang on certain
>> shares
>> of computers. Is there anyway that I can timeout an exec command so that
>> it
>> continues on? I thought a read something about being able to timout
>> backticks? I can use backticks if needed, but I'm not sure how that
>> works.
>>
>> Thanks,
>> Max
>
> Did you look in the manual under exec() ?
>
> <http://us3.php.net/manual/en/function.exec.php>
>
> "Note: 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."
Yes, I saw this, but can not figure out how to get it to work. I've also
tried the following that I found in an older post that was supposed to do
the trick, but it didn't work either, the original PHP script still hangs:
proc_close(proc_open ("mount -r -t cifs -o
user=$adminuser,pass=$adminpass,domain=$domain //$ip/$sha
rename $sharedir/$hostname/$sharename &", array(), $foo));
Any other suggestions?
Thanks,
Max
Navigation:
[Reply to this message]
|