say i have the following two php scripts:
ptest.php:
<?
$p1 = popen("c:\\php\ \php -q hello.php","r") ;
$p2 = popen("c:\\php\ \php -q hello.php","r") ;
while (!feof($p1))
print fgets($p1);
while (!feof($p2))
print fgets($p2);
pclose($p1);
pclose($p2);
?>
and
hello.php:
<?
print "hello,\nworld! \n";
?>
when i run ptest.php via the command line (ie. by typing in c:\php\php
ptest.php at the dos prompt) it runs instantly.
when i run ptest.php via a webserver, the resultant page not only
doesn't even load - it results in a bunch of errors (that appear as
dialogue boxes on the machine doing the hosting) effectively saying
that the command failed to execute properly and will now be shut down.
after clicking through all the errors, the systems performance is
noticebly affected (and in fact is bad enough such that i think a
reboot is justified).
any ideas as to why this is, and what i can do to fix it?
ptest.php:
<?
$p1 = popen("c:\\php\ \php -q hello.php","r") ;
$p2 = popen("c:\\php\ \php -q hello.php","r") ;
while (!feof($p1))
print fgets($p1);
while (!feof($p2))
print fgets($p2);
pclose($p1);
pclose($p2);
?>
and
hello.php:
<?
print "hello,\nworld! \n";
?>
when i run ptest.php via the command line (ie. by typing in c:\php\php
ptest.php at the dos prompt) it runs instantly.
when i run ptest.php via a webserver, the resultant page not only
doesn't even load - it results in a bunch of errors (that appear as
dialogue boxes on the machine doing the hosting) effectively saying
that the command failed to execute properly and will now be shut down.
after clicking through all the errors, the systems performance is
noticebly affected (and in fact is bad enough such that i think a
reboot is justified).
any ideas as to why this is, and what i can do to fix it?
Comment