Php – How to set the string “value;othervalue” in php.ini with augeas


i want to change the session.save_path in the php.ini with augeas



target value


augeas returns quite interesting results

not working command (save is failing)

set /files/etc/php5/apache2/php.ini/Session/session.save_path '"3;/tmp"'
set /files/etc/php5/apache2/php.ini/Session/session.save_path '"3\;/tmp"'
set /files/etc/php5/apache2/php.ini/Session/session.save_path \"3;/tmp\"

partly working commands (save works but not the desired result)

set /files/etc/php5/apache2/php.ini/Session/session.save_path '"/tmp/test"'

is there a way to force augeas to just set the value to the given string and don't try to spit them up

bug report link:

Best Answer

The php.aug lens (based on inifile.aug) does not allow semi-colons in value fields, because they conflict with end-of-line comments, which can use semi-colons, too:

let to_comment_re = /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/

If these values should be accepted, please open a bug report for it.

Related Topic