#19291 [Opn->Fbk]: Include file failure with PHP 4.2.3
ID: 19291
Updated by: sander@php.net
Reported By: fillmore@NRCan.gc.ca
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Solaris 8
PHP Version: 4.2.3
New Comment:
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)?
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2002-09-08 10:24:57] fillmore@NRCan.gc.ca
Some PHP scripts that worked fine in 4.2.2 now fail in 4.2.3 with a
message:
"Fatal error: Call to undefined function: requireversion() in
/home1/fast1/WWW-data/ess/_ess.php on line 11"
The file _ess.php is included in the main file index_e.php as follows:
require_once("_ess.php");
The "requireversion" function is defined in the file _lib.php, which is
included
in the file _ess.php as follows:
if(file_exists("_lib.php")){
require_once("_lib.php");
}
//this requires version 4.2+
requireversion('4.2');
We are using the NSAPI (iPlanet 4.x) version of PHP.
Thanks,
Bob Fillmore
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19291&edit=1
Thread (10 messages)