php.net |  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
Votes:4
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
4 + 16 = ?
Subscribe to this entry?

 
 [2009-05-19 21:29 UTC] brad at njoe dot com
Description:
------------
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:
---------------
<?php

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-19 21:43 UTC] jani@php.net
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 PHP.net.

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] jani@php.net
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] tony2001@php.net
-Status: Open +Status: Assigned
 [2010-06-08 15:37 UTC] tony2001@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2010-06-08 15:39 UTC] tony2001@php.net
-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 http://windows.php.net/snapshots/ 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-2020 The PHP Group
All rights reserved.
Last updated: Thu May 28 13:01:29 2020 UTC