Page 1 of 1
HowTo enable/show debug output while installing a module ??
Posted: Sat Mar 19, 2005 10:34 pm
by ghostrifle
Hey there,
I have stupid error somewhere in my adodb code while installing my module. The problem is now I can't find the error. So I tried to enable debugging etc... but there' no output available during installing / uninstalling a module.
There' for sure an option or something similar... so.. please tell me
uhhmm.. and is there a "global debugging variable" ??
Bye, ghostrifle
Re: HowTo enable/show debug output while installing a module ??
Posted: Sun Mar 20, 2005 12:58 am
by ghostrifle
Well,
this line of code just enables reporting on all php errors. But I think this is not the problem I have... In my install() method of my module, I'm creating several tables.. and one of it doesn't gets created. So, now I want to see the ADODB debug messages with turning on $this->cms->db to true. Well, doing this on normal module output works except in the install() method.
Code: Select all
/**
* method which gets called by the plugin-manager of CMS to install the module
*/
function Install()
{
error_reporting (E_ALL);
$this->setupVars();
$db = $this->cms->db;
$db->debug = true;
//creating ADODB dictionary
//for reading: http://phplens.com/lens/adodb/docs-datadict.htm
$dict = NewDataDictionary($db);
//what type of table and database do we use ??
$tabletype = array('mysql' => 'TYPE=MyISAM');
// we need another table for our reselling stuff...dvds etc
// this is the table which causes me problems!
$fields ="
id I KEY AUTO,
review_fk I,
img_logo C(255),
text X,
url C(255)
";
$sqlarray = $dict->CreateTableSQL(cms_db_prefix(),"module_moviereview_reselling",$fields,$tabletype);
if($sqlarray == false)
return false;
if($dict->ExecuteSQLArray($sqlarray) == 0)
return false;
etc.......
The only error I'm getting is in my php log files:
Code: Select all
[client 127.0.0.1] PHP Warning: implode(): Bad arguments. in /var/www/asia-addi ct/lib/adodb/adodb-datadict.inc.php on line 660, referer: http://localhost/asia- addict/admin/plugins.php
Well but the code runs.... so I wanted to see whole output generated by adodb.... any suggestions ??
ghostrifle
Re: HowTo enable/show debug output while installing a module ??
Posted: Sun Mar 20, 2005 3:09 am
by Ted
Turn on debug in config.php