Re: System(), exec(), Passthru(), etc

From: Date: Fri, 05 Oct 2001 08:51:40 +0000
Subject: Re: System(), exec(), Passthru(), etc
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-70048@lists.php.net to get a copy of this message
On Fri, 5 Oct 2001 13:54, ReDucTor wrote: > ----- Original Message ----- > From: "David Robley" <huntsman@www.nisu.flinders.edu.au> > To: "ReDucTor" <sjdtmv@tpg.com.au>; <php-general@lists.php.net> > Sent: Friday, October 05, 2001 2:21 PM > Subject: Re: [PHP] System(), exec(), Passthru(), etc > > > On Fri, 5 Oct 2001 13:19, ReDucTor wrote: > > > I can't seem to get a return value, while using the functions, it > > > just puts a 0 on the page, i try putting a <br> after i do the > > > system call, still all that is on the page, 0, something is wrong, > > > anyone know why?!? > > > > > > I got no telnet access, and i want to do some cron jobs :D > > > > > > - James "ReDucTor" Mitchell > > > > Perhaps if you show how you are doing this, it might be easier to > > help. Are you for instance using the return_var argument? > > > > And in some cases, 0 is a valid return value; some programs may not > > return a value at all. > > > > php-list-admin@lists.php.net > echo System("crontab -l", $var)."<br>"; > echo $var; I doubt that crontab is likely to return an exit status - there's nothing in the man page to indicate it, and it is an interactive app (mostly). You might get a return from the _shell_ if it failed to execute crontab for wahtever reason. Wiser heads than mine may be able to offer more info; or scratch around in the crontab source. (I was going to say older heads, but that cuts the options down considerably) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA That must be wonderful! I don't understand it at all.

« previous php.general (#70048) next »