Reputation: 407
Whenever I try debugging php, I keep getting the two following errors…
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…
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”
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.
Upvotes: 2
Views: 1793
Reputation: 14959
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.
Upvotes: 2