Custom block loading model problem

Permalink
Hi all.

I'm developing a custom block, the block is located at path_to_mysite/blocks. The block is installed and works fine until i try to use a model.

I've a custom model (mymodel.php) in /models directory. It's a simple class, only for testing porpuse.
When i add

Loader::model('mymodel')

in the controller.php file of my block, i get the following error:

Warning: require_once(path_to_mysite/models/mymodel.php): failed to open stream: Permission denied in path_to_mysite/concrete/core/libraries/loader.php on line 48 Fatal error: require_once(): Failed opening required 'path_to_mysite/models/mymodel.php' (include_path='path_to_mysite/libraries/3rdparty:path_to_mysite/concrete/libraries/3rdparty:.:/usr/share/pear:/usr/share/php') in path_to_mysite/concrete/core/libraries/loader.php on line 48

Any ideas?

 
DAkers replied on at Permalink Reply
Check that filepath over to make sure it is trying to get to the right file (i.e path_to_mysite/models/mymodel.php). Make sure to check for upper and lower case since it is case sensitive.

Also make sure that the directory /models has the correct permissions.

I'd bet its one of those.
rcrow replied on at Permalink Reply
Thx DAkers.

There was a file system permission mistake. The "models" directory did not have the group (apache) execute bit set.
DAkers replied on at Permalink Reply
Yes, usually something like that. Not a problem!
rcrow replied on at Permalink Reply
Thx anyway! ;)