|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48337 Parse error messages getting less descriptive
Submitted: 2009-05-19 21:29 UTC Modified: 2010-06-08 16:30 UTC
Avg. Score:4.0 ± 1.0
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: brad at njoe dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.9 OS: win32 only
Private report: No CVE-ID: None
 [2009-05-19 21:29 UTC] brad at njoe dot com
Something has changed in the way the PHP parser reports errors during parsing - it has become slightly less descriptive in certain cases.

As far as I can tell, this change happened sometime AFTER the release of PHP version 5.2.6 (in this version, the error message was as expected) - this includes the latest development releases (including PHP 6.0.0-dev).

Reproduce code:

echo ; 'Error! Error!';


Expected result:
Parse error: syntax error, unexpected ';' in (file) on line 3

Actual result:
Parse error: parse error in (file) on line 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-19 21:43 UTC]
Must be something with the windows build. Propably some bison version 
issue or something like that. Do you build PHP yourself?
 [2009-05-19 23:07 UTC] brad at njoe dot com
No, I don't build PHP myself; all of the versions I tried this with were the binaries available from

I'm also not 100% sure if it's just with the Windows builds (unless you've tried it on PHP 5.2.9 on a 'nix box - I just don't have access to one at the moment).
 [2009-05-20 08:33 UTC]
Yes, I try things only on *nix and as I have proper build tools I get proper error messages as well. :)
 [2009-05-20 19:13 UTC] brad at njoe dot com
"as I have proper build tools I get proper error messages as well." -- Does this mean that those who are building the Windows binaries don't have the 'proper build tools' that were used in the 5.2.7 and earlier releases?
 [2010-06-08 15:37 UTC]
-Status: Open +Status: Assigned
 [2010-06-08 15:37 UTC]
Please try using this snapshot:
For Windows:

 [2010-06-08 15:39 UTC]
-Status: Open +Status: Feedback
 [2010-06-08 16:30 UTC] brad at njoe dot com
-Status: Feedback +Status: Closed
 [2010-06-08 16:30 UTC] brad at njoe dot com
The URL resulted in a page listing no 
binaries/sources available for download. Clicked the Download link at the top 
(taking me to /download/) and I downloaded "VC6 x86 Thread Safe (2010-Feb-24 
15:33:12)" and "VC6 x86 Non Thread Safe (2010-Feb-24 15:38:53)".

Both versions now correctly produced the expected result noted above. Thanks for 
looking into this!
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 02 21:01:24 2021 UTC