Click to See Complete Forum and Search --> : exec() in W2K/IIS/PHP


munuindra
09-24-2002, 06:46 PM
Hi,

I have the following script in the testing.php file and it doesn't produce any output.

Script Detail:

testing.php

<?php
$runstr = "perl XYZ/testing.pl";
echo $runstr;
$x = exec ("$runstr", $antwort);
?>

testing.pl

print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";

print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Perl Test Page</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H3>This is a test to see if Perl is Working</H3>\n";
print "<P>\n";
print "<H5>If you can see this, Perl is properly configured</H5>\n";
print "</BODY>\n";
print "</HTML>\n";

Environment:
W2K/IIS5.0/PHP4/ActivePerl

Can you guys tell me what I am missing in this code?

Thanks,
Suresh.

mattwade
10-07-2002, 11:24 PM
The exec function doesn't output anything. Try using passthru instead...

cvlug
03-17-2003, 05:03 PM
I tried passthru as well, wuthout any luck.

Any other solutions?