X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=php5-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=a527e5a2f96e5d9cf36052639d652db20088cc9e;hp=f9a78dc8dfb648ea4670f66269b25158768e5dc8;hb=5f60735077e132585dcbf34616bb27d3e520d915;hpb=860b087a7890a77c96a1f8dd08177f111c565739 diff --git a/debian/postinst b/debian/postinst index f9a78dc..a527e5a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -78,6 +78,17 @@ if [ -e /etc/apache2/apache2.conf ]; then if [ ! -e "$A2MODEDIR/php5.load" ] || [ ! -e "$A2MODEDIR/php5.conf" ]; then cp_echo "CN: Enabling PHP5 module for Apache2 web server" a2enmod php5 >/dev/null || true + + if [ -e "$A2MODEDIR/php5.conf" ]; then + if egrep -qi "^[[:space:]]*php_admin_value engine Off" "$A2MODEDIR/php5.conf"; then + db_fset php5-cn/userdir seen false + db_title php5-cn - konfiguracija + db_subst php5-cn/userdir php5_conf "$A2MODEDIR/php5.conf" + db_input critical php5-cn/userdir || true + db_go || true + fi + fi + need_restart=1 fi fi @@ -100,12 +111,12 @@ for SAPI in apache2 cli; do ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX` if [ "$SAPI" = "cli" ]; then - if [ -f "/usr/share/php5/php.ini-dist.cli" ]; then - cat /usr/share/php5/php.ini-dist.cli > $ini_file_tmp + if [ -f "/usr/share/php5/php.ini-production.cli" ]; then + cat /usr/share/php5/php.ini-production.cli > $ini_file_tmp fi else - if [ -f "/usr/share/php5/php.ini-dist" ]; then - cat /usr/share/php5/php.ini-dist > $ini_file_tmp + if [ -f "/usr/share/php5/php.ini-production" ]; then + cat /usr/share/php5/php.ini-production > $ini_file_tmp fi fi cp_mv $ini_file_tmp $ini_file @@ -184,6 +195,7 @@ done # * upload_max_filesize = 256M # * post_max_size, memory_limit = depends on system memory, we are using # phpmemlimit() function. +# * error_reporting = E_ERROR # for SAPI in apache2 cli; do @@ -212,6 +224,10 @@ for SAPI in apache2 cli; do cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=" \ "s/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = ${phplimit}/" \ "$ini_file" && need_restart=1 || true + + cp_check_and_sed "^[[:space:]]*error_reporting[[:space:]]*=" \ + "s/^[[:space:]]*error_reporting[[:space:]]*=.*/error_reporting = E_ERROR/" \ + "$ini_file" && need_restart=1 || true fi ini_file_tmp=`mktemp $ini_file.tmp.XXXXXX` @@ -231,6 +247,10 @@ for SAPI in apache2 cli; do echo "memory_limit = ${phplimit}" >> "$ini_file_tmp" need_restart=1 fi + if ! egrep -q "^[[:space:]]*error_reporting[[:space:]]*=" $ini_file_tmp; then + echo "error_reporting = E_ERROR" >> "$ini_file_tmp" + need_restart=1 + fi cp_mv "$ini_file_tmp" "$ini_file" chmod 644 "$ini_file"