2

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.

Community
  • 1
  • 1
pal4life
  • 3,210
  • 5
  • 36
  • 57
  • Have you bounced apache? – paulgrav Dec 26 '12 at 22:43
  • 2
    Restarted Apache from Xampp Control – pal4life Dec 26 '12 at 22:46
  • 1
    When you installed Xdebug, it might have used OSX’s own version of PHP to build. Also check the php.ini location in phpinfo() and the extensions directory, then check to see whether that matches what you see if you run `php -i`. – paulgrav Dec 26 '12 at 22:54
  • There was a xdebug.so from Xampp but I downloaded from http://xdebug.org/wizard.php and also followed the instructions they mentioned, to compile one for my system. I think its already there and loaded,just not showing under phpinfo() – pal4life Dec 27 '12 at 15:19

2 Answers2

2

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
user2812481
  • 124
  • 5
1

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.

Community
  • 1
  • 1
pal4life
  • 3,210
  • 5
  • 36
  • 57