[EXTENSION] Img

Same error with 1.2.2c.

[color=#1C2837]Alias "image.ImageModule" is invalid. Make sure it points to an existing PHP file.[/color]

[color=#1C2837]

[/color]

[color=#1C2837]Anybody resolve this?[/color]

I believe you have to rename the modules directory where you store it to "image".

Note: I wrote the following before noticing that you have several more recent commits on bitbucket. The issues may already be resolved, so maybe we just need an updated download on the extension page?


I encountered the following issues during installation that might be worth fixing or adding to the installation documentation:


1. My application structure is slightly different to normal as I like to place the protected directory in a non web accessible location. Your installer currently assumes that the web accessible directory is accessible like this:




$this->_basePath=realpath(Yii::app()->basePath.'/../').'/';



Current fix:

To get the installer to point at the web directory, I had to add the following to the ImgManager config:




    'imagePath'=>'www/files/images/',



This isn’t ideal as I might well have different paths to the web root on the live site and the test site.

Suggested fix:

Use Yii’s built in aliases to access the base output directory instead of the code above:




$this->_basePath = Yii::app()->getPathOfAlias('webroot') . DIRECTORY_SEPARATOR;



assuming that this code can be used from within a module.

I imagine that this would need fixing in more places than just the installer.


2. This code in the installer (also mentioned above):




$this->_basePath=realpath(Yii::app()->basePath.'/../').'/';



creates a path with two trailing slashes. Fortunately this seems to work, but is a minor bug that might be work fixing.


3. The installer assumes you’ll know what it’s going to do and that you’ll set permissions accordingly. To get it to work on my installation, I temporarily granted all permissions to the database user rather than my usual SELECT, INSERT, UPDATE, DELETE. I also had to create the file www/files and grant write permissions to it to allow the installation to proceed.

Suggested fix:

Update the installation guide to include a description of what the installer does and the permissions that the user will need to apply to their database (just CREATE?) and file system for the installation to work.


Thanks for your work on this module; I’ve only gone through installation so far, but I’ll give feedback once I’ve got it successfully running. If you’ve stopped development on the system and would like me to fork the repo and attempt the changes, let me know.