In this tutorial you will learn how to install Xdebug on Ubuntu Server.
Code used during this tutorial:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# Install Xdebug on Ubuntu Server # Do not install Xdebug on a production env # Scurity problems # Make the machine work slower # PHP Version number # PHP 5.5.9-1ubuntu4.13 (cli) (built: Sep 29 2015 15:24:49) # Copyright (c) 1997-2014 The PHP Group # Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies # with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies php -v cd /var/www/http.liviubalan.com/ vi phpinfo.php <?php phpinfo(); vi array.php <?php $arr = array( 'test', 'k' => array( 1, 2, ), ); var_dump($arr); # Browser http://http.liviubalan.com/phpinfo.php#module_xdebug http://http.liviubalan.com/array.php # Install XDebug sudo apt-get update sudo apt-get install php5-xdebug # PHP Version number # PHP 5.5.9-1ubuntu4.13 (cli) (built: Sep 29 2015 15:24:49) # Copyright (c) 1997-2014 The PHP Group # Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies # with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies # with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans php -v # Find xdebug.so # /usr/lib/php5/20121212/xdebug.so sudo find / -name xdebug.so # Edit php.ini sudo vi /etc/php5/apache2/php.ini [Xdebug] zend_extension = "/usr/lib/php5/20121212/xdebug.so" xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_host = 127.0.0.1 xdebug.remote_port = 9000 xdebug.max_nesting_level = 300 # Restart Apache sudo service apache2 restart Useful links: http://purencool.com/installing-xdebug-on-ubuntu http://wylbur.us/2014-06-17-add-xdebug-to-ubuntu-1404 |
Useful links:
http://purencool.com/installing-xdebug-on-ubuntu
http://wylbur.us/2014-06-17-add-xdebug-to-ubuntu-1404