Re: Exec()
| From: | Guido E. Smit | Date: | Thu, 12 Apr 2001 19:03:32 +0000 |
| Subject: | Re: Exec() | ||
| References: | 1 2 3 4 5 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-6682@lists.php.net to get a copy of this message | ||
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
Manager Internet Services
ComLog B.V.
Ambachtsmark 81
1355 EG Almere
The Netherlands
Tel. : +31 36 5470500
Fax. : +31 36 5470481
HOT TIP: http://www.siteupdate.nl
____________________________________________________________________________
________________________________________
This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed.
This email represents the originator's personal views and opinions, which do
not necessarily reflect those of ComLog Internet B.V. If you are not the
original recipient, any use, dissemination, forwarding, printing, or copying
of this email is strictly prohibited. If you received this email in error,
please notify guido@comlog.nl.
____________________________________________________________________________
________________________________________
""Patrick"" <patrickolson@qwest.net> wrote in message
news:9b3vd2$pek$1@toye.p.sourceforge.net...
>
> ""Helmut Himmelstoss"" <Helmut.Himmelstoss@t-online.de> wrote in
> message
> news:9b21na$iu7$1@toye.p.sourceforge.net...
> > I copied the Program Ping.exe to the same directory as my script and the
> > User the IUSR_[Machine name] hast the permissions.
> >
> > <?php
> > echo"<pre>";
> > $dd=system("ping ping 127.0.0.1");
> > echo "$dd ;;this is a system-test";
> > echo "<hr>";
> > ?>
> > The result is the same.......... no result:
> > ;;this is a system-test
> >
> you must use single quotes in system() call
> ping ping whats that check your erorr logs
> this worked for me
> <?
> file://escaping the backslash and in single quotes
> file://this works for win98/apache/php4apache.dll
> file://NOTE: this and the php4isapi.dll is not yet ready
> file://for production, if CGI MODE then I do think it should work
>
> echo"<pre>";
> $dd=system('c:\\windows\\ping 127.0.0.1');
> echo "$dd ;;this is a test";
> echo"</pre>";
> ?>
> printed this out
> Pinging 127.0.0.1 with 32 bytes of data:
>
>
>
> Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
>
> Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
>
> Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
>
> Reply from 127.0.0.1: bytes=32 time=1ms TTL=128
>
>
>
> Ping statistics for 127.0.0.1:
>
> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
>
> Approximate round trip times in milli-seconds:
>
> Minimum = 1ms, Maximum = 1ms, Average = 1ms
>
> Minimum = 1ms, Maximum = 1ms, Average = 1ms ;;this is a test
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>