Created
September 27, 2019 02:44
-
-
Save carlosleopoldo/34afd2c5c9b35d53b9099c54a6bd06ab to your computer and use it in GitHub Desktop.
Instalar xdebug para PHP 7.2 en Homestead
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/sh | |
wget https://xdebug.org/files/xdebug-2.5.5.tgz | |
tar xvzf xdebug-2.5.5.tgz | |
cd xdebug-2.5.5 | |
phpize | |
./configure | |
make | |
sudo cp modules/xdebug.so /usr/lib/php/20160303/ | |
cd /etc/php/7.2/fpm/conf.d/ | |
sudo service php7.2-fpm restart | |
if [ ! -f /etc/php/7.2/mods-available/xdebug.ini ]; then | |
echo "xdebug.ini not found" | |
else | |
sudo truncate -s 0 /etc/php/7.2/mods-available/xdebug.ini | |
sudo sh -c 'echo "zend_extension=xdebug.so" >> /etc/php/7.2/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_enable=1" >> /etc/php/7.2/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_connect_back=1" >> /etc/php/7.2/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_port=9000" >> /etc/php/7.2/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.max_nesting_level=250" >> /etc/php/7.2/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_autostart = 1" >> /etc/php/7.2/mods-available/xdebug.ini' | |
fi | |
if [ ! -f "/etc/php/7.2/cli/conf.d/20-xdebug.ini" ]; then | |
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini /etc/php/7.2/cli/conf.d/20-xdebug.ini | |
else | |
echo '20-xdebug.ini symlink exists' | |
fi | |
sudo service php7.2-fpm restart | |
php -v | |
rm -rf ~/xdebug-2.5.5 | |
rm ~/xdebug-2.5.5.tgz | |
rm ~/package.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment