Re: Re: ini-parsing, double quotes, windows in 5.3
| From: | Jochem Maas | Date: | Fri, 05 Sep 2008 11:51:13 +0000 |
| Subject: | Re: Re: ini-parsing, double quotes, windows in 5.3 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40284@lists.php.net to get a copy of this message | ||
Jani Taskinen schreef:
Hannes Magnusson wrote:...On Thu, Sep 4, 2008 at 22:43, Jani Taskinen <jani.taskinen@sci.fi> wrote:Johannes Schlüter kirjoitti:
it's got 'recommended' in the filename ... you betcha it's documentation. that said 1. change the contents of php.ini-recommended, et al 2. change the ini parser to scream an error (and a solution?) if it comes across the problematic syntax 3. stick a popup at the end of the windows installer (or even at the beginning, allowing someone to fix the error in their current php.ini before 5.3 is installed ... for seemless upgrade) 4. put a big notice in the CHANGE_LOG 9 out of 10 users installing windows binaries do it for their local dev environment ... not critical if it breaks due to ini settings ... and for the rest, any admin who manages to avoid all the warnings and install php5.3 on a production server and break the install (very temporarily) probably deserves the earful (s)he'll get from PHB. sometimes BC has to be broken ... it's not as if it's the first time BC broke in a 'minor' release is it? and in this case you've actually introduced great new functionality to the 'ini system' ... well worth the slight pain it might cause a few windows admins, no?php.ini-recommended, 5.3: ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" As you can see, Windows users are explicitly told to use foo\bar\ inside double quotes. This has been like this for years and is also documented in the manual. It looks to me that the old behavior was very intentional, logical or not.Ini files are not documentation.
And as / works also for winblows, that should be used JUST for the sake of consistency anyway.. Anyway, the fix is quite easy: Only allow \" and no other escapes. And doing "foo\" should cause a syntax error. --Jani