0
votes

I came across a very annoying problem today. Sometimes I have to debug php command line scripts, for this I used Eclipse PDT with Zend Debugger. It was buggy, but it worked. Until I updated my PDT, and now none of my cli debug configurations work ('PHP Web Page' types do fine, only cli is wrong). If I try to start one, I get an error message:

The debug session could not be started. Please make sure that the debugger is properly configured as a php.ini directive.

This is very interesting, since the update of Eclipse was the only change I made. What could be the problem? I'm using Eclipse Helios, PHP 5.3.2 with Zend Debugger 5.2 on Ubuntu 10.04.

1
Do you keep backup of php.ini before update? If you does, just compare the latest php.ini with your backup, some of the zend extension might omitted in the latest installationajreal
@ajreal I don't really understand what do you mean, no changes of PHP were made, I only updated the IDE because it was buggy (Many times crashed during debug). According to the cli phpinfo Zend Debugger is enabled, and its config is the same as in the phpinfo of the webserver (which works well).sallaigy

1 Answers

2
votes

I just ran into a similar issue, also after only the IDE (eclipse) was updated. I think this may be a bug.

I am using xdebug not zend debug, and html debugging is working fine. Cli debug (any way you try, just does not debug)

From what I can see, the debug directives for Cli debugging is not loading the correct php.ini file, and defaulting to some 'plain vanilla file??' (hence why it does not find your zend ini directives)

I can see this happening by creating a simple .php file that just outputs phpinfo() When the cli is run (or debug) from eclipse you get: (and I have /etc/php5/apache2/php.ini in my 'optional' php.ini file location in prefs)

----- snip ---- ....

Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /tmp/zend_debug/session1681149270511982227.tmp/php.ini

..... ----- snip ----

Running that from actual command line gives: (ubuntu 10.10)

----- snip ---- ....

Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini

..... ----- snip ----

If you setup your breakpoints inside eclipse, and start the script from the shell, the breakpoints activate (in my case it even runs to a zend_debug folder, and I am using xdebug)