“Your proxy directory must be writable”

When you first start off with Doctrine 2, you’ll eventually start creating complex objects with child objects as properties, which of course you will use Doctrine to load. Unlike how you’d do it traditionally though, Doctrine uses proxy pattern objects to lazy-load these child objects until they are accessed; these objects are cached, and thus the proxy directory just like the cache directory must be writable.

I found on Stack Overflow where the default proxy directory is so you need to create the directories and make the proxy directory writable

mkdir data/DoctrineORMModule
mkdir data/DoctrineORMModule/Proxy
chmod 755 data/DoctrineORMModule/Proxy

Replace 755 with whatever mode you need, i.e. 777 if you’re being dangerous/lazy


Leave a Reply to Stefani Cancel reply