Created
February 14, 2017 17:08
-
-
Save alairock/913882da00a6d2b6620be1ec23c3c54c to your computer and use it in GitHub Desktop.
Docker debug php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
HOST_IP=`/sbin/ip route | awk '/default/ { print $3 }'` | |
sudo apt update | |
sudo apt install php-xdebug | |
echo "zend_extension=/usr/lib/php/20131226/xdebug.so" > /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_handler=dbgp" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_mode=req" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.var_display_max_data = 2048" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.var_display_max_depth = 128" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.max_nesting_level = 500" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.idekey = phpstorm-xdebug" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.default_enable = 0" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_enable = 1" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_autostart = 1" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_connect_back = 0" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.profiler_enable = 0" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_port = 9905" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
echo "xdebug.remote_host = 192.168.1.199" >> /etc/php/5.6/fpm/conf.d/20-xdebug.ini | |
pkill php-fpm5.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment