Zend Framework

! character in .ini file produces "Error parsing foo.ini in ..."

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Not an Issue
  • Affects Version/s: 0.8.0
  • Fix Version/s: 0.9.0
  • Component/s: Zend_Config
  • Labels:
    None

Description

We frequently use ! in passwords, for example this produces an error:
[foobar]
foo = bar!

This doesn't:
[foobar]
foo = bar

Activity

Hide
Rob Allen added a comment -

Zend_Config_Ini uses parse_ini_file behind the scenes. Looking at http://uk3.php.net/manual/en/function.parse-ini-file.php, I see that you could try using double quotes around "bar!".

However the manual page also says: "Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.".

Regards,

Rob...

Show
Rob Allen added a comment - Zend_Config_Ini uses parse_ini_file behind the scenes. Looking at http://uk3.php.net/manual/en/function.parse-ini-file.php, I see that you could try using double quotes around "bar!". However the manual page also says: "Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.". Regards, Rob...
Hide
Darby Felton added a comment -

Rob's comment explains this to be expected behavior, because of the use of parse_ini_file(). The Zend_Config_Ini documentation mentions this, as well.

Show
Darby Felton added a comment - Rob's comment explains this to be expected behavior, because of the use of parse_ini_file(). The Zend_Config_Ini documentation mentions this, as well.
Hide
Till Klampaeckel added a comment -

(Sorry to add more noise here.)

Thanks for clearning this up. I must have overread where it said that it relies on PHP's function parse_ini_file.
After I knew that the fix was fairly simple...


foo = "bar!"

{/code}

I still think that if an error (of any level) is generated from the parse_ini_file(), it should be wrapped into an exception.

Show
Till Klampaeckel added a comment - (Sorry to add more noise here.) Thanks for clearning this up. I must have overread where it said that it relies on PHP's function parse_ini_file. After I knew that the fix was fairly simple...

foo = "bar!" {/code} I still think that if an error (of any level) is generated from the parse_ini_file(), it should be wrapped into an exception.
Hide
Wil Sinclair added a comment -

Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

Show
Wil Sinclair added a comment - Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: