Install and enable Xdebug on MAMP PRO

I am trying to configure Xdebug on my MAMP PRO installation. I tried xdebug.org/wizard.php to get the correct version of Xdebug with custom installation instructions, but I'm stuck.

According to step 4 in the user installation instructions , I should get the following output:

Configuring for: ... Zend Module Api No: 20100525 Zend Extension Api No: 220100525 

But my conclusion is as follows:

 Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 

Next I will try the instructions at xdebug.org/docs/faq#custom-phpize, because the corresponding installation instructions advise me to do this.

I canceled the first step by deleting xdebug-2.2.1.tgz and the unzipped folder, and then start again from step 1. My input for step 4 is

 /Applications/MAMP/bin/php/php5.4.4/bin/phpize 

and the conclusion is read as follows:

 grep: /Applications/MAMP/bin/php/php5.4.4/include/php/main/php.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_modules.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: 

I assume that I need to install php.h, zend_modules.h and zend_extensions.h, but I can not find them on the Internet. What's the best way to get started with installing Xdebug?

Thanks.

+4
source share
2 answers

The creators of MAMP did not release the regular open source component package with release 2.1.1, so you will need to do the following. php.h, zend_modules.h and zend_extensions.h can be found in the source code for PHP 5.4.4. Here is a link to the source page: http://us2.php.net/get/php-5.4.4.tar.gz/from/a/mirror

You want to extract this, and move the folder to / Applications / MAMP / bin / php / php 5.4.4 / include, creating the include directory if necessary. I believe you need to run ./configure from / Applications / MAMP / bin / php / php 5.4.4 / include / php, as well as to create Zend headers. Then try the instructions you found again.

+13
source

Thanks for working for me. You have to run

./Configure

and

to do

to generate missing zend headers.

0
source

All Articles