can't install yii-user


I’m new to yii and I guess I’m missing something very, very basic here, but I’m just following the step-by-step instructions at to install yii-user.

When it comes to:

I get the error:

What am I missing? I don’t even know what a migration is…

I’ve solved it by manually creating a directory “migrations” under modules/user.

However, I’m confused:

  • if that directory is needed, why isn’t it included in the package?

  • why can’t the tool create it?

  • if it’s a file permission issue, then why doesn’t the installation guide mention the file permission requirements? (i.e. make sure this or that directory is writable? it just says “unpack the zip file into…”)

Now I have a strange error at runtime:

YiiBase::include(WebUser.php) [<a href=‘function.YiiBase-include’>function.YiiBase-include</a>]: failed to open stream: No such file or directory

This seems to be caused by this line in the config/main.php:


            // enable cookie-based authentication

            'class' => 'WebUser',



But I inserted that because the installation instructions said to. I’m confused…

I have exactly the same problem as the OP. For such an apparently popular extension it’s odd that there’s zero documentation. Even if that command had worked, I still have no idea how to use it :mellow:

I found out the cause of the runtime error.

The installation instructions assume that you have a WebUser class that extends CWebUser.

However, yiic doesn’t create it by default, so you have to create it if you haven’t already. The instructions should mention this requirement, as a freshly created application won’t fulfill it, so it shouldn’t be assumed.

Anyway, I’ve already given up Yii-user completely. With zero documentation, having to figure out everything by looking at the source code, it’s more pain than creating one’s own user management from scratch.

I agree. I kinda got round the migration command by guessing, then found the *.sql schemas, had to edit them because they assumed a table prefix of tbl_ which I don’t use, and installed them, then got round a missing module error by unzipping the archive into protected/modules as well as protected/ but the final step was an error about a misnamed column in the database schema -> lastvisit should be called lastvisit_at.

It would be easier to just write it myself. It’s a shame, I’m new to Yii and I love it because it comes with so much stuff out-of-the-box. A decent working, easy to install user management tool would awesome, I’m kinda surprised it isn’t baked into the framework like Gii is.

Hint to yii devs :)

I agree with you all, but ok, do not give up, this is a very good module.

And here goes a suggestion that has helped me:

just follow it’s a instalation guide.

install latest version of this extension from

It works if all steps are done correctly as mentioned in installation .

i was having same migrations dir error problem . the version i was using was not latest .

I had pretty much all the same issues as listed above, with another:

After running yii migrate I got hit with a syntax error and the migration failed.

Not really sure how this is such a recommended extension if so many people can’t even get it to install.