Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Installation driving me nuts #75

edwar64896 opened this Issue · 20 comments

6 participants


Sorry, but I have a flat spot on my forehead where I'm banging it on the desk trying to get this thing installed.

Following install_tutorial.txt to the letter, but having no luck running the installer.

Getting errors telling me the alias user.UserModule is invalid.

Alias "user.UserModule" is invalid. Make sure it points to an existing PHP file and the file is readable.

Attempted to add a cache to main.php but this then throws a different exception telling me the cache property is read-only.

I"m using latest yii (1.1.13) and gitclone latest yum. php is 5.3.3

I would be most grateful if you would be able to provide some guidance to getting this puppy walking.




did you extract the archive directly under the modules/ directory? it has to look like this:


can you show me config/main.php via a gist (without passwords), so i can check if the
cache is set at the correct place?


yup. archive directly under protected/modules...


Uncommenting the cache command causes yii to freak. Tells me that the cache property is read-only.


please place the 'cache' array under the 'components' array.

not sure about the "alias user.UserModule is invalid." though....


ok will do that right now....


Property "CWebApplication.cache" is read only.


I did note that some of the cloned files are DOS formatted. I have done a repository-wide dos2unix on them, but this hasn't made any difference. Might be worth going through the repo on your end...


ok apologies - I get what you are trying to say... cache array should be "within" the components array as opposed to above or below it. Semantics thing. I have the cache command now "within" the components array.

the WebApplication.cache errors has gone away, but the issue with the user.UserModule alias remains.


please double-check the files are extracted correctly. the error message says, that the aren't. show me a directory listing to make it safe, please ;)


Where you placed the YUM module?
Can you send the output of: "ls -la" in your protected/modules dir?


See this comment, it may be due to short tags - I have seen this issue come up a few times in the chat room as well:

#27 (comment)


probably should have mentioned that I have tried fixing the short tags as well.

UserModule.php has a short tag, and a missing end tag. So I put in the missing end tag and replaced the long tag.
For safety, I also added the short_tag directive in the .htaccess file.

Still makes no difference.


to fix the short tags you shouldn't have to do anything but enable them....I would back out any other changes (besides PHP short tag directive) and see if that works


At the moment, I'm starting again from scratch so I'll post again when I have a result. Am also trying other framework versions to see if something broke in a yii update.


Have created a new skeleton project and had some success now.
Will try and work out where the differences between the two projects are. First project had a couple of models, but nothing too hard - nothing that would justify the results I was getting.
Anyway, managed to run the installer now, albeit under 1.1.12 yii.

1. git clone results in a lot of files that are DOS formatted.
2. UserModule.php has a short opening tag and no end tag.

As you do, I suspect user error, but I'll need to do some more digging to find out where.


OK. I have completely stripped yii-user-management out of the original project and re-downloaded from GIT.
previously I had cloned it to a user directory and then moved the submodules directly into protected/modules.
This time, I am git cloning directly into "protected" and then changing the name of the git repository from yii-user-management to "modules". Shouldn't make a difference, but then these things are sent to try us.

I'm moving onwards now. I still can't quite put my finger on exactly what the issue is, but there appears to have been some sort of filesystem issue causing this problem. Anyways, water under the bridge now. I'm installing, and moving on.

FYI, I'm doing the following so far to get things working:

  1. cd to $WEBAPP/protected/modules
  2. chown -R apache:apache *
  3. find . ! -type d | xargs dos2unix
  4. Adding the following .htaccess into $WEBAPP

php_flag short_open_tag on

with the short tags on, the missing end tag in UserModule.php doesn't seem to make a difference either way.



Hmm, unfortunately i still have no idea why this happens. Yum has the convention to use short php tags for development and <?php in production releases (yes, yes its time again...) You can try to recursively replace <? with <?php but i really doubt that will fix your problem.

please let me know if you find something !


this looks very promising but, I am getting the same read only error. What was the resolution?


I am on xampp and received all kinds of errors like: "alias user.UserModule is invalid" and many more.
It seems that my problems have been solved by using long php tags. I have to make the change in almost all the files in /controllers, /models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.