#19291 [Dup]: Include file failure with PHP 4.2.3

From: Date: Sun, 08 Sep 2002 19:03:02 +0000
Subject: #19291 [Dup]: Include file failure with PHP 4.2.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18681@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:           Duplicate
 Bug Type:         Scripting Engine problem
 Operating System: Solaris 8
 PHP Version:      4.2.3
 New Comment:

Just to be thorough, I also tried the test script with:
<?php echo (int) file_exists(basename($_SERVER['PHP_SELF'])); ?>

It prints a "0", so I guess the bug is not specific to
include file processing.


Previous Comments:
------------------------------------------------------------------------

[2002-09-08 13:56:54] kalowsky@php.net

As per Wez's observation... dup of #19287

------------------------------------------------------------------------

[2002-09-08 13:47:49] fillmore@NRCan.gc.ca

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

------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

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



Thread (10 messages)

« previous php.bugs (#18681) next »