#39117 [Fbk->Opn]: popen, proc_open, ... don't work under Apache
| From: | xand_smirnov at mail dot ru | Date: | Tue, 10 Oct 2006 15:59:01 +0000 |
| Subject: | #39117 [Fbk->Opn]: popen, proc_open, ... don't work under Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103380@lists.php.net to get a copy of this message | ||
ID: 39117
User updated by: xand_smirnov at mail dot ru
Reported By: xand_smirnov at mail dot ru
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: RHEL 5 beta
PHP Version: 5.1.6
New Comment:
Sorry for wrong PHP version reported in bug header but
I need solution for specific distro RHEL AS 5 Beta1.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2006-10-10 15:23:34] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-10-10 15:18:04] xand_smirnov at mail dot ru
Description:
------------
When you try to use popen, proc_open, ... in your scripts they don't
work under Apache. This problem related only
to RHEL 5 beta with PHP 5.1.4 (meanwhile Fedora 5 working
fine). I suppose the problem lies in Apache build or in
it's new security rules.
Reproduce code:
---------------
<?
$fp = popen("/bin/ls /var/www/html", "r");
fpassthru($fp);
pclose($fp);
?>
OR
<?
$fp = proc_open("/bin/ls
/var/www/html",array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w")),$pipes);
fpassthru($pipes[1]);
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($fp);
?>
Expected result:
----------------
index.php
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39117&edit=1