I’m getting this error on my shared hosting account :sick::
Warning: require(/Entities/Account.php) [function.require]: failed to open stream: No such file or directory in /home/undo/public_html/hidraserca/library/Doctrine/Common/ClassLoader.php on line 148
Fatal error: require() [function.require]: Failed opening required ‘/Entities/Account.php’ (include_path=‘/home/undo/public_html/hidraserca/application/…/views:/home/undo/public_html/hidraserca/library:/home/undo/public_html/zf’) in /home/undo/public_html/hidraserca/library/Doctrine/Common/ClassLoader.php on line 148
It does work on my mac so I don’t know what’s happening. :injured:
The real problem is that you don’t have your doctrine class loader setup correctly. The class loader always works with absolute paths. Your include path is irrelevant in this case. The /Entities/Whatever is the tip off.
Check or post your initialization code. Somewhere you have something like:
$loader = new ClassLoader($nameSpace,$nameSpacePath);
That points your entity namespace to a specific directory containing your entities. It needs to be adjusted to match your server file layout.
I’m not familiar enough with Zend to offer specifics but start by replacing:
resources.entityManager.connection.entities = “/Library/Webserver/Documents/hidraserca/application/models”
That might be all you need to get it to work. At some point you will need an ini file of some sort just for your shared host. If nothing else, your database passwords will probably be different as well as some paths.
If the above does not work then try changing:
$classLoader = new DoctrineCommonClassLoader(‘Entities’,
$classLoader = new DoctrineCommonClassLoader(‘Entities’,“/the/actual/shared/host/path/to/applications/models”),‘loadClass’);
In other words. hard code the path directly in the loader. If that works then at least you have confirmed the problem. Then you can figure out how to get the path from the zend configuration system.
If you still have problems then consider posting on the Zend board. I’m sure they can fix you right up.