php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42972 Double quotes in a some comments in ini file generate warning.
Submitted: 2007-10-15 10:52 UTC Modified: 2007-10-15 11:18 UTC
From: RQuadling at GMail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5CVS-2007-10-15 (snap) OS: Windows XP SP2
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: RQuadling at GMail dot com
New email:
PHP Version: OS:

 

 [2007-10-15 10:52 UTC] RQuadling at GMail dot com
Description:
------------
Using the same php-cli.ini file for PHP5.2.5-dev and PHP5.3.0-dev

At the command line I enter ...

php -v

I get 2 pop-up error messages.

The first is ...

syntax error, unexpected '"' in C:\PHP_INI\PHP5.3\php-cli.ini on line 445.

followed by ...

Invalid configuration directive


Line 445 of this file is ...

upload_tmp_dir = "D:\Data\PHP\File Uploads"

So, changed it to ...

upload_tmp_dir = D:\Data\PHP\File Uploads

This lines seems to have passed muster because I now get ...

syntax error, unexpected '"' in C:\PHP_INI\PHP5.3\php-cli.ini on line 459


Line 459 is ...

;from="anonymous@anonymous.com"

The comment on the from is NOT being acknowledged. Strangely enough, not all comments are examined.

In line 41 ...

; example, if you set output_handler to "mb_output_handler", character

and in line 277

;docref_root = "/phpmanual/"

Both of these are ignored.


I don't know if the " are supposed to be there, but the errors suggest that they should not be.

For those that are NOT comments, I can accept I have to change my ini files, but not for comments.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-15 10:53 UTC] RQuadling at GMail dot com
"Using the same php-cli.ini file for PHP5.2.5-dev and PHP5.3.0-dev" => "Using a copy of the php-cli.ini file for PHP5.2.5-dev for PHP5.3.0-dev"
 [2007-10-15 11:04 UTC] RQuadling at GMail dot com
Here is a udiff of the 5.2 and the 5.3 ini files ...

--- php5\php-cli.ini	2007-10-15 12:03:13.668738200 +0100
+++ php5.3\php-cli.ini	2007-10-15 12:02:25.184363200 +0100
@@ -392,7 +392,7 @@
 user_dir =
 
 ; Directory in which the loadable extensions (modules) reside.
-extension_dir = "C:\PHP5\ext\"
+extension_dir = "C:\PHP5.3\ext\"
 
 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
@@ -442,7 +442,7 @@
 
 ; Temporary directory for HTTP uploaded files (will use system default if not
 ; specified).
-upload_tmp_dir = "D:\Data\PHP\File Uploads"
+upload_tmp_dir = D:\Data\PHP\File Uploads
 
 ; Maximum allowed size for uploaded files.
 upload_max_filesize = 100M
@@ -456,10 +456,10 @@
 allow_url_fopen = On
 
 ; Define the anonymous ftp password (your email address)
-;from="anonymous@anonymous.com"
+;from=anonymous@anonymous.com
 
 ; Define the User-Agent string
-user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
+user_agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
 
 ; Default timeout for socket based streams (seconds)
 default_socket_timeout = 60
@@ -520,7 +520,7 @@
 
 [Date]
 ; Defines the default timezone used by the date functions
-date.timezone = "Europe/London"
+date.timezone = Europe/London
 date.default_latitude = 50.386944
 date.default_longitude = 3.9522222
 date.sunrise_zenith = 90.8333
@@ -540,7 +540,7 @@
 ; For Win32 only.
 sendmail_from = richard.quadling@bandvulc.co.uk
 
-; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
+; For Unix only.  You may supply arguments as well (default: sendmail -t -i).
 ;sendmail_path =
 
 ; Force the addition of the specified parameters to be passed as extra parameters
@@ -605,7 +605,7 @@
 
 ; Default password for mysql_connect() (doesn't apply in safe mode).
 ; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
+; *Any* user with PHP access can run 'echo get_cfg_var(mysql.default_password)
 ; and reveal this password!  And of course, any users with read access to this
 ; file will be able to reveal the password as well.
 mysql.default_password =
@@ -640,7 +640,7 @@
 
 ; Default password for mysqli_connect() (doesn't apply in safe mode).
 ; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_password")
+; *Any* user with PHP access can run 'echo get_cfg_var(mysqli.default_password)
 ; and reveal this password!  And of course, any users with read access to this
 ; file will be able to reveal the password as well.
 mysqli.default_pd =
@@ -690,7 +690,7 @@
 ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
 sybase.max_links = -1
 
-;sybase.interface_file = "/usr/sybase/interfaces"
+;sybase.interface_file = /usr/sybase/interfaces
 
 ; Minimum error severity to display.
 sybase.min_error_severity = 10
@@ -724,19 +724,19 @@
 [dbx]
 ; returned column names can be converted for compatibility reasons
 ; possible values for dbx.colnames_case are
-; "unchanged" (default, if not set)
-; "lowercase"
-; "uppercase"
+; unchanged (default, if not set)
+; lowercase
+; uppercase
 ; the recommended default is either upper- or lowercase, but
 ; unchanged is currently set for backwards compatibility
-dbx.colnames_case = "unchanged"
+dbx.colnames_case = unchanged
 
 [bcmath]
 ; Number of decimal digits for all bcmath functions.
 bcmath.scale = 0
 
 [browscap]
-browscap = C:/PHP5/extras/browscap.ini
+browscap = C:/PHP5.3/extras/browscap.ini
 
 [Informix]
 ; Default host for ifx_connect() (doesn't apply in safe mode).
 [2007-10-15 11:18 UTC] RQuadling at GMail dot com
Bugger. I had ...

extension_dir = "C:\PHP5.3\ext\"

In this case, the " has been escaped.

And messed up all the remaining "

Strangely enough, this isn't an issue in 5.2.5-dev.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC