|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-21 02:19 UTC] felipe@php.net
[2011-05-21 03:24 UTC] pajoye@php.net
-Status: Open
+Status: Duplicate
[2011-05-21 10:27 UTC] superaap at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 08:00:01 2025 UTC |
Description: ------------ Our VirtualHost points to a symlink which links to the document_root of the current application version. Example directory list; l /var/www/html/application -> /var/www/html/application-v1.2.3 d /var/www/html/application-v1.2.2 d /var/www/html/application-v1.2.3 Before v5.3 (5.2.4 I think) using the entire symlink path as open_basedir value would sitll trigger open_basedir error's. We worked around this problem by using the partial suffix '/var/www/html/app'. This behaviour was fixed when we upgraded to v5.3.2 were the entire symlink path would work as well, but we did not bother to update all our vhost's as both methods now worked. But now we have upgraded to v5.3.6 the partial paths no longer work. Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/var/www/html/application-v1.2.3/bootstrap.php) is not within the allowed path(s): (.:/var/www/html/app) This behaviour seems to be broken since r305698 where the open_basedir is always appended with a directory separator; --- php/php-src/trunk/main/fopen_wrappers.c 2010/11/23 21:49:18 305697 +++ php/php-src/trunk/main/fopen_wrappers.c 2010/11/23 22:14:54 305698 @@ -233,6 +233,9 @@ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; } + } else { + resolved_basedir[resolved_basedir_len++] = PHP_DIR_SEPARATOR; + resolved_basedir[resolved_basedir_len] = '\0'; } resolved_name_len = strlen(resolved_name); I don't think this change was intended because it is not listed in the changelog, and breaks backward compatibility in a minor release.