unable to install yii user module
Asked Answered
B

6

7

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

protected/modules/

directory so my directory structure under this include the user and other modules included in the zip. I made changes to the main file as mentioned 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',
            ),
            */
        ),
    ),
)

so as you can see I have all the code setup but when I hit 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 try to hit some other page in my application I get the error

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

Can anybody tell me what I am doing wrong here ? please help me .

EDIT :

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

Baeda answered 1/7, 2012 at 9:1 Comment(8)
when asking questions about extensions, please include a link to the extensions page, there are many extensions for user management, how would i know which one are you using?Pure
github.com/thyseus/yii-user-managementBaeda
@Pure can you please help me.. I am unable to figure out the errorBaeda
Can you post the error? It will help a lot.Zamarripa
@Faizan actually i haven't used this extension before, so i don't know. i'll try and use it and see if i get the error. will let you know, don't worry!Pure
@Zamarripa I have posted the error.. Its the same error I get.. do u want me to post the whole stack trace ?Baeda
i too experiencing this errorPrepay
just turn on the php shot tags !! it will solve the problemBaeda
T
5

My way of figure out this issue is to turn on short_open_tag in php.ini file. It was Off before I modified it.

Tempest answered 29/9, 2013 at 6:42 Comment(0)
S
3

Check wamp server settings also. specially the php version you are using...

Sello answered 4/7, 2012 at 7:25 Comment(5)
what are your settings on wamp server ? is it working at your endBaeda
I am using wapserver 2.2 and php version 5.3.8 and apache version 2.2.21. Also try re-installing your wamp server may be it does the trick.Sello
thanks !! it worked fine after configuring he wamp server againBaeda
What settings did you change on the server to get this to work? - You say it worked - but what did you change?Vevine
just turned on the php short tags !!Baeda
K
1

check files permisions also:

chmod -R go+rx protected/modules 
Karleen answered 3/7, 2012 at 18:51 Comment(1)
where to check these file permission. I am running on WAMP + Windows 7 . I dont had any issues with file permissions beforeBaeda
B
1

It seems the module developer used short_open_tags in. i.e, <? ?> instead of <?php ?>. So just enable it in PHP.

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

Bunkum answered 11/1, 2014 at 1:3 Comment(0)
T
0
'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 this changes and try out.

Trashy answered 2/7, 2012 at 5:56 Comment(3)
does this mean I have to setup user table as well ?Baeda
because as far as I understand user table will be generated by scriptBaeda
that I am already doing.. if you see your updated code you will see that user module is loaded twice. one with debug="true" and one with debug="false". one before Gii module and one after GIi modukeBaeda
E
0

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

you can try edit function like this

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"),
    );
}
Ernieernst answered 1/3, 2013 at 14:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.