Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43691 invoked from network); 26 Oct 2009 01:25:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2009 01:25:14 -0000 Authentication-Results: pb1.pair.com header.from=daniel@zoltak.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=daniel@zoltak.com; spf=permerror; sender-id=softfail Received-SPF: error (pb1.pair.com: domain zoltak.com from 203.16.214.140 cause and error) X-PHP-List-Original-Sender: daniel@zoltak.com X-Host-Fingerprint: 203.16.214.140 ipmail02.adl6.internode.on.net Received: from [203.16.214.140] ([203.16.214.140:8636] helo=ipmail02.adl6.internode.on.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/38-29882-67AF4EA4 for ; Sun, 25 Oct 2009 20:25:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcFAB6W5EqWZZo2/2dsb2JhbACBT6JUsUWEPwSCXQ Received: from ppp154-54.static.internode.on.net (HELO zoltak.com) ([150.101.154.54]) by ipmail02.adl6.internode.on.net with SMTP; 26 Oct 2009 11:55:06 +1030 Received: (qmail 26723 invoked from network); 26 Oct 2009 01:25:05 -0000 Received: from unknown (HELO localhost) (127.0.0.1) by 127.0.0.1 with SMTP; 26 Oct 2009 01:25:05 -0000 Received: from myob.com.au (myob.com.au [203.34.100.2]) by webmail.zoltak.com (Horde MIME library) with HTTP; Mon, 26 Oct 2009 12:25:05 +1100 Message-ID: <20091026122505.lt6uce2m4gsk08os@webmail.zoltak.com> Date: Mon, 26 Oct 2009 12:25:05 +1100 To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) Subject: move_uploaded_file open_basedir check warning From: daniel@zoltak.com Hi, I have a virtual host setup as follows: ServerName www.domain.com ServerAlias *.domain.com DocumentRoot /home/domain.com php_admin_value upload_tmp_dir "/tmp/php_upload" php_admin_value open_basedir /home/domain.com/:/usr/local/lib/php /tmp/php_upload and /home/domain.com and on a different file system. When performing a file upload the upload is successfully however the =20 following warning is displayed: Warning: move_uploaded_file() [function.move-uploaded-file]: =20 open_basedir restriction in effect. File(/tmp/php_upload/phpsrRDr6) is =20 not within the allowed path(s): (/home/domain.com/:/usr/local/lib/php) =20 in /home/domain.com/upload_do.php on line 15 The setup runs PHP 5.2.10. As the documentation defines the source path does not need be in =20 open_base_dir. The functionality is completing so it appears to being =20 abiding by this but the warning message is being displayed. I believe the issue may reside in the function php_copy_file_ex. php_copy_file_ex calls the function php_plain_files_stream_opener in =20 main/streams/plain_wrapper.c. php_plain_files_stream_opener calls the =20 open base check on the source path. It appears for some reason =20 STREAM_DISABLE_OPEN_BASEDIR may be being ignored? Can someone shed some light on this. Thanks