ID: 19292 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Apache related Operating System: linux PHP Version: 4.3.0-dev,4.2.3 New Comment:
Update: Upon closer inspection, I'm getting the same error occasionally from simply loading my testfile2.php script, it seems to be a general PHP problem rather than relatedd specifically to the include() or any other function. I have not tested any version subsequent to 4.2.3 as I don't have a development system available. Previous Comments: ------------------------------------------------------------------------ [2002-10-15 22:48:23] [EMAIL PROTECTED] Rasmus: Here is the code I have just used to test this issue: testfile1.php: <? include( "testfile2.php" ); ?> testfile2.php: <? echo "testing..."; ?> When trying to load testfile1.php, it works approx. 80% of the time, displaying 'testing...' in the browser. However, about one time in 5 it displays the following error: Warning: open_basedir restriction in effect. File is in wrong directory in Unknown on line 0 Warning: Failed opening '/home/httpd/html/testfile1.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 (Note it says it is unable to open the main file, not the one I'm trying to include in my script) ------------------------------------------------------------------------ [2002-10-15 21:48:18] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Please try the snapshot so we know whether this is fixed or not. ------------------------------------------------------------------------ [2002-10-15 14:45:17] [EMAIL PROTECTED] I'd still like to see a solid reproducable example of this bug in the current code. Half of these reports are bogus. Of course setting stuff to $DOCUMENT_ROOT doesn't work. It never has. My current feeling is that this has nothing to do with open_basedir at all but might be a memory corruption elsewhere causing the setting to be wiped out. One such memory issue was fixed in 4.3. ------------------------------------------------------------------------ [2002-10-14 18:41:36] [EMAIL PROTECTED] [EMAIL PROTECTED]: I'm using the full path name as the argument for open_basedir and still experiencing this issue with 4.2.3... ------------------------------------------------------------------------ [2002-10-14 14:31:28] [EMAIL PROTECTED] Upgraded to 4.2.3, and found a way to produce the problem and my fix. In the <VirtualHost>, if I use the following statement I get the error: php_admin_value open_basedir $DOCUMENT_ROOT However, if I specify a path instead of the variable, it works just fine: php_admin_value open_basedir /home/netgram/public_html It would still be very nice to use a variable instead of retyping information. Hope this helps! ------------------------------------------------------------------------ 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/19292 -- Edit this bug report at http://bugs.php.net/?id=19292&edit=1