1

Following a Doctrine / CodeIgniter tutorial

Everything is good up until the very end when I try to insert data through my controller

    $user = new Entities\User;
    $user->setFirstName('Joel');

    $this->doctrine->em->persist($user);

I get:

Fatal error: Uncaught exception 'Doctrine\ORM\Proxy\ProxyException' with message 'You must configure a proxy directory. See docs for details' in C:\wamp\www\ci\application\libraries\Doctrine\ORM\Proxy\ProxyException.php on line 33
( ! ) Doctrine\ORM\Proxy\ProxyException: You must configure a proxy directory. See docs for details in C:\wamp\www\ci\application\libraries\Doctrine\ORM\Proxy\ProxyException.php on line 33

This might be due to a difference in the tutorial version of Doctrine vs. the current version as noted here, but the tutorial version is no longer supported by Doctrine and I'm not sure what to change.

2 Answers 2

3

Did you set the proxy directory by doing somewhere :

// set up proxy configuration
$config->setProxyDir(APPPATH.'models/Proxies');
$config->setProxyNamespace('Proxies');

You have a problem with the setting of the proxy dir. Check that the proxy directory is well defined and that the directory exists.

Hope this helps.

1
  • Found the problem, you pointed me in the right direction. Because I don't have APC caching I had to comment out those lines, but because the creator didn't use brackets around if/else it took my proxy declarations as an ELSE block. Stupid shorthand, thanks for the help.
    – Nick Brown
    Commented Dec 27, 2012 at 18:53
-1

It looks like permission trouble:

To fix, i did

sudo chown -R www-data:www-data .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.