# To be kept in sync with setup_php.sh
+# @todo make it optional to disable xdebug ?
+
set -e
SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")"
echo "cgi.fix_pathinfo = 1" >> "${1}"
echo "always_populate_raw_post_data = -1" >> "${1}"
- # @todo this only disables xdebug for CLI. To do the same for the FPM config as well, should we use instead `phpdismod` ?
- XDEBUG_INI=$(php -i | grep xdebug.ini | grep -v '=>' | head -1)
- if [ "$XDEBUG_INI" != "" ]; then
- XDEBUG_INI="$(echo "$XDEBUG_INI" | tr -d ',')"
- mv "$XDEBUG_INI" "$XDEBUG_INI.bak";
- fi
+ # we disable xdebug for speed for both cli and web mode
+ phpenv config-rm xdebug.ini
}
PHPVER=$(phpenv version-name)
fi
fi
-#cat ~/.phpenv/versions/${PHPVER}/etc/php-fpm.conf
-#ls -la ~/.phpenv/versions/${PHPVER}/etc/
-#cat ~/.phpenv/versions/${PHPVER}/etc/php-fpm.d/www.conf
-
# Use a unix socket for communication between apache and php-fpm - same as Ubuntu does by default
if [ -f ~/.phpenv/versions/${PHPVER}/etc/php-fpm.d/www.conf ]; then
sed -i -e "s,listen = 127.0.0.1:9000,listen = /run/php/php-fpm.sock,g" ~/.phpenv/versions/${PHPVER}/etc/php-fpm.d/www.conf