Re: Exec()

From: Date: Fri, 13 Apr 2001 08:27:54 +0000
Subject: Re: Exec()
References: 1 2 3 4 5 6  Groups: php.windows 
Request: Send a blank email to php-windows+get-6701@lists.php.net to get a copy of this message
""Guido E. Smit"" <guido@comlog.nl> wrote in message news:9b4tur$6ah$1@toye.p.sourceforge.net... > I have the same problem, running W2K and IIS5: > print "<HTML>\n"; > exec('LUII.exe rpc3.ingrammicro.com 058DY12 1', $returnstring, $returnvar); > print "Return var: ".$returnvar."<BR>\n"; > print "Printing output ".count($returnstring)." lines:<BR>\n"; > print "<PRE>\n"; > while (list($line, $text) = each($returnstring)) > { > print "$line $text<BR>\n"; > } > print "</PRE>\n"; > > works fine on the commandline. In a browser no value returned at all. Even > the array stays empty (0). > Logs are clean. No errors, nothing. I'm allmost desperate. > > > -- Guido Smit while I dont have IIS this sounds like a permission problem because you can run it from the command prompt. However you may want to try full tags if using NS it will not load the page unless the <html><body></body></html> tags are there. <? print "<HTML>\r\n"; print "<HEAD>\r\n"; print "<TITLE> New Document </TITLE>\r\n"; print "</HEAD>\r\n"; print "<BODY>\r\n"; exec('copy c:\\monsys.zip d:\\', $returnstring, $returnvar); print "Return var: ".$returnvar."<BR>\r\n"; print "Printing output ".count($returnstring)." lines:<BR>\r\n"; print "<PRE>\r\n"; while (list($line, $text) = each($returnstring)) { print "[$line] $text<BR>\r\n"; } print "</PRE>\r\n"; print "</BODY>\r\n"; print "</HTML>\r\n"; ?> output... Return var: 0 Printing output 1 lines: [0] 1 file(s) copied Have fun I am

« previous php.windows (#6701) next »