Re: system() Question

From: Date: Mon, 29 Dec 2008 01:49:05 +0000
Subject: Re: system() Question
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-285172@lists.php.net to get a copy of this message
On Sun, Dec 28, 2008 at 18:10, Rick Pasotto <rick@niof.net> wrote: > > You overlooked the ampersand in front of $retval. The syntax for > 'system' is: > > string system ( string $command [, int &$return_var ] ) > > You have to pass a pointer to the variable, not the variable itself. Actually, that's not entirely correct.... while the documentation shows it as a reference variable, it's not actually required to be a pointer. And in either case, the OP had the error code returned (127), and $retval would have nothing to do with causing the error. What I would recommend trying is: <?php exec('./gpsbabel -p "" -r -t -i gpx -f "test.gpx" -o kml -F "test2.kml" 2>&1',$ret); print_r($ret); ?> On a side note, I'm curious as to what 'gpsbabel' does. I've worked a bit with Keyhole markups and GIS overlays, etc. Neat stuff. -- </Daniel P. Brown> daniel.brown@parasane.net || danbrown@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out!

« previous php.general (#285172) next »