2

Whenever I try debugging php, I keep getting the two following errors…

  1. “Connection with Zend Debugger was not established” with a link to ‘Validate installation'
  2. “Zend Degubber extension is not installed.” With a link to ‘Show phpinfo.’

After digging around for the last 2 days, I feel like I’ve gotten really close to resolving this but I can’t seem to get past this last hurdle. I'm now stuck at the xdebug.org site where it asked me to run phpinfo and paste the contents into the browser so it could help me to resolve xdebug issues. I did that and it gave me the following info…


  1. Xdebug installed: 2.1.0
  2. Server API: Apache 2.0 Handler
  3. Windows: no
  4. Zend Server: no
  5. PHP Version: 5.3.6
  6. Zend API nr: 220090626
  7. PHP API nr: 20090626
  8. Debug Build: no
  9. Thread Safe Build: no
  10. Configuration File Path: /Applications/MAMP/bin/php/php5.3.6/conf
  11. Configuration File: /Library/Application Support/appsolute/MAMP PRO/conf/php.ini
  12. Extensions directory: /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626

It also gave me some instructions with 9 very simple steps. From step 4, it had me do a bit more troubleshooting, telling me to run ‘phpize’, which I did. It said, “perhaps the wrong ‘phpize’ binary is found on the path, you can run configure as follows

  1. "/full/path/to/php/bin/phpize"
  2. "./configure --with-php-config=/full/path/to/php/bin/php-config"

the results from the 'phpize' gives me the directory of "/usr/include/php/..." and in my case it should be... “./configure --with-php-config=/Applications/MAMP/bin/php/php5.3.6/bin/php-config”. However, when I run './configure...' I get the following error…
“configure: error: cannot find install-sh, install.sh, or shtool in config "."/config”

There’s no “install.sh on my Mac, but there’s a ‘shtool’ and a install-sh. The install-sh is in a ‘python’ directory so I’m assuming it’s not the ‘install-sh’ I need? So I tried running the “configure” command from within the same directory as shtool and it still gave me the “cannot find…” error.

I tried looking up that error, but kept running into roadblocks, mostly with dissimilar environments.

Any ideas are appreciated.

Matt Gibson
  • 14,616
  • 7
  • 47
  • 79
JonDoeCA
  • 407
  • 1
  • 5
  • 15
  • I at least got a laugh for earning a tumbleweed badge for this. For anyone else trying to find a resolution - I wish you well. I know there are many of you out there because I think I looked at all 10,000 sites. Some with solutions, some with seemingly good solutions, none of which worked for me. I gave up. I decided it was time to fold my hand and move on with my tail between my legs. – JonDoeCA Jun 18 '12 at 01:45

1 Answers1

2

I had the same problem 2 days ago, although I got a slightly different error at the end. The problem is twofold: the wrong PHP being used, and the header files being missing, which phpize needs.

Here's the fix:

Phpize and the rest of the xdebug instructions ought to then work.

You will also need to tell PHPStorm that you are using this interpreter rather than the system one, which you can do via the PHP section of the settings.

Community
  • 1
  • 1
Matt Gibson
  • 14,616
  • 7
  • 47
  • 79