How to do remote debug in PHPstorm with xdebug?

Help me upgrade PHP on my MacOS X so I can run xDebug!

  • I want to upgrade the native version of PHP on my Macbook running MacOS X and I am not having much luck. Snowflakes inside... I am running through the Murach book "PHP/MySQL". In chapter 6 he goes over how to debug a PHP application using Netbeans and xDebug. First you have to get Netbeans and xdebug working on your computer - in my case a Macbook running MacOS 10.8.5. I tried the instructions listed in the appendix of the book (download Netbeans, then download the xDebug binary) first to no avail. Netbeans works great but xDebug fails to load and I can't work any of the exercises thereafter until I do. I should mention I started with XAMPP which worked fine but couldn't get xDebug to work with it. So I tried MAMP, same thing. Then I uninstalled both of these and thought I would go the brute force method and try upgrading native PHP and installing mySQL without MAMP or XAMPP, by following these 2 guides: http://www.coolestguidesontheplanet.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion http://computers.tutsplus.com/tutorials/upgrading-the-native-php-installation-on-os-x-mountain-lion--mac-4920 Works great except instead of the latest version of PHP, I still get the old one reported when I do a "php -v". Also, absolutely no php pages work now under apache. Is there a better way to do this? Do I even need to fool with xDebug to learn PHP/mySQL?! I've spent waay too much time on this now as it is.

  • Answer:

    Try installing via this route, I've never tried compiling my own http://php-osx.liip.ch

dukes909 at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

No that was one of the instructions in the 2nd link above. That line in the httpd.conf is already good to go.

dukes909

Thanks Derbs - this worked!

dukes909

Ok, I found a syntax error in the httpd.conf - now apache is running and I can load all pages: html and php. phpinfo.php however reports the old version: 5.3.26

dukes909

In httpd.conf, what's in the 'listen' section? # Listen: Allows you to bind Apache to specific IP addresses and/or.....

derbs

Ah... is something else listening on port 80?

derbs

Stumped. Try this: • Try using http://127.0.0.1/~whatever/test.php • Try using http://{your-ip}/~whatever/test.php • Open a terminal and type "telnet localhost 80" - does it say "Connected to localhost"...?

derbs

Ok, I'm seeing errors in /var/systemlog: Dec 4 10:25:58 mcb com.apple.launchd[1] (org.apache.httpd[1058]): Exited with code: 1 Dec 4 10:25:58 mcb com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds What's error code 1?

dukes909

No, it's port 80. No pages load now, even simple one line of text html pages.

dukes909

Ah ok sorry. So you're getting an 'unable to connect' error when you try and load any php page? I know with MAMP and others, you browse to http://localhost:8001 or whatever port. Are you sure you're not trying to use 8001?

derbs

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.