I'm kind of new to Zend Framework and currently developing with the latest Netbeans IDE. As creating and using models is part of the process, I'm getting some strange errors.
I already configured my XAMPP on my MacOSX Mountain Lion that way, that the Zend 1.11 library is known. I can initialize new project and create new files by using the Netbeans Zend Command Line tool. Zend Projects run perfectly.
The strange thing is, that I have my IndexController and want to create a new action ala' zf create action myAction. As my IndexController.php includes a model with
require_once APPLICATION_PATH . '/models/CollectionModel.php';
this call does not work and always prints the following error message:
Creating an action named blaKeks inside controller at /Users/tbolle/NetBeansProjects/Musiksammlung/application/controllers/IndexController.php
Warning: require_once(APPLICATION_PATH/models/CollectionModel.php): failed to open stream: No such file or directory in /Users/tbolle/NetBeansProjects/Musiksammlung/application/controllers/IndexController.php on line 2
Fatal error: require_once(): Failed opening required 'APPLICATION_PATH/models/CollectionModel.php' (include_path='/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/php/zend:/Users/tbolle/ZendFramework-1.12.0/library:/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/php/zend:.:') in /Users/tbolle/NetBeansProjects/Musiksammlung/application/controllers/IndexController.php on line 2
The CollectionModel is of course in /models/CollectionModel.php
I hope somebody has got a hint or solution. Thanks so far!
EDIT 1: This is how my Application PATH defintion looks like:
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__).'/../application'));