File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
function process_php_config () {
4
4
php_ini_paths=$1
5
+
5
6
for php_ini_path in " ${php_ini_paths[@]} "
6
7
do
7
- echo " date.timezone = America/Chicago" >> ${php_ini_path}
8
- sed -i " s|;include_path = \" .:/usr/share/php\" |include_path = \" .:/usr/share/php:${guest_magento_dir} /vendor/phpunit/phpunit\" |g" ${php_ini_path}
9
- sed -i " s|display_errors = Off|display_errors = On|g" ${php_ini_path}
10
- sed -i " s|display_startup_errors = Off|display_startup_errors = On|g" ${php_ini_path}
11
- sed -i " s|error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT|error_reporting = E_ALL|g" ${php_ini_path}
8
+ if [ -f ${php_ini_path} ]; then
9
+ echo " date.timezone = America/Chicago" >> ${php_ini_path}
10
+ sed -i " s|;include_path = \" .:/usr/share/php\" |include_path = \" .:/usr/share/php:${guest_magento_dir} /vendor/phpunit/phpunit\" |g" ${php_ini_path}
11
+ sed -i " s|display_errors = Off|display_errors = On|g" ${php_ini_path}
12
+ sed -i " s|display_startup_errors = Off|display_startup_errors = On|g" ${php_ini_path}
13
+ sed -i " s|error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT|error_reporting = E_ALL|g" ${php_ini_path}
14
+ fi
12
15
done
13
16
}
14
17
@@ -56,7 +59,11 @@ php_ini_paths=( /etc/php/7.0/cli/php.ini /etc/php/5.6/cli/php.ini )
56
59
process_php_config ${php_ini_paths}
57
60
58
61
if [ ${use_php7} -eq 1 ]; then
59
- update-alternatives --set php /usr/bin/php7.0 && a2dismod php5.6 && a2enmod php7.0
62
+ update-alternatives --set php /usr/bin/php7.0
63
+ if [ -d " /etc/php/5.6" ]; then
64
+ a2dismod php5.6
65
+ fi
66
+ a2enmod php7.0
60
67
else
61
68
if [ ! -d " /etc/php/5.6" ]; then
62
69
init_php56
You can’t perform that action at this time.
0 commit comments