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?
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?
Thx DAkers.
There was a file system permission mistake. The "models" directory did not have the group (apache) execute bit set.
There was a file system permission mistake. The "models" directory did not have the group (apache) execute bit set.
Yes, usually something like that. Not a problem!
Thx anyway! ;)
Also make sure that the directory /models has the correct permissions.
I'd bet its one of those.