[xdebug-general] Re: CLI Remote Debug and remote_connect_back

From: Derick Rethans <derick[@]xdebug.org>
Date: Fri, 16 Sep 2016 11:08:12 +0100 (BST)

On Thu, 15 Sep 2016, Pelligra S. wrote:

> So, here is my question: why xdebug ignore the remote_connect_back
> config when we try to debug a cli script?

Because remote_connect_back needs the HTTP REMOTE_ADDR header to see
where the request came from. Requests on the CLI don't have HTTP
headers.

> I can see it causing some kind
> of problem in a production environment, but I think xdebug should not be
> enabled except for some kind of temporary diagnosis, so the problem
> doesn't arise.
>
> Anyway, the `remote_connect_back` description should mention the fact
> that it doesn't work with CLI and that `remote_host` is mandatory in
> that case.

It currently says
(https://xdebug.org/docs/all_settings#remote_connect_back):

        If enabled, the xdebug.remote_host setting is ignored and Xdebug
        will try to connect to the client that made the HTTP request. It
        checks the $_SERVER['REMOTE_ADDR'] variable to find out which IP
        address to use.

I have added some text to clarify that it doesn't work with the CLI.

cheers,
Derick

-- 
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
Xdebug | https://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
Received on Fri Sep 16 2016 - 11:08:12 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST