1

我使用 Doctrine 2.0 与 CodeIgniter 的集成。尝试从数据库加载某些内容时遇到此错误。

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

我已将 Doctine 配置如下:

$models_namespace = 'Entity';
$models_path = APPPATH . 'models';
$proxies_dir = APPPATH . 'models/Proxies';
$metadata_paths = array(APPPATH . 'models/Entity');

并且已经尝试过:

sudo chmod 777 myapp/application/models/Proxies

但无论如何我都面临错误。任何想法可能是什么问题?

4

1 回答 1

3

我有同样的问题。为了解决这个问题,我删除了一个名为“Cache”的文件夹,它位于我的文件夹“Data”中,它可以工作。

于 2013-11-02T21:01:01.240 回答