#41174 [NEW]: ftp_rawlist not work with open_basedir

From: Date: Tue, 24 Apr 2007 07:34:52 +0000
Subject: #41174 [NEW]: ftp_rawlist not work with open_basedir
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111839@lists.php.net to get a copy of this message
From: valqk at lozenetz dot net Operating system: FreeBSD 6.2 PHP version: 5.2.1 PHP Bug Type: FTP related Bug description: ftp_rawlist not work with open_basedir Description: ------------ I've found a bug report like this but it was with state closed. This _is_ a bug or at least a lack of features. There must be a way to set tmp-file creation of this functions, but setting TMPDIR environment variable doesn't work each time. I don't want to include /tmp dir in open_basedir directories. Reproduce code: --------------- <?php putenv('TMPDIR=/home/vhosts/test.com/httpd/tmp'); echo getenv('TMPDIR'); $cnid = ftp_connect("example.com"); $login_result = ftp_login($cnid, "user", "pass"); $out = ftp_rawlist($cnid, '/'); ftp_close($cnid); print_r($out); ?> Expected result: ---------------- listing of files Actual result: -------------- /home/vhosts/test.com/httpd/tmp Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/vhosts/test.com/httpd/tmp:/usr/lib/php:/usr/local/lib/php) in /home/vhosts/test.com/httpd/tmphtdocs/a.php on line 15 Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /home/vhosts/test.com/httpd/htdocs/a.php on line 15 bool(false) -- Edit bug report at http://bugs.php.net/?id=41174&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41174&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41174&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41174&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41174&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41174&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41174&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41174&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41174&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41174&r=support Expected behavior: http://bugs.php.net/fix.php?id=41174&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41174&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41174&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41174&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41174&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41174&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41174&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41174&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41174&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41174&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41174&r=mysqlcfg

« previous php.bugs (#111839) next »