Fork me on GitHub

Configuring config.php for DB output  Bottom

  • I would like to know how i configure config/config.php in order for zikula to log all SQL statements preferably in the table zikula_sc_log_event.
  • Better have a lot of disk space. Not sure how to do that but that thing will fill up rather quickly for a site with even decent activity.
  • You should look into the ADOdb logging functions, if you require clever SQL debugging. However, as far as I know there is no interface in DBUtil / Zikula for this.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • I was hoping some of the settings in config.php would enable me to do just that, more precisely this part but i can't seem to get it to work:

    // ----------------------------------------------------------------------
    // Debugging/Tracing settings
    // ----------------------------------------------------------------------
    $PNConfig['Debug']['debug'] = 0; //
    $PNConfig['Debug']['pagerendertime'] = 0; // display page render time, 0 to disable
    $PNConfig['Debug']['sql_adodb'] = 0; // adodb debug flag, generates lots of print output
    $PNConfig['Debug']['sql_count'] = 0; // count SQL statements, 0 to disable
    $PNConfig['Debug']['sql_time'] = 0; // time SQL statements, 0 to disable
    $PNConfig['Debug']['sql_detail'] = 0; // collect executed SQL statements, 0 to disable
    $PNConfig['Debug']['sql_data'] = 0; // collect selected data, 0 to disable
    $PNConfig['Debug']['sql_user'] = 0; // user filter, 0 for all, any other number is a user-id, can also be an array
  • usually this

    Code

    $PNConfig['Debug']['debug'] = 1; //
    $PNConfig['Debug']['sql_adodb'] = 1;


    should be enought, but i don't know if ALL the queries are displayed

    if you wan't a more rustic (and working) way to do it , you can simply look for "adodb-mysql.inc.php" and

    before

    Code

    mysql_query($sql,$this->_connectionID);


    around line 507

    add

    Code

    echo $sql."<br/>";// or any code to log the output in a different way




    edited by: mumuri, Jan 14, 2009 - 04:12 AM

This list is based on users active over the last 60 minutes.