Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8781703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:22:24+00:00 2026-06-13T20:22:24+00:00

i get this error when i try to do an admin action for list

  • 0

i get this error when i try to do an admin action for list all entity instantiated of a specific class:

include(authenticate.php): failed to open stream: No such file or directory
/home/user/NetBeansProjects/yii/framework/YiiBase.php(423)

{
412                             include($classFile);
413                             if(YII_DEBUG && basename(realpath($classFile))!==$className.'.php')
414                                 throw new CException(Yii::t('yii','Class name "{class}" does not match class file "{file}".', array(
415                                     '{class}'=>$className,
416                                     '{file}'=>$classFile,
417                                 )));
418                             break;
419                         }
420                     }
421                 }
422                 else
423                     include($className.'.php');
424             }
425             else  // class name with namespace in PHP 5.3
426             {
427                 $namespace=str_replace('\\','.',ltrim($className,'\\'));
428                 if(($path=self::getPathOfAlias($namespace))!==false)
429                     include($path.'.php');
430                 else
431                     return false;
432             }
433             return class_exists($className,false) || interface_exists($className,false);
434         }
435         return true;

CGridView in admin file of view folder

<?php $this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'utente-crea-evento-grid',
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
        'id',
        'status',
        'username',
        'password', other properties

admin action

public function actionAdmin()
    {
        $model=new UtenteCreaEvento('search');
        $model->unsetAttributes();  // clear any default values
        if(isset($_GET['UtenteCreaEvento']))
            $model->attributes=$_GET['UtenteCreaEvento'];

        $this->render('admin',array(
            'model'=>$model,
        ));
    }

more stack trace info

#0  
+  /home/sigturk/NetBeansProjects/yii/framework/YiiBase.php(423): YiiBase::autoload()
#1  
+  /home/sigturk/NetBeansProjects/yii/framework/YiiBase.php(298): YiiBase::autoload("authenticate")
#2  
+  /home/sigturk/NetBeansProjects/yii/framework/validators/CValidator.php(187): YiiBase::import("authenticate", true)
#3  
+  /home/sigturk/NetBeansProjects/yii/framework/base/CModel.php(285): CValidator::createValidator("authenticate", UtenteCreaEvento, "password", array())
#4  
+  /home/sigturk/NetBeansProjects/yii/framework/base/CModel.php(259): CModel->createValidators()
#5  
+  /home/sigturk/NetBeansProjects/yii/framework/web/helpers/CHtml.php(1871): CModel->getValidators("numTel")
#6  
+  /home/sigturk/NetBeansProjects/yii/framework/web/helpers/CHtml.php(1217): CHtml::activeInputField("text", UtenteCreaEvento, "numTel", array("name" => "UtenteCreaEvento[numTel]", "id" => "UtenteCreaEvento_numTel"))
#7  
+  /home/sigturk/NetBeansProjects/yii/framework/web/widgets/CActiveForm.php(658): CHtml::activeTextField(UtenteCreaEvento, "numTel", array())
#8  
–  /home/sigturk/NetBeansProjects/sitoEventi/protected/views/utenteCreaEvento/_search.php(42): CActiveForm->textField(UtenteCreaEvento, "numTel")
37         <?php echo $form->textField($model,'cognome',array('size'=>60,'maxlength'=>128)); ?>
38     </div>
39 
40     <div class="row">
41         <?php echo $form->label($model,'numTel'); ?>
42         <?php echo $form->textField($model,'numTel'); ?>
43     </div>
44 
45     <div class="row">
46         <?php echo $form->label($model,'numEventiCreati'); ?>
47         <?php echo $form->textField($model,'numEventiCreati'); ?>
#9  
+  /home/sigturk/NetBeansProjects/yii/framework/web/CBaseController.php(127): require("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...")
#10 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...", array("model" => UtenteCreaEvento), true)
#11 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(870): CBaseController->renderFile("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...", array("model" => UtenteCreaEvento), true)
#12 
–  /home/sigturk/NetBeansProjects/sitoEventi/protected/views/utenteCreaEvento/admin.php(40): CController->renderPartial("_search", array("model" => UtenteCreaEvento))
35 
36 <?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
37 <div class="search-form" style="display:none">
38 <?php $this->renderPartial('_search',array(
39     'model'=>$model,
40 )); ?>
41 </div><!-- search-form -->
42 
43 <?php $this->widget('zii.widgets.grid.CGridView', array(
44     'id'=>'utente-crea-evento-grid',
45     'dataProvider'=>$model->search(),
#13 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CBaseController.php(127): require("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...")
#14 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...", array("model" => UtenteCreaEvento), true)
#15 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(870): CBaseController->renderFile("/home/sigturk/NetBeansProjects/sitoEventi/protected/views/utente...", array("model" => UtenteCreaEvento), true)
#16 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(783): CController->renderPartial("admin", array("model" => UtenteCreaEvento), true)
#17 
–  /home/sigturk/NetBeansProjects/sitoEventi/protected/controllers/UtenteCreaEventoController.php(146): CController->render("admin", array("model" => UtenteCreaEvento))
141         if(isset($_GET['UtenteCreaEvento']))
142             $model->attributes=$_GET['UtenteCreaEvento'];
143 
144         $this->render('admin',array(
145             'model'=>$model,
146         ));
147     }
148 
149     /**
150      * Returns the data model based on the primary key given in the GET variable.
151      * If the data model is not found, an HTTP exception will be raised.
#18 */
+  /home/sigturk/NetBeansProjects/yii/framework/web/actions/CInlineAction.php(50): UtenteCreaEventoController->actionAdmin()
#19 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(309): CInlineAction->runWithParams(array())
#20 
+  /home/sigturk/NetBeansProjects/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)
#21 
+  /home/sigturk/NetBeansProjects/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#22 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(1146): CFilter->filter(CFilterChain)
#23 
+  /home/sigturk/NetBeansProjects/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)
#24 
+  /home/sigturk/NetBeansProjects/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain)
#25 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(292): CFilterChain->run()
#26 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array("accessControl", "postOnly + delete"))
#27 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CWebApplication.php(283): CController->run("admin")
#28 
+  /home/sigturk/NetBeansProjects/yii/framework/web/CWebApplication.php(142): CWebApplication->runController("utenteCreaEvento/admin")
#29 
+  /home/sigturk/NetBeansProjects/yii/framework/base/CApplication.php(162): CWebApplication->processRequest()
#30 
+  /home/sigturk/NetBeansProjects/sitoEventi/index.php(13): CApplication->run()

model

class UtenteCreaEvento extends CActiveRecord
{
    /**
     * Returns the static model of the specified AR class.
     * @param string $className active record class name.
     * @return UtenteCreaEvento the static model class
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName()
    {
        return 'tbl_utenteCreaEvento';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('username, password, nome, cognome, email', 'required'),
            array('status, numTel, numEventiCreati, numFeedPositivi, statoCanone', 'numerical', 'integerOnly'=>true),
            array('username, password, nome, cognome', 'length', 'max'=>128),
                        array('password','length','min'=>6),
            array('password','authenticate'),
                        array('email', 'length', 'max'=>256),
            array('email', 'email'),
                        array('numTel, numEventiCreati, numFeedPositivi, statoCanone','safe'),
            // The following rule is used by search().
            // Please remove those attributes that should not be searched.
            array('id, status, username, nome, cognome, numTel, numEventiCreati, numFeedPositivi, email, statoCanone, dataCreazioneProfilo', 'safe', 'on'=>'search'),
        );
    }

    /**
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'eventiCreati' => array(self::HAS_MANY, 'Evento', 'creatoDa'),
            'fotoCaricate' => array(self::HAS_MANY, 'Foto', 'caricataDaUtenteEventi'),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(
            'id' => 'ID',
            'status' => 'Status',
            'username' => 'Username',
            'password' => 'Password',
            'nome' => 'Nome',
            'cognome' => 'Cognome',
            'numTel' => 'Num Tel',
            'numEventiCreati' => 'Num Eventi Creati',
            'numFeedPositivi' => 'Num Feed Positivi',
            'email' => 'Email',
            'statoCanone' => 'Stato Canone',
            'dataCreazioneProfilo' => 'Data Creazione Profilo',
        );
    }

    /**
     * Retrieves a list of models based on the current search/filter conditions.
     * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
     */
    public function search()
    {
        // Warning: Please modify the following code to remove attributes that
        // should not be searched.

        $criteria=new CDbCriteria;

        $criteria->compare('id',$this->id,true);
        $criteria->compare('status',$this->status);
        $criteria->compare('username',$this->username,true);
        $criteria->compare('password',$this->password,true);
        $criteria->compare('nome',$this->nome,true);
        $criteria->compare('cognome',$this->cognome,true);
        $criteria->compare('numTel',$this->numTel);
        $criteria->compare('numEventiCreati',$this->numEventiCreati);
        $criteria->compare('numFeedPositivi',$this->numFeedPositivi);
        $criteria->compare('email',$this->email,true);
        $criteria->compare('statoCanone',$this->statoCanone);
        $criteria->compare('dataCreazioneProfilo',$this->dataCreazioneProfilo,true);

        return new CActiveDataProvider($this, array(
            'criteria'=>$criteria,
        ));
    }

        /**
     * This is invoked before the record is saved.
     * @return boolean whether the record should be saved.
     */
    protected function beforeSave()
    {
              if ($this->isNewRecord)
                $this->dataCreazioneProfilo = new CDbExpression('NOW()');
              $this->status = 0;
              $this->statoCanone = 0;

            return parent::beforeSave();
        }

controller

public function actionView($id)
    {
        $this->render('view',array(
            'model'=>$this->loadModel($id),
        ));
    }

    /**
     * Creates a new model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     */
    public function actionCreate()
    {
        $model=new UtenteCreaEvento;

        // Uncomment the following line if AJAX validation is needed
        // $this->performAjaxValidation($model);

        if(isset($_POST['UtenteCreaEvento']))
        {
            $model->attributes=$_POST['UtenteCreaEvento'];
            if($model->save())
                $this->redirect(array('view','id'=>$model->id));
        }

        $this->render('create',array(
            'model'=>$model,
        ));
    }

    /**
     * Updates a particular model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id the ID of the model to be updated
     */
    public function actionUpdate($id)
    {
        $model=$this->loadModel($id);

        // Uncomment the following line if AJAX validation is needed
        // $this->performAjaxValidation($model);

        if(isset($_POST['UtenteCreaEvento']))
        {
            $model->attributes=$_POST['UtenteCreaEvento'];
            if($model->save())
                $this->redirect(array('view','id'=>$model->id));
        }

        $this->render('update',array(
            'model'=>$model,
        ));
    }

    /**
     * Deletes a particular model.
     * If deletion is successful, the browser will be redirected to the 'admin' page.
     * @param integer $id the ID of the model to be deleted
     */
    public function actionDelete($id)
    {
//      $this->loadModel($id)->delete();
                $utentecreaEvento = new UtenteCreaEvento();
                $utentecreaEvento = UtenteCreaEvento::model()->find('id',$id);
                $utentecreaEvento->status = 0;

        // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
        if(!isset($_GET['ajax']))
            $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
    }

    /**
     * Lists all models.
     */
    public function actionIndex()
    {
        $dataProvider=new CActiveDataProvider('UtenteCreaEvento');
        $this->render('index',array(
            'dataProvider'=>$dataProvider,
        ));
    }

    /**
     * Manages all models.
     */
    public function actionAdmin()
    {
        $model=new UtenteCreaEvento('search');
        $model->unsetAttributes();  // clear any default values
        if(isset($_GET['UtenteCreaEvento']))
            $model->attributes=$_GET['UtenteCreaEvento'];

        $this->render('admin',array(
            'model'=>$model,
        ));
    }

    /**
     * Returns the data model based on the primary key given in the GET variable.
     * If the data model is not found, an HTTP exception will be raised.
     * @param integer the ID of the model to be loaded
     */
    public function loadModel($id)
    {
        $model=UtenteCreaEvento::model()->findByPk($id);
        if($model===null)
            throw new CHttpException(404,'The requested page does not exist.');
        return $model;
    }

    /**
     * Performs the AJAX validation.
     * @param CModel the model to be validated
     */
    protected function performAjaxValidation($model)
    {
        if(isset($_POST['ajax']) && $_POST['ajax']==='utente-crea-evento-form')
        {
            echo CActiveForm::validate($model);
            Yii::app()->end();
        }
    }

i get this kind of error only when i try to manege the entities of this class but all other kind of actions don’t gives any kind of problem.
thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:22:25+00:00Added an answer on June 13, 2026 at 8:22 pm

    In your validation rules you specified array('password','authenticate'), . So either the model should contain a function named authenticate() or you must add a authenticate class extending from CValidator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when i try to upload an image: OSError at /upload/
I get this error when I try to use time_ago_in_words : Comparison of String
Working with H2 I get this error when I try to write a row
I get this RSpec error when I try to embed one document in another.
I get this error FB is not defined when i try to run this
when i try to view the databases in mysql i get this error: ERROR
When I try to go to this url: http://localhost:3000/lessons/18/pages , I get this error:
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
whenever I try to call my ejb from a client, I get this error
I get this wired error only when I try to access the web page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.