Re: Launch vmware server with php script and apache

From: Date: Thu, 13 Mar 2008 16:52:08 +0000
Subject: Re: Launch vmware server with php script and apache
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-271530@lists.php.net to get a copy of this message
On Thu, Mar 13, 2008 at 12:01 PM, Daniel Brown <parasane@gmail.com> wrote: > Try rewriting the above as follows: [code snip] > > However, I'm not really certain why you need to call the Perl > script. What I would consider doing myself is the following: [code snip] Sorry, I got jumpy with the Send button and hadn't fixed the rest of the post before sending. I think that I'm doing too many things at once. <?php exec('whoami',$who); echo "Attempting to launch VMWare process as ".$who[0].".<br />\n"; exec('/usr/bin/vmware & 2>1',$ret,$err); echo isset($err) && $err != 0 ? "Error code: ".$err."<br />\n" : null; echo "Output is as follows:<br />\n"; echo "<pre />\n"; print_r($ret); echo "</pre>\n"; ?> The error redirect to STDOUT should print out whatever error messages are being received by the script. -- </Daniel P. Brown> Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283

« previous php.general (#271530) next »