php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46894 Syntax errors in php.ini go unnoticed
Submitted: 2008-12-18 02:54 UTC Modified: 2018-08-16 10:51 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ilatypov at infradead dot org Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 6CVS-2008-12-18 (snap) OS: Windows XP Pro
Private report: No CVE-ID: None
 [2008-12-18 02:54 UTC] ilatypov at infradead dot org
Description:
------------
I accidentally commented out a line in php.ini with a hash mark instead of a semi-colon.  It appears that the php.ini parser does not raise an all-important alarm on this kind of error.  

I spent hours trying to understand why my changes to php.ini were not reflected in ini_get_all().

It would be nice if the php.ini parser threw a message about syntax errors to stderr.  Pretty please!




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-27 09:51 UTC] youdontneedme at o2 dot pl
I've also found syntax error in php.ini in php 5.4b1:

In line 601 [both php.ini devel and production] is:
: paid for the registration of these arrays and because ENV is not as commonly

should be:
; paid for the registration of these arrays and because ENV is not as commonly


Note that there is colon as starting char.
 [2018-08-16 10:51 UTC] cmb@php.net
-Package: Feature/Change Request +Package: *General Issues
 [2018-08-16 10:51 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-08-16 10:51 UTC] cmb@php.net
Hash marks have been valid comment markers in PHP 5 (albeit
deprecated as of PHP 5.3.0)[1].

> I've also found syntax error in php.ini in php 5.4b1:

This had been properly reported as bug #55834, and has been fixed.

[1] <http://php.net/manual/en/configuration.file.php#configuration.file.changelog>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC