Jump to content

Installing X-DEBUG in a MacOS Environment


iwato

Recommended Posts

Background: In boen_robot's recent post to my question about the pack() function I found mention of a piece of software called Xdebug. In my zeal to get off to a good start this year I found a copy of Xdebug that is suppose to be compatible with my OS and PHP interpreter, downloaded it, and tried to install it. I failed. It appears that autoconf is not installed on my computer. I now have a copy, but do not know how to install it. I am working in a MacOS 10.5.8, MAMP 1.9.4, PHP5.3 environment. For the moment, I do not have access to either Xcode or MacPorts.What I have learned how to do is set my current directory -- my sole accomplishment after many hours of otherwise futile research.Question: How does one go about installing autoconf?Roddy

Link to comment
Share on other sites

Are you sure you need autoconf - how did you try to install Xdebug? As the autoconf documentation says, "The configuration scripts produced by Autoconf are self-contained, so their users do not need to have Autoconf (or GNU M4)". Autoconf is generally only for when you want to package your own source for automatic configuration by other people.Anyway, to install autoconf you first need to install M4 (http://www.gnu.org/software/m4/m4.html), then you should be able to install it the normal way (./configure; make; make install).

Link to comment
Share on other sites

It also sounds like you're trying to compile XDebug... but there's really no reason.You can just use the PECL installer. You should have it already, and if not, you may install the PEAR installer, which in turn installs the PECL one.Once you have it, installation should be as simple as

pecl install xdebug

Coupled with a simple alteration of php.ini... see "PECL Installation" on the XDebug site.

Link to comment
Share on other sites

Are you sure you need autoconf - how did you try to install Xdebug?
Like this: 1. Unpack the tarball: tar -xzf xdebug-2.1.0.tgz. Note that you do not need to unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above. 2. cd xdebug-2.1.0 3. Run phpize: phpize (or /path/to/phpize if phpize is not in your path). Make sure you use the phpize that belongs to the PHP version that you want to use Xdebug with. See this FAQ entry if you're having some issues with finding which phpize to use. 4. ./configure --enable-xdebug 5. make 6. make installWhat I got in return was this:xdebug-2.1.0 iwato$ phpizegrep: /usr/include/php/main/php.h: No such file or directorygrep: /usr/include/php/Zend/zend_modules.h: No such file or directorygrep: /usr/include/php/Zend/zend_extensions.h: No such file or directoryConfiguring for:PHP Api Version: Zend Module Api No: Zend Extension Api No: Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.
Anyway, to install autoconf you first need to install M4 (http://www.gnu.org/software/m4/m4.html), then you should be able to install it the normal way (./configure; make; make install).
Thank you, I have downloaded it, but am hesitant to install it, as I still do not know what I am doing.Roddy
Link to comment
Share on other sites

What you're doing is trying to compile XDebug into PHP...

Note that you do not need to unpack the tarball inside the PHP source code tree
which in turn required that you also have the PHP source. That's probably what the autoconf message, along with everything else, reffers to - all of those are not found because there's no PHP source available. XDebug doesn't require that you unpack it in the tree, but you still need to have the tree to begin with.But like I said, you don't need to do that. You can just use PECL.
Link to comment
Share on other sites

It also sounds like you're trying to compile XDebug... but there's really no reason.
Well, this is good to hear. It is not a message that speaks our very loudly in the literature, however.
You can just use the PECL installer. You should have it already, and if not, you may install the PEAR installer, which in turn installs the PECL one.
I have two UNIX executable files in my PHP5.3 bin folder; one is called PEAR and one is called PECL. Are these what you mean?
Once you have it, installation should be as simple as
pecl install xdebug

Coupled with a simple alteration of php.ini... see "PECL Installation" on the XDebug site.

I have two php.ini files. Which one?Configuration File (php.ini) - (Applications folder)Loaded Configuration File - (Library)Roddy
Link to comment
Share on other sites

Well, this is good to hear. It is not a message that speaks our very loudly in the literature, however.
And yet people keep asking me why don't I use UNIX... THAT basically sums it up.
I have two UNIX executable files in my PHP5.3 bin folder; one is called PEAR and one is called PECL. Are these what you mean?
Yep.
I have two php.ini files. Which one?Configuration File (php.ini) - (Applications folder)Loaded Configuration File - (Library)Roddy
The loaded one... since that's what's in effect. Any time in the future you're to make changes to php.ini, it's assumed that you should alter whichever is going to be in effect.I don't know if MAMP is doing anything behind the scenes though... it may turn out that you need to edit the application one (or a third php.ini?) which will be merged with the loaded one upon web server restart or something... that's the main thing that made me switch from XAMPP to manual AMP installation (that, and the gift of easy reinstallation that comes if you do things right). Anyhow, try the loaded one first.
Link to comment
Share on other sites

I don't know if MAMP is doing anything behind the scenes though... it may turn out that you need to edit the application one (or a third php.ini?) which will be merged with the loaded one upon web server restart or something... that's the main thing that made me switch from XAMPP to manual AMP installation (that, and the gift of easy reinstallation that comes if you do things right). Anyhow, try the loaded one first.
This is what I found
[xdebug];zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

It appears that my xdebug.so file was intentionally placed in a folder designed to deactivate the program.Roddy

Link to comment
Share on other sites

What do you mean, a directory can't "deactivate" a program. If the files are in that location, and PHP knows where to look, that should be fine.
I don't know if MAMP is doing anything behind the scenes though... that's the main thing that made me switch from XAMPP to manual AMP installation...
Roddy
Link to comment
Share on other sites

Errr... does XDebug work now, or what?
Here is what I sent to the MAMP-Pro Forum, as I am afraid to take any action on my own for fear of messing something else up. You know, like an object listener sending a message to another object telling it to do something else, that I do not want it to do.
Installing Xdebug 2.1.0 in MAMP-Pro 1.9.4/PHP5.3 EnvironmentPostby iwato ยป Wed Jan 05, 2011 12:30 pmBackground: This is not an entirely new question, as a quick search in the forum's data base will show. However, things have changed since the last time this question was asked, and the discussion that resulted then was incomplete. So, I am asking a similar question again.Question: What is the proper installation procedure for Xdebug 2.1.0 in a MAMP-Pro 1.9.4/PHP5.3/MacOS 10.5.8 environment.
So far, there have been 10 views, but no reply.Roddy
Link to comment
Share on other sites

Your reply to my question doesn't explain why you think this is true:

It appears that my xdebug.so file was intentionally placed in a folder designed to deactivate the program.
Why do you think it appears that's the case?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...