Yii Framework Forum: [EXTENSION] Img - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Img Image management made easy! Rate Topic: -----

#41 User is offline   compugator 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 01-May 11

Posted 11 July 2012 - 11:27 AM

Same error with 1.2.2c.

Alias "image.ImageModule" is invalid. Make sure it points to an existing PHP file.


Anybody resolve this?
0

#42 User is offline   compugator 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 01-May 11

Posted 11 July 2012 - 11:33 AM

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

#43 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,500
  • Joined: 04-March 10
  • Location:UK

Posted 04 April 2013 - 06:03 AM

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.
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users