+# Compare active PHP5 extensions with PHP4 ones, if PHP4 configuration still exists.
+#
+if [ -d "${PHP4DIR}" ] && [ -f "${PHP4DIR}/apache2/php.ini" ]; then
+
+ phpext_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*["]{0,1}(.*)\.so["]{0,1}'
+
+ # Get all active PHP4 extensions.
+ php4_ext="$(find ${PHP4DIR} -type f -name *.ini |
+ egrep "\/(conf\.d|apache2|cli)\/" |
+ xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+
+ # Get all active PHP5 extensions.
+ php5_ext=""
+ if [ -d "${PHP5DIR}" ]; then
+ php5_ext="$(find ${PHP5DIR} -type f -name *.ini |
+ egrep "\/(conf\.d|apache2|cli)\/" |
+ xargs sed -rn 's/'$phpext_re'/\1/Ip')" || true
+ fi
+
+ # Compare PHP5 <-> PHP4 extensions.
+ php5_ext_mis=""
+ for ext in $php4_ext; do
+ if [ "$(echo $php5_ext | egrep $ext)" = "" ]; then
+ php5_ext_mis="\n${ext}${php5_ext_mis}"
+ fi
+ done
+
+ # Some PHP5 extensions are not active.
+ if [ -n "$php5_ext_mis" ]; then
+ db_fset php5-cn/extensions seen false
+ db_title php5-cn - konfiguracija
+ db_capb escape
+ db_subst php5-cn/extensions php5_extensions "${php5_ext_mis#*\n}"
+ db_input critical php5-cn/extensions || true
+ db_go || true
+ fi
+fi
+
+
+db_stop || true
+
+