Closed vinao closed 10 years ago
Hello @vinao,
The route search/index
is not part of audit module.
Hello cornernote good morning!!
thanks by reply, but not am understanding, by I configure all application in destination the paste modules, please me the one example, because my project this understanding down
http://localhost/Auditor/index.php/audit/request
but by bad write, because am brazilian the am estuding english.
very thanks
Hello @vinao,
I am finding it a little difficult to understand your problem. Could you perhaps paste some screenshots, or send me a video screencast by using the following link: http://showmewhatswrong.com/submit/VjVVccesp
I will do my best to help once I understand the problem.
ok ok will send, one screenshots, by accurate solve today the problem :(
Following down the screenshots, remembering that all configuration the extension was performed the folder modules
So the problem is that it breaks your whole site after you install it?
I know, by as how do solve??? have some solution?
if you want I forward the file config.main, for check.
's there?
Yes, paste your main.php (first remove database password and sensitive information)
ok, following down the file the folder main.php
<?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','errorHandler',),
'aliases' => array(
'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
'audit' => realpath(__DIR__ . '/../modules/audit'),
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'bootstrap.helpers.TbHtml',
'application.modules.audit.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'audit' => array(
//'audit.controllers.DefaultController'=>'default',
'class' => 'application.modules.audit.AuditModule',
'userViewUrl' => array('/audit/view', 'id' => '--user_id--'),
'enableAuditField' => true,
'connectionID' => 'db',
'autoCreateTables' => true,
'layout' => 'application.modules.audit.views.layouts.column1',
'gridViewWidget' => 'bootstrap.widgets.TbGridView',
'detailViewWidget' => 'zii.widgets.CDetailView',
'controllerFilters' => array(
'auditAccess' => array('application.modules.audit.components.AuditAccessFilter'),
),
'adminUsers' => array('admin'),
'yiiStrapPath' => 'application/extensions/bootstrap',
),
'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' => 'audit/error',
'trackAllRequests' => true,
'catchFatalErrors' => true,
'auditRequestIgnoreKeys' => array('PHP_AUTH_PW', 'password'),
),
'bootstrap' => array(
'class' => 'bootstrap.components.TbApi',
),
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
'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'=>'webmaster@example.com',
),
);
received?
you identified the error??
you look the main, the my opnion by correct the main
your have some idea??? Good am exiting for food, if possible me reply the afternoon bye
Hello cornernote,
you could solve the problem??
Hi @vinao,
You have errorHandler defined twice.
If removing the old one doesnt help, try removing this line and see if you get any better error message:
'class' => 'application.modules.audit.components.AuditErrorHandler',
.
Let me know how you go.
thank very much this But me sorry, I can not see the error!! remove the line specified in your example!!!
You there!!
hey cornernote,
I managed error pack up, but not show anything on the page?
Hello @vinao,
Please reply just once. I will respond when I have time.
Please remove errorHandler
from the preload
section. Let me know if that helps.
good morning
ok ok, I apologize for the replies, but I did a test here and the error persists!!
Please remove everything to do with the audit module and see if the error persists.
My yii not created the vendor folder does the error this persisting in that?
The vendor folder is created if you installed with composer. (https://getcomposer.org/)
Once you removed all the audit-module stuff from your config, paste the config here so I can check it.
remove all configuration of main?
remove all configuration from yii-audit-module from your config/main.php
It seems that solved the problem, ma has another little problem following just below your description. Error Description : Error 403 You are not allowed to access this page.
after removing all the config for the module, your site works again?
If so, now please add the module back in, one section at a time. Let me know what causes it to break.
No No, I removed the errorHandler class scope main.php
but, that's another mistake I don't know where this coming
I'm not sure where you are at. Can you paste your config file again, and also a screenshot of your current issue?
Im heading to bed now, will check in the morning.
ok ok good night, morning we solve
<?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','errorHandler'),
'aliases' => array(
'audit' => realpath(__DIR__ . '/../modules/audit/views'),
'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'),
),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'bootstrap.helpers.TbHtml',
'application.modules.audit.*',
),
'modules'=>array(
'audi',
'audit' => array(
'class' => 'application.modules.audit.AuditModule',
'userViewUrl' => array('audit/view', 'id' => '--user_id--'),
'enableAuditField' => true,
'connectionID' => 'db',
'autoCreateTables' => true,
'layout' => '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' => realpath(__DIR__ . '/../vendor/yiistrap/bootstrap'),
),
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'12345',
'generatorPaths' => array('application.extensions.bootstrap.gii'),
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
// application components
'components'=>array(
'bootstrap' => array(
'class' => 'application.extensions.bootstrap.components.TbApi',
),
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
'urlManager'=>array(
'urlFormat'=>'path',
'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=Audit',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableProfiling' => true,
'enableParamLogging' => true,
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'class' => 'application.modules.audit.components.AuditErrorHandler',
'errorAction' => 'site/error',
'trackAllRequests' => true,
'catchFatalErrors' => true,
'auditRequestIgnoreKeys' => array('PHP_AUTH_PW', 'password'),
),
'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'=>'webmaster@example.com',
),
);
ai tried to solve this cornernote good rest
You have to login as admin, or add your username to the adminUsers list: 'adminUsers' => array('admin'),
ok ok, thank you very much @cornernote problem solved :+1:. You have email ? we can friends..
Glad to hear it's solved. My email is cornernote@gmail.com
Hello good night
have one problem, when my page update by example following down 127.0.0.1/app1/index.php/search/index
error 404
connection resumed!!!
help me someone please