php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #3635 wrong error message for errors in auto prepended include files
Submitted: 2000-02-26 12:48 UTC Modified: 2000-07-30 13:24 UTC
From: kk at netuse dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (26/02/2000) OS: Linux valiant 2.2.13 #1 Mon Nov
Private report: No CVE-ID: None
 [2000-02-26 12:48 UTC] kk at netuse dot de
I have a file named "prepend.php3" which is being auto_prepended to
all my pages. That file contains a number of require() statements which
contains the actual code that is to be auto_prepended. One of these files
contains a syntax error (a string constant with a dynamic initialization
as in

  class Statbox {
    var $statcache = "$DOCUMENT_ROOT/cache/statbox.html";
   ...
  }

which is illegal in PHP4).

When statbox.inc is required from the main page manually, I get a proper
error message

Parse error: parse error in statbox.inc on line 4

When statbox.inc is required from the auto_prepended file
prepend.php3, I get

Fatal error: Failed opening required 'statbox.inc'
(include_path='/home/kris/www/test.koehntopp.de/local_php:/home/kris/www/test.koehntopp.de/php') in
/home/kris/www/test.koehntopp.de/local_php/prepend.php3 on line 32

which is a very different error message and misleading.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-30 10:22 UTC] zak@php.net
Would anyone care to take this on?  IMO it is more of a feature request than a bug.  The user would like to have better error reporting for included files.
 [2000-07-30 13:24 UTC] stas@php.net
This is an old bug. Please try latest version and open bug report if it still happens.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 04:01:33 2025 UTC