php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3547 wrong line numbers reported for parse errors
Submitted: 2000-02-21 06:53 UTC Modified: 2000-07-23 14:14 UTC
From: phil at dialsolutions dot co dot uk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (21/02/2000) OS: NT4 SP4 IIS4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phil at dialsolutions dot co dot uk
New email:
PHP Version: OS:

 

 [2000-02-21 06:53 UTC] phil at dialsolutions dot co dot uk
Using php4.0b4 (exe version) if a script 'requires' another script, and the parser encounters a parse error in the first script, the line number and file reported for the parse error are incorrect. This makes debugging a little difficult! This problem is also apparent in php4.0b3.

Here are two test files which display the problem. foo.php has a deliberate error on line 3 where I have Test instead of $Test.

foo.php
<?php
require("bar.php");
Test="hello";
?>

bar.php
<?php
//nothing in here  but a few blank lines



?>

When I load foo.php the following error message is displayed:

Parse error: parse error in bar.php on line 7

If I change Test to $Test in foo.php the error message disappears.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 14:14 UTC] stas at cvs dot php dot net
Should be already fixed. If not - please reopen.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 13 04:00:01 2026 UTC