- Install the latest version of xdebug in PEAR repository:
- sudo apt-get install php5-dev php-pear
- Install xdebug through PECL:
- sudo pecl install xdebug
- Now, you need to find the path of the compiled module (xdebug.so):
- find / -name 'xdebug.so'
- Copy the found file-path to use in the next steps.
- Now we need to configure xdebug with PHP5, so open the php.ini file (usually you'll find it in /etc/php/apache2/php.ini) use gedit to edit the file:
- sudo gedit /etc/php/apache2/php.ini
- sudo vim /etc/php/apache2/php.ini
- Add the following lines to the file [Note that the first line should contain the file path found in step number 3]:
- zend_extension="/usr/lib/php5/20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000 - Finally, you need to restart apache for the changes to take effect:
- sudo /etc/init.d/apache2 restart
No comments:
Post a Comment