Debugging Joomla CLI?

196 views
Skip to first unread message

Mike

unread,
May 7, 2012, 5:59:33 PM5/7/12
to joomla-de...@googlegroups.com
I'm working on a Joomla CLI script, and am having problems trying to debug (eclipse/xdebug).  The CLI script launches from the command line just fine, but when I debug it from within Joomla (as php cli), The script exits with the following error:

Database connection error (1): The MySQL adapter 'mysqli' is not available.

Is there something I can do to debug the script in Eclipse?

Thanks!

Mike

Mark Dexter

unread,
May 7, 2012, 6:21:59 PM5/7/12
to joomla-de...@googlegroups.com
I just tried it with the hello world and database sample applications and the debug works fine. I just right-clicked on the run.php file and said Debug as PHP CLI application. I'm using Eclipse 3.7.2. Mark


Mike

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/clXePjzI8TQJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Mike

unread,
May 12, 2012, 11:37:33 AM5/12/12
to joomla-de...@googlegroups.com
The issue I'm having is that, when debugging CLI in Eclipse, php is not adding the additional ini files from the php5/cli/conf.d directory.  Those include the xdebug.ini, mysql.ini and mysqli.ini.  Without them, I'm hosed.  When I launch the joomla CLI app from the command line, php loads these inifiles.  When I debug as web page, php loads the additional ini files.  I'm only running into this issue when debugging cli code within Eclipse.  Any thoughts on how to get Eclipse to include these additional ini files for CLI debugging?

Thanks!

Mike


Sam Moffatt

unread,
May 12, 2012, 12:17:39 PM5/12/12
to joomla-de...@googlegroups.com
Check you are calling the right version of PHP. Additionally see if
you can pass in some arguments and the use that to get it to parse
those directories. Finally try running a simple PHP info on the
command line and check that it matches what you think it should be.

Cheers,

Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/Wlz1I0Cjc5kJ.

Mark Dexter

unread,
May 12, 2012, 1:01:38 PM5/12/12
to joomla-de...@googlegroups.com
In Eclipse, you can specify the php.ini file to use for each PHP Executable you configure in Preferences->PHP Executables. Good luck. Mark
Reply all
Reply to author
Forward
0 new messages