#23862 [Opn->Bgs]: include_once no longer will include main file

From: Date: Thu, 29 May 2003 19:50:24 +0000
Subject: #23862 [Opn->Bgs]: include_once no longer will include main file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40660@lists.php.net to get a copy of this message
ID: 23862 Updated by: wez@php.net Reported By: jason at rpdesign dot com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: Gentoo Linux PPC PHP Version: 4.3.1 New Comment: This is the expected behaviour. Not a bug in PHP. Previous Comments: ------------------------------------------------------------------------ [2003-05-29 13:24:30] jason at rpdesign dot com The file has not been included yet. When I put function definitions in the file, the functions aren't defined. When I put syntax errors in the file, they are not reported. The file has not been executed or even parsed. I think it should definately not be marked as "included". ------------------------------------------------------------------------ [2003-05-29 13:17:24] iliaa@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Since the file was already included, the include_once fails, this is expected behaviour. ------------------------------------------------------------------------ [2003-05-28 14:00:05] jason at rpdesign dot com include_once will not include the file that the browser has requested. even if it has not been executed yet (from withith the auto_prepend_file.) I am using mod_php with apache 2. In my .htaccess file I have: php_value auto_prepend_file prep.php in prep.php I have: ... # Get the name of the file requested from the browser $mainfile = ereg_replace('.*/', '', $_SERVER['SCRIPT_FILENAME']); include_once($mainfile); This now does nothing. With php 4.2.1 on your x86 RedHat box this works fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23862&edit=1

« previous php.bugs (#40660) next »