#23282 [Bgs->Csd]: include and require break with "./"

From: Date: Tue, 29 Apr 2003 10:19:45 +0000
Subject: #23282 [Bgs->Csd]: include and require break with "./"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38699@lists.php.net to get a copy of this message
ID: 23282 User updated by: russell+php dot net at loosenut dot com Reported By: russell+php dot net at loosenut dot com -Status: Bogus +Status: Closed Bug Type: Scripting Engine problem Operating System: Solaris PHP Version: 4.3.2RC1 New Comment: Just a confirmation that I've tried and verified that this is fixed in 4.3.2RC2 released for beta earlier today -- identical config files and compilation options. Previous Comments: ------------------------------------------------------------------------ [2003-04-22 03:15:12] rasmus@php.net RC1 is rather old and there may have been a bug in that. No idea. Try current 4.3 CVS from http://snaps.php.net ------------------------------------------------------------------------ [2003-04-22 03:10:19] russell+php dot net at loosenut dot com Well, the "this is how it's supposed to work" was a tad unclear. Is there something else I can provide that could help you figure out what was happening? This is basically a "straight out of the box configuration" and, as I said, swapping back to an older version of PHP "works just fine." On this server, I'm using the packaged "php.ini-recommended" file, only slightly modified: -- begin % diff -c php.ini php.ini-recommended *** php.ini Mon Apr 7 03:30:42 2003 --- php.ini-recommended Sun Mar 2 17:31:48 2003 *************** *** 229,236 **** ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! ;expose_php = On ! expose_php = Off ;;;;;;;;;;;;;;;;;;; --- 229,235 ---- ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ! expose_php = On ;;;;;;;;;;;;;;;;;;; -- end ------------------------------------------------------------------------ [2003-04-22 00:59:32] rasmus@php.net This works just fine in PHP 4.3. The output from your test script here is: Including file: File Successfully Included Including file with dot-slash: File Successfully Included There must be something else going on you aren't telling us about. ------------------------------------------------------------------------ [2003-04-21 21:49:54] philip@php.net Woah, is this report really saying that include './foo.php' will no longer work?! Why? This would be a huge BC issue. ------------------------------------------------------------------------ [2003-04-21 13:20:53] russell+php dot net at loosenut dot com Well, this effectively breaks relative directory includes, then... you can no longer write complex scripts that "know" their own directory structure, doing something like: include( "../include/db.inc" ); ..or similiar, since the "." b0rks the inclusion. IMO this is bad behaviour (and contrary to the way relative file pathing works in either the UN*X shell or the simply the web itself). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23282 -- Edit this bug report at http://bugs.php.net/?id=23282&edit=1

« previous php.bugs (#38699) next »