# configuration files.
for SAPI in apache apache2 cgi cli; do
- ini_file="$PHP4DIR/$SAPI/php.ini"
+ if [ -d "$PHP4DIR/$SAPI" ]; then
- if [ -f "$ini_file" ]; then
+ ini_file="$PHP4DIR/$SAPI/php.ini"
+
+ if [ -f "$ini_file" ]; then
cp_echo "CN: Removing $php4ext extension from file $ini_file"
cp_check_and_sed "$php4ext_re" \
"/$php4ext_re/d" \
"$ini_file" && need_restart=1 || true
- fi
+ fi
+ fi
done
# Check $PHP4CONFD directory.
#
for SAPI in apache apache2 cgi cli; do
- if [ ! -d "$PHP5DIR/$SAPI" ]; then
+ if [ ! -d "$PHP4DIR/$SAPI" ]; then
continue
fi
- ini_file="$PHP5DIR/$SAPI/php.ini"
+ ini_file="$PHP4DIR/$SAPI/php.ini"
cp_echo "CN: Checking and enabling some CARNet specific parameters in file $ini_file"
if [ -f "$ini_file" ]; then
- cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=[[:space:]]*2M$" \
+ cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=[[:space:]]*2M" \
's/^[[:space:]]*upload_max_filesize[[:space:]]*=.*/upload_max_filesize = 256M/' \
"$ini_file" && need_restart=1 || true
- cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=[[:space:]]*8M$" \
+ cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=[[:space:]]*8M" \
's/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = 256M/' \
"$ini_file" && need_restart=1 || true
- cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=[[:space:]]*16M$" \
+ cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=[[:space:]]*8M" \
's/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = 256M/' \
"$ini_file" && need_restart=1 || true
fi