I use Doctrine 2.0 integration with CodeIgniter. I encounter this error when try to load something from the DB.
Fatal error: Uncaught exception 'Doctrine\ORM\Proxy\ProxyException' with message 'Your proxy directory must be writable.' in /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Proxy/ProxyException.php:37 Stack trace: #0 /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Proxy/ProxyFactory.php(189): Doctrine\ORM\Proxy\ProxyException::proxyDirectoryNotWritable() #1 /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Proxy/ProxyFactory.php(90): Doctrine\ORM\Proxy\ProxyFactory->_generateProxyClass(Object(Doctrine\ORM\Mapping\ClassMetadata), 'application/mod...', '<?php??namespac...') #2 /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/UnitOfWork.php(2576): Doctrine\ORM\Proxy\ProxyFactory->getProxy('Entity\Account', Array) #3 /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php(135): Doctrine\ORM\UnitOfWork->createEntity('Entity\User', Array, Array) #4 /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Internal/Hydration/SimpleObje in /opt/lampp/htdocs/khoone/application/libraries/Doctrine/ORM/Proxy/ProxyException.php on line 37
I have configured Doctine as below:
$models_namespace = 'Entity';
$models_path = APPPATH . 'models';
$proxies_dir = APPPATH . 'models/Proxies';
$metadata_paths = array(APPPATH . 'models/Entity');
and already tried this:
sudo chmod 777 myapp/application/models/Proxies
but I face the error anyway. any Idea what might the problem is?
I had the same problem. To fix it, I deleted a folder named "Cache" which was located in my folder "Data", and it works.