1

I am using native PHP and native Apache. PHP version is 5.5. userdir module in Apache is enabled, and I have my PHP codes under ~/Sites. Localhost URL is localhost/~username. I have installed XDebug and I am configured it with Vdebug plugin. In phpinfo() it says the extension is enabled.

I am not able to access localhost from port 9000. When I visit this URL http://localhost/~subhojit:9000 it returns access forbidden. Not just 9000 port, even if I am entering port 80 like this http://localhost/~subhojit:80, it returns access forbidden. But I am able to access PHP websites using virtual hosts or from localhost URLs like this http://localhost/~subhojit/phpwebsite.

I am not sure what I am doing wrong. Please help.

1

To get vdebug (or any php debugger client) to work, you don't visit port 9000 in your browser. That's the port that vdebug and xdebug use to talk to each other. You just need to visit the URL as normal.

The process is this:

  1. Start vdebug with F5 (default)
  2. Visit the URL that you want to debug, but add the query parameter XDEBUG_SESSION_START=1 (e.g. http://localhost/~subhojit/phpwebsite?XDEBUG_SESSION_START=1)
  3. Go back to vim - a connection will have been made if both xdebug and vdebug were configured correctly

Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .