I know that this sounds odd, but believe me, it's what is happening. Here are my system settings:
Windows7
Apache 2.2
PHP 5.2.12
Xdebug 2.0.5
I have XDebug configured in my PHP.ini file. When I run php -m, I do in fact see that Xdebug is loaded. Now, if I start Apache AS A SERVICE (or by the Apache Monitor), and run phpinfo(), it is NOT showing Xdebug as being loaded.
However, (now here's the crazy part), if I go to my Apache bin directory, and simply run httpd.exe, and then go and look at phpinfo(), Xdebug now shows as being loaded!
Also, comparing some phpinfo() when started via service or by command line, it looks like the php.ini file is the same for either case. Everything looks the same except for the Xdebug being loaded part.
Please, if you have any ideas it would be greatly appreciated.
Verify that Xdebug is properly running by checking again with phpinfo() or php -v as explained above. Note that 9003 is the default port. If this port is used by another service on your system, change it to an unused port. After adding these settings, restart your webserver again.
Alternatively, you can run php --ini on the command line. If there is a file with xdebug in the name, such as /etc/php/7.4/cli/conf. d/99-xdebug. ini , then this is the file to use.
I recently ran into the same issue, but I had to pinhole SELinux to allow httpd access to the xdebug.so module:
chcon -v -R --type=httpd_sys_content_t /path/to/your/xdebug.so
Restarted httpd and everything worked as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With