2
Below is the code of my main class
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
// preloading 'log' component
'preload'=>array('log'),
'aliases' => array(
'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
'audit' => realpath(__DIR__ . '/../modules/audit'),
),
// autoloading model and component classes
'import'=>array(
'application.controller.*',
'application.components.*',
'application.modules.audit.models.*',
'application.modules.audit.components.*',
//'bootstrap.helpers.TbHtml',
'application.modules.audit.*',
'application.extensions.bootstrap.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'audi',
'audit' => array(
'class' => 'application.modules.audit.AuditModule',
'userViewUrl' => array('/audit/view', 'id' => '--user_id--'),
'enableAuditField' => false,
'connectionID' => 'db',
'autoCreateTables' => true,
'layout' => 'application.modules.audit.views.layouts.column1',
'gridViewWidget' => 'application.extensions.bootstrap.widgets.TbGridView',
'detailViewWidget' => 'zii.widgets.CDetailView',
'controllerFilters' => array(
'auditAccess' => array('application.modules.audit.components.AuditAccessFilter'),
),
'adminUsers' => array('admin'),
'yiiStrapPath' => 'application.vendor.yii-audit-module',
),
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'12345',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths' => array('bootstrap.gii'),
),
),
// application components
'components'=>array(
'errorHandler' => array(
//'class' => 'application.modules.audit.components.AuditErrorHandler',
'errorAction' => 'site/error',
'trackAllRequests' => true,
// 'catchFatalErrors' => true,
'auditRequestIgnoreKeys' => array('PHP_AUTH_PW', 'password'),
),
'bootstrap' => array(
'class' => 'bootstrap.components.TbApi',
),
'user'=>array('allowAutoLogin'=>true,),
'urlManager'=>array(
'urlFormat'=>'path',
//'audit'=>'audit/default',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
/*
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
*/
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableProfiling' => true,
'enableParamLogging' => true,
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class' => 'application.modules.audit.components.AuditLogRoute',
'levels' => 'error, warning, profile, audit',
),
// uncomment the following to show log messages on web pages
/*
array(
'class'=>'CWebLogRoute',
),
*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'[email protected]',
),
);
Below the specified error
I’m starting in Yii and setting up an extension, only the following error is appearing:
Does anyone have any idea how to fix this?
Can you give more details? Describe your server and everything you are using. There is no helping just with the information you gave.
– Guilherme Bernal
I am using the xampp server, what I did @Guilhermebernal configured my main class according to the specification of the site but at the time I will display the Formulars ends up generating the image error
– user3677610
I am using the Yii framework in php, I want to configure the extension Yii-audti-module
– user3677610
Show code. Show the settings you used. Say what "view forms" means. You can do all this editing the question?
– Guilherme Bernal
I put the code to my main class
– user3677610
managed to see the code??
– user3677610
Yes. But I understand very little of the subject to be able to formulate a hypothesis/solution. I asked for information so that others could help, now is to wait.
– Guilherme Bernal
Quiet I’m waiting should be a very simple thing to solve but I’m not seeing the error, I need to fix this :) thank you very much
– user3677610
Good morning @Guilhermebernal got something on the code?
– user3677610
It’s not my area, I don’t know anything about php. As I said, I’m not the one who will help you, I don’t know what the problem is or anything useful to you. Others will come. Meanwhile, always try to improve the question. The better written and more informative you are, the more likely someone will appear.
– Guilherme Bernal
Ta ok thanks so much for the attention
– user3677610
The problem continues or has already been solved?
– Fernando