#19291 [Fbk->Opn]: Include file failure with PHP 4.2.3

From: Date: Sun, 08 Sep 2002 18:47:49 +0000
Subject: #19291 [Fbk->Opn]: Include file failure with PHP 4.2.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18679@lists.php.net to get a copy of this message
ID: 19291 User updated by: fillmore@NRCan.gc.ca Reported By: fillmore@NRCan.gc.ca -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Solaris 8 PHP Version: 4.2.3 New Comment: I ran a quick test with trigger_error as suggested, and saw the following errors: Notice: _lib.php does not exist! in /home1/fast1/WWW-data/ess/_ess.php on line 9 Fatal error: Call to undefined function: requireversion() in /home1/fast1/WWW-data/ess/_ess.php on line 13 So, it looks like it is the "file_exists" problem. - Bob Previous Comments: ------------------------------------------------------------------------ [2002-09-08 13:30:51] sander@php.net Or even easier, set up a the following test script: <?php echo (int) file_exists(basename($_SERVER['PHP_SELF'])); ?> It should print a 1. ------------------------------------------------------------------------ [2002-09-08 13:29:22] sander@php.net Wez asked you that to find out if it was a problem with file_exists(). As an experiment, can you please try adding the else clause as Wez sugested, and see if it spawns errors on all pages (including those where _lib.php should be available)? ------------------------------------------------------------------------ [2002-09-08 13:13:38] fillmore@NRCan.gc.ca I will try to set up a proper test environment for this. Note that this application uses relative path includes- the file _lib.php exists in some directories but not others, so just issuing an error will mess up the application. Using absolute paths for the includes is a bit messy, because they would have to be dynamically built by parsing the URL each time. However, thanks for the suggestion. ------------------------------------------------------------------------ [2002-09-08 12:50:28] wez@php.net Sounds like a dup of #19287 (file_exists fails). Can you amend your script like this: if(file_exists("_lib.php")){ require_once("_lib.php"); } else { trigger_error("_lib.php does not exist!"); } ------------------------------------------------------------------------ [2002-09-08 12:25:45] kalowsky@php.net requireversion? did you mean phpversion? ------------------------------------------------------------------------ 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/19291 -- Edit this bug report at http://bugs.php.net/?id=19291&edit=1

« previous php.bugs (#18679) next »