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"
有没有办法在Ubuntu 16.04上安装Xdebug for Php5?我尝试以与ubuntu 14.04相同的方式安装它,但每次我尝试安装php5-dev时都会收到此错误“E:Package'php5-dev'没有安装候选者”
1 个解决方案
#1
28
you can install xdebug by typing in
您可以通过输入来安装xdebug
sudo apt-get install php-xdebug
then only restart apache
然后只重启apache
sudo service apache2 restart
or if you use NGINX
或者如果你使用NGINX
sudo systemctl restart nginx
or sudo nginx restart
或sudo nginx重启
If you now look at your phpinfo() output, you should see the xdebug.
如果你现在看看你的phpinfo()输出,你应该看到xdebug。
This als wokrs if u installed PHP 5.5 or 5.6 via ppa:ondrej/php Packages
如果你通过ppa:ondrej / php软件包安装了PHP 5.5或5.6,那也很好玩
To install PHP5 version by apt-get look this guid Ubuntu add ondrej/php
要通过apt-get安装PHP5版本,请查看此guid Ubuntu添加ondrej / php
Greetings
Edit: Here the config for Xdebug to use it with PHPStorm and the Browser.
编辑:这里是Xdebug的配置,可以将它与PHPStorm和浏览器一起使用。
Add the following lines to /etc/php//apache2/conf.d/20-xdebug.ini
将以下行添加到/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)
这将仅在远程启动xdebug并允许您通过PHPStorm快速调试(也应该与其他IDE一起使用)
#1
28
you can install xdebug by typing in
您可以通过输入来安装xdebug
sudo apt-get install php-xdebug
then only restart apache
然后只重启apache
sudo service apache2 restart
or if you use NGINX
或者如果你使用NGINX
sudo systemctl restart nginx
or sudo nginx restart
或sudo nginx重启
If you now look at your phpinfo() output, you should see the xdebug.
如果你现在看看你的phpinfo()输出,你应该看到xdebug。
This als wokrs if u installed PHP 5.5 or 5.6 via ppa:ondrej/php Packages
如果你通过ppa:ondrej / php软件包安装了PHP 5.5或5.6,那也很好玩
To install PHP5 version by apt-get look this guid Ubuntu add ondrej/php
要通过apt-get安装PHP5版本,请查看此guid Ubuntu添加ondrej / php
Greetings
Edit: Here the config for Xdebug to use it with PHPStorm and the Browser.
编辑:这里是Xdebug的配置,可以将它与PHPStorm和浏览器一起使用。
Add the following lines to /etc/php//apache2/conf.d/20-xdebug.ini
将以下行添加到/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)
这将仅在远程启动xdebug并允许您通过PHPStorm快速调试(也应该与其他IDE一起使用)