Reply to Timing out exec/shell command

Your name:

Reply:


Posted by Easynews on 09/29/63 11:34

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.

I recently tried the following that I found in a post, but it still causes
the original script to hang:

proc_close(proc_open ("mount -r -t cifs -o
user=$adminuser,pass=$adminpass,domain=$domain //$ip/$sha
rename $sharedir/$hostname/$sharename &", array(), $foo));

Can anyone suggest something? As a last resort I will have the first PHP
script run a perl script with the Alarm function, but I was hoping PHP could
do everything I need.

Thanks,
Max

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация