You can patch the comments with this shell command:
find /etc/php5/cli/conf.d/ -name "*.ini" -exec sed -i -re 's/^(\s*)#(.*)/\1;\2/g' {} \;
It basically finds all .ini files below /etc/php5/cli/conf.d/ and executes sed on it, which replaces any # comment line literal by ;.