pal4life
pal4life

Reputation: 3378

Xdebug installed but does not display in Phpinfo for Xampp

I have the latest Xampp and Php 5.3 on Mac Mountain Lion oSX 10.8.2. I just installed Xdebug and configured it in the php.ini. I downloaded from this link and followed the instructions. Also put the following entries in php.ini

[Xdebug]
zend_extension=”/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so”
xdebug.remote_port = 9000
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/Applications/XAMPP/xamppfiles/temp"
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_enable = On
xdebug.trace_output_dir = "/Applications/XAMPP/xamppfiles/temp"

Php -m displays the Xdebug modules but the phpinfo() does not show Xdebug. Read the solutions to questions Why is xdebug not showing up in phpinfo() and No xdebug in phpinfo() and it does not work for me. Note: I have restarted my Apache from Xampp Control multiple times.

Suggestions on

  1. Any ways to rectify this?
  2. Would Xdebug still work for me on my Eclipse Studio?
  3. How can I provide permission to httpd to access Xdebug on Moutain Lion?

Thanks.

Upvotes: 2

Views: 5562

Answers (2)

user2812481
user2812481

Reputation: 154

Make sure that the zend_extension path actually exists your your machine.

Your particular path seems like it is not valid.

zend_extension=”/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so”

I made the mistake of copying and pasting the path from some tutorial, but mine was actually located on this path:

/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so

Also, make sure that you are editing /Applications//XAMPP/xamppfiles/etc/php.ini, which is the php.ini associated with XAMPP. Which can easily be confused with /etc/php.ini which may be present on your machine.

Here is what I added to my php.ini for reference:

[xdebug]
zend_extension="/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-2012121/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

Upvotes: 2

pal4life
pal4life

Reputation: 3378

So this was more of a port issue on Mountain Lion. By default 9000 is assigned by Mac for firewall stuff and it kept assigning various ports for one or the other thing. I utilized Network Utility Port Scan on Mac to check for available ports. Also running the php script described below may give some debugging info as provided here

The detailed Configuring Eclipse part from this Stack Overflow Question helped the most.

Upvotes: 1

Related Questions