How to install newer version of xdebug

Report any found bug here. We are grateful for any useful clues.

Moderator: severin

Post Reply
northk
Posts: 2
Joined: Fri 1. Feb 2013, 04:35

How to install newer version of xdebug

Post by northk » Fri 1. Feb 2013, 04:45

Greetings all,

While debugging using xdebug in MAMP Pro, I kept getting an error "connection reset by peer" in my web browser. This killed the debug session. I did some research and found that the problem may be due to a bug in the version of xdebug which is packaged with MAMP Pro, and fixed in a newer version of xdebug.

So, how do I install a newer version of xdebug into my existing MAMP Pro installation? I have MAMP Pro 2.1.1. The version of xdebug is 2.2.0 and the newest is 2.2.1. The xdebug.org website only seems to have pre-built binaries for Windows. Do I have to download the source for xdebug and compile it into a shared object file (.so) and then over-write the xdebug shared object that is already installed in MAMP Pro? Or is there an easier way? Would this even work or is there more to it?

Thanks.

northk
Posts: 2
Joined: Fri 1. Feb 2013, 04:35

Re: How to install newer version of xdebug

Post by northk » Tue 5. Feb 2013, 23:11

Update for everyone who might read this:

This update is about getting the error "connection reset by peer" in your web browser while debugging a PHP application with any GUI debugger that uses xdebug. xdebug is included with MAMP and MAMP Pro. This means phpStorm, Eclipse, Apana and others.

xdebug 2.2.1 does in fact fix this problem (which is a known bug in xdebug 2.2.0). Unfortunately as I mentioned I could not find any pre-built xdebug.so library for Mac OS X.

So, I had to download xdebug and build it from source. That wasn't easy as I also had to install additional development tools (autoconf), set my path correctly in my user .profile so the path would point to the MAMP versions of stuff, and download and install all of the php development files ("C" header files such as php.h). These files are not included in the MAMP bundle. Finally I had to run ./config in the php includes directory so it would generate some additional files.

After all this, xdebug.so built properly and I was able to simply replace the xdebug.so that's included with the MAMP bundle. It works great but was a real pain the butt to build. I sincerely hope that the MAMP dev team will build and include xdebug.so version 2.2.1 in an upcoming version of MAMP!

Thanks

eaglerockdude
Posts: 3
Joined: Sat 27. Jul 2013, 14:54

Re: How to install newer version of xdebug

Post by eaglerockdude » Sat 27. Jul 2013, 15:14

Hi newbie here:

I have installed MAMP Pro and I am hit and miss with trying to use my virtual Hosts with PhpStorm(or Netbeans for that matter)...seems all the IDE's want you to just use Mamp/htdocs.

I figure under the surface MAMP must be modifying httpd.conf (<virtual hosts>) or my MAC Snow leopard Host files...but no matter how many .conf and host files I look at, I can find no entries for my virtual hosts defined in my Mamp PRO.

Does anyone have a hint as to Where and how MAMP pro defines virtual hosts, and how I might then use that definition to set up my IDE's when testing etc?

All the posts I find on the internet mostly have to do with setting up xdebug.

The odd thing is...I have ONE project set up in PHPSTORM using a virtual MAMP directory and it seems to work..but when i copy how it's set up to a new one...does not work...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest