3

Until yesterday I used Ubuntu 14.04 with php5.5 and nginx, everything working perfectly including xdebug.

I then updated to php5.6 via

sudo add-apt-repository ppa:ondrej/php5-5.69
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install php5

which had a lot automatically other php updates afterwards. After this xdebug was not working anymore and giving me some shell errors, since it was build for the wrong php version, so I uninstalled and reinstalled it via

sudo pecl install xdebug

Now I don't get any shell errors anymore, but it's not working correctly. If I disable xdebug in php.ini my local server runs with nginx as expected, so the basic setup is correct.

If I activate xdebug in php.ini and request a local page the request hangs as if I had enabled xdebug and set a breakpoint somewhere in my code, but I didn't. Executing php from command line does work interestingly.

My current /etc/php5/mods-available/xdebug.ini look like

zend_extension=xdebug.so
xdebug.max_nesting_level=1000
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.profiler_enable=0
xdebug.profiler_output_dir = /var/log/xdebug

and is included via symlink both into /etc/php5/cli/conf.d and into /etc/php5/fpm/conf.d. Also checking php -m on command line says that xdebug is included as Zend-Module.

Shifting the port to 9001 is on purpose, since fastcgi is running on port 9000.

nginx log are fine, xdebug logs don't exist (directory is empty) and fpm logs only saying

NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

Any idea what to do or where to have a look?

Ron
  • 20,518
  • 6
  • 57
  • 72
SBH
  • 190
  • 5
  • 11
  • 5
    Possible duplicate of [Install xdebug in Ubuntu 16 with php5 - error: can't read ltmain.sh](https://askubuntu.com/questions/746742/install-xdebug-in-ubuntu-16-with-php5-error-cant-read-ltmain-sh) – Zanna Dec 21 '18 at 16:35
  • @Zanna the question you linked adresses a different issue. I don't have installation problems, but configuration. Also the suggested solution of the linked question is already included in my question description – SBH Dec 29 '18 at 20:31
  • Oh... did you find out any more about this? Are you satisfied with your answer or still looking for help? – Zanna Dec 29 '18 at 20:36
  • I solved my problem with the described configuration change, but it doesn't feel like a clean solution. Or rather I didn't understand why that fixed the issue while letting me use xedbug at the same time. Back then I didn't investigate further since I was able to use my system that way without any problems and today I am using a different computer and don't have a chance to investigate anymore – SBH Dec 29 '18 at 20:59

1 Answers1

1

I removed zend_extension=xdebug.so from /etc/php5/mods-available/xdebug.ini and now I am able to access pages again while still useing xdebug?!

I didn't find any other file where xdebug would be included in any php.ini, so I am a little bit confused. Maybe someone else has a more complete answer.

SBH
  • 190
  • 5
  • 11