popen returns true whether script exists or not?

From: Date: Tue, 14 Aug 2001 18:15:41 +0000
Subject: popen returns true whether script exists or not?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62680@lists.php.net to get a copy of this message
Hi, I'm trying to popen a cgi script that was designed to be open via a SSI include, but cannot because of passing variable restrictions. I'm popening a cgi script and it is returning a process pointer regardless of whether the string passed to it points to anything. Is this the expected response? <? $p = popen( "/web/guide/myfiles/bannerzzzzz.cgi","r" ); ?> this returns a process pointer even though bannerzzzzz.cgi doesn't exist I then need to read the results of the cgi script and dump them to the screen like so; <? while (!feof ($p)) { $buffer = fgets($p, 4096); echo $buffer; } pclose ($p); ?> but this is not functioning, does anyone have any ideas? Regards Tom Hodder

« previous php.general (#62680) next »