How to display page profiling results in Yii

In your /protected/config/main.php, update the variables ['db']['enableProfiling'] as well as a add CProfileLogRoute class. It should look like the following:

<?php
return array(
  "db" => array(
    "enableProfiling" => true;
    "connectionString" => "mysql:host=localhost;dbname=db_name",
    "emulatePrepare" => true,
    "enableParamLogging" => true,
    "username" => "root",
    "password" => "",
    "charset" => "utf8",
  ),
  "log" => array(
    "class" => "CLogRouter",
    "routes" => array(
      array("class" => "CProfileLogRoute"),
      array("class" => "CFileLogRoute", "levels" => "error, warning, trace",),
    ),
  ),
);
?>

This is for the PHP framework Yii Framework.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>