Browse Source

Fix --debug for php5.6 trusty

master
Prabuddha Chakraborty 9 years ago
parent
commit
b46e3b9fb2
  1. 8
      install

8
install

@ -302,6 +302,7 @@ function ee_upgrade_php(){
if [ -f /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list ]; then
# add-apt-repository -y --remove 'ppa:ondrej/php5-5.6'
add-apt-repository -y 'ppa:ondrej/php'
ee_lib_echo "Updating required packages, please wait..."
apt-get update &>> /dev/null
apt-get -y install php5.6-fpm php5.6-curl php5.6-gd php5.6-imap php5.6-mcrypt php5.6-readline php5.6-mysql php5.6-cli php5.6-common php7.0-common php-memcached php-imagick memcached graphviz php-pear php-xdebug || ee_lib_error "Unable to install PHP 5.6 packages, exit status " 1
if [ -e /etc/php5/fpm/pool.d/www.conf -a -e /etc/php5/fpm/pool.d/debug.conf -a -e /etc/php5/fpm/php.ini -a -e /etc/php5/fpm/php-fpm.conf ]; then
@ -312,6 +313,13 @@ function ee_upgrade_php(){
else
echo "Some files are missing." || ee_lib_error "Unable to configure PHP5.6 packages, exit status " 1
fi
sed -i "s/pid.*/pid = \/run\/php\/php5.6-fpm.pid/" /etc/php/5.6/fpm/php-fpm.conf && \
sed -i "s/error_log.*/error_log = \/var\/log\/php\/5.6\/fpm.log/" /etc/php/5.6/fpm/php-fpm.conf && \
sed -i "s/log_level.*/log_level = notice/" /etc/php/5.6/fpm/php-fpm.conf && \
sed -i "s/include.*/include = \/etc\/php\/5.6\/fpm\/pool.d\/*.conf/" /etc/php/5.6/fpm/php-fpm.conf && \
sed -i "s/slowlog.*/slowlog = \/var\/log\/php\/5.6\/slow.log" /etc/php/5.6/fpm/pool.d/debug.conf || ee_lib_error "Unable to update configuration, exit status " $?
mkdir -p /var/log/php/5.6/
touch /var/log/php/5.6/slow.log /var/log/php/5.6/fpm.log
service php5-fpm stop &>> /dev/null
service php5.6-fpm restart &>> /dev/null
rm -f /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list &>> /dev/null

Loading…
Cancel
Save