Xdebug for Php 5.6 on Ubuntu 16.04

断了今生、忘了曾经 提交于 2019-12-20 09:55:08

问题


Is There is a way to install Xdebug for Php5 on Ubuntu 16.04? I've tried to install it the same way as ubuntu 14.04 but every time I try to install php5-dev I get this error "E: Package 'php5-dev' has no installation candidate"


回答1:


you can install xdebug by typing in

sudo apt-get install php-xdebug

then only restart apache

sudo service apache2 restart

or if you use NGINX

sudo systemctl restart nginx

or sudo nginx restart

If you now look at your phpinfo() output, you should see the xdebug.

This als wokrs if u installed PHP 5.5 or 5.6 via ppa:ondrej/php Packages

To install PHP5 version by apt-get look this guid Ubuntu add ondrej/php

Greetings

Edit: Here the config for Xdebug to use it with PHPStorm and the Browser.

Add the following lines to /etc/php//apache2/conf.d/20-xdebug.ini

xdebug.remote_host = localhost
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req

This will start xdebug only at remote and allows you fast to debug by PHPStorm (should also work with other IDE's)



来源:https://stackoverflow.com/questions/38370395/xdebug-for-php-5-6-on-ubuntu-16-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!