Commit 020edf2c authored by Dashamir Hoxha's avatar Dashamir Hoxha

Update php config

parent f27e7549
......@@ -47,7 +47,7 @@ a2enmod headers rewrite
### limit the memory size of apache2 when developing
if [[ -n $DEV ]]; then
sed -i /etc/php/7.1/apache2/php.ini \
sed -i /etc/php/7.4/apache2/php.ini \
-e '/^\[PHP\]/ a apc.rfc1867 = 1' \
-e '/^display_errors/ c display_errors = On'
......@@ -59,19 +59,18 @@ if [[ -n $DEV ]]; then
fi
### modify the configuration of php
cat <<EOF > /etc/php/7.1/mods-available/apcu.ini
cat <<EOF > /etc/php/7.4/mods-available/apcu.ini
extension=apcu.so
apcu.mmap_file_mask=/tmp/apcu.XXXXXX
apcu.shm_size=96M
EOF
sed -i /etc/php/7.1/apache2/php.ini \
-e '/^;\?memory_limit/ c memory_limit = 200M' \
-e '/^;\?max_execution_time/ c max_execution_time = 90' \
-e '/^;\?display_errors/ c display_errors = On' \
-e '/^;\?post_max_size/ c post_max_size = 16M' \
-e '/^;\?cgi\.fix_pathinfo/ c cgi.fix_pathinfo = 1' \
-e '/^;\?upload_max_filesize/ c upload_max_filesize = 16M' \
-e '/^;\?default_socket_timeout/ c default_socket_timeout = 90'
sed -i /etc/php/7.4/apache2/php.ini \
-e 'memory_limit/ c memory_limit = 256M' \
-e 'post_max_size/ c post_max_size = 16M' \
-e '/max_input_vars/ c max_input_vars = 1500' \
-e 'upload_max_filesize/ c upload_max_filesize = 100M' \
-e 'max_execution_time/ c max_execution_time = 90' \
-e 'default_socket_timeout/ c default_socket_timeout = 90'
service apache2 restart
......@@ -33,6 +33,13 @@ cat << EOF >> $drupal_settings
EOF
# silence warnings
cat << EOF >> $drupal_settings
# silence warnings
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
EOF
# setup system cron
cat <<EOF > /etc/cron.d/drupal7
# Use the Linux system cron instead of Drupal's "Poor Man's Cron".
......
......@@ -10,7 +10,7 @@ account_pass="$ADMIN_PASS"
account_mail="$ADMIN_EMAIL"
### start site installation
sed -e '/memory_limit/ c memory_limit = -1' -i /etc/php/7.1/cli/php.ini
sed -e '/memory_limit/ c memory_limit = -1' -i /etc/php/7.4/cli/php.ini
cd $DRUPAL_DIR
drush site-install --verbose --yes btr_client \
--db-url="mysql://$DBUSER:$DBPASS@$DBHOST:$DBPORT/$DBNAME" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment