Show all entries from oxconfig

CLI script to read all entries from oxconfig in clear text

defined('SHOPBASEPATH')
    || define('SHOPBASEPATH', realpath(dirname(__FILE__) . '/../htdocs'));

require_once(SHOPBASEPATH. "/core/oxfunctions.php");
require_once(SHOPBASEPATH. "/core/adodblite/adodb.inc.php");

function getShopBasePath()
{
    return SHOPBASEPATH . '/';
}

$oDb = oxDb::getDb();

$sQ  = "SELECT oxvarname, oxvartype, DECODE( oxvarvalue, '" . oxConfig::getInstance()->getConfigParam( 'sConfigKey' ) . "') as oxvarvalue from oxconfig";

$oRs = $oDb->execute( $sQ );

if ( $oRs != false && $oRs->recordCount() > 0 ) {
    while ( !$oRs->EOF ) {
        echo $oRs->fields[0] . ' [' . $oRs->fields[1] . ']:  ' . $oRs->fields[2] . "\n\n";
        $oRs->moveNext();
    }
}

Originally posted at
http://forum.oxid-esales.com/showthread.php?t=16903#post107306



2 replies
  1. Jan Mueller
    Jan Mueller says:

    Funzt das noch?
    Bei mir – nicht als CLI aufgerufen (da nicht installiert) – klappt’s nicht.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *