grayfox wrote: |
I just want to know if it is possible to debug a php script without web server, and without CGI module, just a php CLI utility. |
ddmitrie wrote: |
At the first glance, there should be no problems |
Hello ddmitrie,
about debugging scripts with php cli (no cgi, no webserver):
I have been looking at some source codes (dbg, dbg-cli, sapi/cgi and sapi/cli), and with the help of the current thread I realize how
dbg-cli was setting up environment vars and calling the php binary through execve.
I might be missing something, but so far, I realized that this method doesn't work with php cli.
In DBG source I've found that chk_session_request_post() checks for DBGSESSID in the following php variables:
_POST, HTTP_POST_VARS, _COOKIE, and HTTP_COOKIE_VARS
But, AFAIK it's not possible to set any of those through command line arguments nor environment when using php cli (I guess only php-cgi incorporates the enviromnent variables), thus the DBG would't be activated.
Are the above thoughts correct?
If not, the procedure to debug using dbg-cli & php (cli) is the same documented??
Thanks in advance,
Thiago Silva