I have created a module in Kohana but I have a problem when I try to use it. When I try to use the class I get the following error:
ErrorException [ Fatal Error ]: Class 'PopcornInteractor' not found
APPPATH/classes/model/movie.php [ 120 ]
118 public function getPopcorn($popcorn) {
119 $uid = null;
120 $pci = new PopcornInteractor();
The bootstrap.php
file has the following configuration for the modules
Kohana::modules(array(
...,
'popcornmod' => MODPATH.'popcornmod'
));
When I debug the Kohana::modules()
I get the following structure:
...
popcornmod : "\/var\/www\/html\/mywebsite.com\/modules\/popcornmod\/"
The structure of my files is:
modules
+
+-+popcornmod
+
+-+classes
| +
| +-+PopcornInteractor.php
|
+-+config
| +
| +-+popcornmod.php
|
+-+init.php
The PopcornInteractor.php file has the following content:
class PopcornInteractor {
protected $config;
function __construct() {
$this->config = Kohana::$config->load('popcornmod')->as_array();
}
}
Finally, on the included files message that is shown when the error shows, it displays:
MODPATH/email/vendor/swiftmailer/lib/swift_required.php
MODPATH/email/vendor/swiftmailer/lib/classes/Swift.php
MODPATH/popcornmod/init.php
SYSPATH/classes/cookie.php
SYSPATH/classes/kohana/cookie.php
I try looking for PopcornInteractor.php but it is not in the included files.
The mod was working good in my local installation (OS X) but when I uploaded to the server (Linux) it didn't work.
Any ideas?