# log_errors : is On by default
# error_log
if ! grep '^error_log *=' $php_ini > /dev/null ; then
- echo 'error_log = /var/log/php.log' >> $php_ini
- touch /var/log/php.log
- chmod 666 /var/log/php.log
+ sed -i -e '/^;error_log = syslog/a error_log = /var/log/php.log' $php_ini
+ sed -i -e 's/display_errors =.*/display_errors = On/' $php_ini
+ sed -i -e 's/display_startup_errors =.*/display_startup_errors = On/' $php_ini
+ # create the log file and make it writable by apache
+ touch /var/log/php.log
+ chmod 666 /var/log/php.log
fi
# configure php-fpm as well if present (starting with f27)
# with mod_python preferred
if rpm -q mod_python >& /dev/null ; then
configure_for_mod_python=true
- elif rpm -q mod_wsgi >& /dev/null || rpm -q python2-mod_wsgi >& /dev/null ; then
+ elif rpm -q mod_wsgi >& /dev/null \
+ || rpm -q python2-mod_wsgi >& /dev/null \
+ || rpm -q python3-mod_wsgi >& /dev/null ; then
configure_for_mod_wsgi=true
else
echo "Requires mod_python or mod_wsgi.... exiting"
MESSAGE=$"Stopping web server"
dialog "$MESSAGE"
- killproc plc_httpd
+ pkill -f plc_httpd
check
result "$MESSAGE"