Basically, I'm trying to setup a shell script that lets me autoconfigure some parameters on my new servers
In particular, I'd like to set, in php.ini
error_log= /var/log/php_errors.log error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
In my bash script I have this:
ERROR_REPORTING="error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED"
ERROR_LOG="/var/log/php_errors.log"
#CREATE LOG FILE
sed -i 's/error_reporting = .*/error_reporting = '${ERROR_REPORTING}'/' /etc/php.ini
touch $ERROR_LOG
chown apache:apache $ERROR_LOG
#The ; in the next line is because the line is commented by default on RHEL5
sed -i 's/;error_log = .*/error_log = '${ERROR_LOG}'/' /etc/php.ini
However, this does not appear to work and the error is not obvious to me..could anybody please correct my error?