|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-25 18:37 UTC] tony2001@php.net
[2007-07-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 21:00:01 2025 UTC |
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