|
73 | 73 | # Route mail to SMTP queuing servers
|
74 | 74 | #
|
75 | 75 | #####
|
76 |
| -if [ ! -f /etc/php/7.0/apache2/build ]; then |
| 76 | +if [ ! -f /etc/php/7.3/apache2/build ]; then |
77 | 77 |
|
78 | 78 | # Tweak Apache build
|
79 |
| - sed -i 's|;include_path = ".:/usr/share/php"|include_path = ".:/usr/share/php:/data/pear"|g' /etc/php/7.0/apache2/php.ini |
80 |
| - sed -i 's/variables_order.*/variables_order = \"EGPCS\"/g' /etc/php/7.0/apache2/php.ini |
| 79 | + sed -i 's|;include_path = ".:/usr/share/php"|include_path = ".:/usr/share/php:/data/pear"|g' /etc/php/7.3/apache2/php.ini |
| 80 | + sed -i 's/variables_order.*/variables_order = \"EGPCS\"/g' /etc/php/7.3/apache2/php.ini |
81 | 81 | sed -i 's/IncludeOptional sites-enabled\/\*.conf/IncludeOptional \/data\/apache2\/sites-enabled\/*.conf/' /etc/apache2/apache2.conf
|
82 |
| - sed -i 's|;error_log = php_errors.log|error_log = /data/apache2/logs/error_log|g' /etc/php/7.0/apache2/php.ini |
| 82 | + sed -i 's|;error_log = php_errors.log|error_log = /data/apache2/logs/error_log|g' /etc/php/7.3/apache2/php.ini |
83 | 83 |
|
84 | 84 | # Update the PHP.ini file, enable <? ?> tags and quiet logging.
|
85 |
| - sed -i 's|short_open_tag = Off|short_open_tag = On|g' /etc/php/7.0/apache2/php.ini |
| 85 | + sed -i 's|short_open_tag = Off|short_open_tag = On|g' /etc/php/7.3/apache2/php.ini |
86 | 86 |
|
87 | 87 | # Sessions & garbage collection
|
88 |
| - sed -i 's|;session.save_path = "/var/lib/php5"|session.save_path = "/tmp"|g' /etc/php/7.0/apache2/php.ini |
89 |
| - sed -i 's|session.gc_probability = 0|session.gc_probability = 1|g' /etc/php/7.0/apache2/php.ini |
| 88 | + sed -i 's|;session.save_path = "/var/lib/php5"|session.save_path = "/tmp"|g' /etc/php/7.3/apache2/php.ini |
| 89 | + sed -i 's|session.gc_probability = 0|session.gc_probability = 1|g' /etc/php/7.3/apache2/php.ini |
90 | 90 |
|
91 | 91 | # Increase memory & upload limitations
|
92 |
| - sed -i 's|max_execution_time = 30|max_execution_time = 300|g' /etc/php/7.0/apache2/php.ini |
93 |
| - sed -i 's|memory_limit = 128M|memory_limit = -1|g' /etc/php/7.0/apache2/php.ini |
94 |
| - sed -i 's|upload_max_filesize = 2M|upload_max_filesize = 1000M|g' /etc/php/7.0/apache2/php.ini |
95 |
| - sed -i 's|post_max_size = 8M|post_max_size = 1000M|g' /etc/php/7.0/apache2/php.ini |
| 92 | + sed -i 's|max_execution_time = 30|max_execution_time = 300|g' /etc/php/7.3/apache2/php.ini |
| 93 | + sed -i 's|memory_limit = 128M|memory_limit = -1|g' /etc/php/7.3/apache2/php.ini |
| 94 | + sed -i 's|upload_max_filesize = 2M|upload_max_filesize = 1000M|g' /etc/php/7.3/apache2/php.ini |
| 95 | + sed -i 's|post_max_size = 8M|post_max_size = 1000M|g' /etc/php/7.3/apache2/php.ini |
96 | 96 |
|
97 | 97 | # Add build file to remove duplicate script execution
|
98 |
| - echo 1 > /etc/php/7.0/apache2/build |
| 98 | + echo 1 > /etc/php/7.3/apache2/build |
99 | 99 |
|
100 | 100 | if [[ -z "${NODE_ENVIRONMENT}" ]]; then
|
101 | 101 | # $NODE_ENVIRONMENT is set on container creation
|
102 | 102 | echo " env NODE_ENVIRONMENT is not set, Apache is not configured correctly."
|
103 | 103 | else
|
104 | 104 | if [ "$NODE_ENVIRONMENT" == 'dev' ]; then
|
105 | 105 | # Tweak Apache build
|
106 |
| - sed -i 's|\[PHP\]|\[PHP\] \nIS_LIVE=0 \nIS_DEV=0 \nNODE_ENVIRONMENT=dev \n;The IS_DEV is set for testing outside of DEV environments ie: test.domain.tld|g' /etc/php/7.0/apache2/php.ini |
| 106 | + sed -i 's|\[PHP\]|\[PHP\] \nIS_LIVE=0 \nIS_DEV=0 \nNODE_ENVIRONMENT=dev \n;The IS_DEV is set for testing outside of DEV environments ie: test.domain.tld|g' /etc/php/7.3/apache2/php.ini |
107 | 107 | # Update the PHP.ini file, enable <? ?> tags and quiet logging.
|
108 |
| - sed -i "s/error_reporting = .*$/error_reporting = E_ALL/" /etc/php/7.0/apache2/php.ini |
| 108 | + sed -i "s/error_reporting = .*$/error_reporting = E_ALL/" /etc/php/7.3/apache2/php.ini |
109 | 109 | fi
|
110 | 110 |
|
111 | 111 | if [ "$NODE_ENVIRONMENT" == 'production' ]; then
|
112 | 112 | # Tweak Apache build
|
113 |
| - sed -i 's|\[PHP\]|\[PHP\] \nIS_LIVE=1 \nIS_DEV=0 \nNODE_ENVIRONMENT=production \n;The IS_DEV is set for testing outside of DEV environments ie: test.domain.tld|g' /etc/php/7.0/apache2/php.ini |
| 113 | + sed -i 's|\[PHP\]|\[PHP\] \nIS_LIVE=1 \nIS_DEV=0 \nNODE_ENVIRONMENT=production \n;The IS_DEV is set for testing outside of DEV environments ie: test.domain.tld|g' /etc/php/7.3/apache2/php.ini |
114 | 114 | # Update the PHP.ini file, enable <? ?> tags and quiet logging.
|
115 |
| - sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.0/apache2/php.ini |
| 115 | + sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.3/apache2/php.ini |
116 | 116 | fi
|
117 | 117 |
|
118 | 118 | fi
|
|
0 commit comments