|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-21 22:09 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 04:00:02 2025 UTC |
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)