Score:0

PHP FPM XDebug unavailable for new user on Ubuntu

bj flag
  1. My Ubuntu 22.04 is running PHP-FPM 7.2, 7.4 and 8.1 with XDebug enabled
  2. When I run php -i | grep xdebug in root or my primary account, I see alot of related settings
  3. I created another dev1 account, but no related settings appear when running php -i | grep xdebug

I must be missing something simple, any idea what it is??

khgasd652k avatar
br flag
I think you should give context about how you manage to run PHP 7.2, 7.4, and 8.1 at the same time because as I know, the default for Ubuntu 22.04 is PHP 8.1. For initial debug, when you run php -i | grep php.ini , you can see the location from every php.ini files. You can compare thre result from primary account and the dev1 account to make sure that they load the same php
bilogic avatar
bj flag
My point was to indicate I'm using FPM (not the default PHP) and the reason for using FPM is so that I can run multiple versions of PHP together, that's how cpanel does it. Yes, both are the same binary using the same php.ini
khgasd652k avatar
br flag
Well, you can print out the output of php -i on main account and php -i from dev1 account and paste it here. If the xdebug module is not available on dev1 account but available on main account, there must be something different on the php.ini or php-fpm configuration that loaded by both account.
Score:0
bj flag

Ok, I managed to make 1 change to fix this, although I don't understand why. First, I need to add more context:

  1. Ubuntu is running as a VirtualBox guest
  2. PHP projects reside on mounted folders from the Windows 10 host
  3. /var/www/stage - mounted as root, has XDebug settings
  4. /var/www/dev1 - mounted as dev1, no XDebug settings

That is, until I added dev1 into the vboxsf group in /etc/group, which fixes this strange behavior.

The main thing I don't understand is how PHP managed to run, but XDebug decided to exclude itself. If it was a permissions issue, my expectation was for PHP not to run.

Do edit and add on the real answer if you know why. Thank you!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.