Failed to install custom yii module

I downloaded the latest version of the Yii user module from github and extracted it under

protected/modules/ 

therefore my directory structure under this includes user and other modules included in zip. I made changes to the main file as indicated in the docs, so my main.php now looks like this:

 'import'=>array( 'application.modules.user.models.*', 'application.models.*', 'application.components.*', ), 'modules'=>array( // uncomment the following to enable the Gii tool 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'sheikh24', // If removed, Gii defaults to localhost only. Edit carefully to taste. 'ipFilters'=>array('127.0.0.1','::1'), ), 'user' => array( 'debug' => true, ) ), 'components'=>array( 'user'=>array( 'class' => 'application.modules.user.components.YumWebUser', 'allowAutoLogin'=>true, 'loginUrl' => array('//user/user/login'), ), // uncomment the following to use a MySQL database 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=ewindow', 'emulatePrepare' => true, 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'tablePrefix' => '', ), 'errorHandler'=>array( // use 'site/error' action to display errors 'errorAction'=>'index/error', ), 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'error, warning', ), // uncomment the following to show log messages on web pages /* array( 'class'=>'CWebLogRoute', ), */ ), ), ) 

since you can see that I have all the code settings, but when I click the URL

 http://localhost/ewindow/index.php?r=user/install 

I got the following error:

 include(UserModule.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory 

or I'm trying to click another page in my application, I get an error

 include(YumWebUser.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory 

Can someone tell me what I'm doing wrong here? please help me.

EDIT:

here is the link to the extension https://github.com/thyseus/yii-user-management

+7
source share
6 answers

My way to find out this problem is to include short_open_tag in the php.ini file. This was turned off before I modified it.

+5
source

Check your Wamp server settings. specially used php version ...

+3
source

also check file permissions:

 chmod -R go+rx protected/modules 
+1
source

It looks like the module developer used short_open_tags in. ie, <? ?> <? ?> instead of <?php ?> . So just include it in PHP.

In Xampp, find php.ini and set short_open_tags = On

+1
source
 'modules'=>array( 'user' => array( 'debug' => false, ), 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'sheikh24', // If removed, Gii defaults to localhost only. Edit carefully to taste. 'ipFilters'=>array('127.0.0.1','::1'), ), 'user' => array( 'debug' => true, ) ), 

apply these changes and try.

0
source

on the user module model, open the UserLogin.php file

you can try editing function like

 public function attributeLabels() { return array( 'rememberMe'=>Yii::t("User.user", "Remember me next time"), 'username'=>Yii::t("User.user", "username or email"), 'password'=>Yii::t("User.user", "password"), ); } 
0
source

All Articles