ID:               41710
 Updated by:       [EMAIL PROTECTED]
 Reported By:      eric at pixelhammer dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Linux version 2.6.9-42.0.3.ELsmp
 PHP Version:      5.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:
------------------------------------------------------------------------

[2007-06-15 22:00:14] eric at pixelhammer dot net

Description:
------------
executing proc_open produces the following in the error log...

PHP Warning: proc_open(/home/vhosts/tmp/error-ANP-24551.txt)
[function.proc-open]: failed to open stream: Operation not permitted in
/home/xxx/object/xxx.php on line 222

PHP Warning: proc_open() [function.proc-open]: open_basedir restriction
in effect. File(/home/vhosts/tmp/error-ANP-24551.txt) is not within the
allowed path(s):
(/var/www/:/home/vhosts/xxx.com/:/home/xxx/:/var/qmail/control/:/home/vhosts/lib/keys/:/home/vhosts/tmp/:/data1/backup_exempt/log/phpErrorLog/)
in /home/xxx/object/xxx.php on line 222

Reproduce code:
---------------
$descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe",
"w"), 2 => array("file", '/home/vhosts/tmp/error-ANP-24551.txt', "a"));
$pipe = array();
$proc = "echo " . escapeshellarg($dataString) . " | /usr/bin/gpg -a -e
--batch --no-secmem-warning --homedir " . $this->keyFileDir . " -r " .
$this->encryptTo . " -o -";
$process = proc_open($proc, $descriptorspec, $pipe);


Expected result:
----------------
proc_open should return a valid resource and data can be retreived with
the following...

fclose($pipe[0]);
$data = stream_get_contents($pipe[1]);
fclose($pipe[1]);
proc_close($process);


Actual result:
--------------
proc_open does not return a valid resource.  This code was working
before the upgrade to php 5.2.3


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41710&edit=1

Reply via email to