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
Thanks!!! This saved my day.
simple but works, thanks a lot
Thanks a lot.Fixed my issue immediately. 🙂
It seems silly but I need some help here. How to make that directory writable in Windows 7 machine. I am not much of a Windows user.
I’m afraid I’ve got no idea how Apache/IIS handles directory permissions so I cannot help sorry
Thanks for this proposition. It’s really simple but it doesn’t work for me.
I’ve changed the rights of the proxy directory but I still have the same error.
Does somebody has any idea about where it come from ?
Thanks!!! This saved my day.
Thanks.
Quick, simple, functional.
Thanks,
Very simple and straight forward.
where should I create data folder?
In the project root, so at the same level where your composer.json/etc. are located
Is this not dangerous ? as far as i know is a high risk to have 777 on directories ?! any ideas ?
Oh indeed, hence why I mentioned it being dangerous! Provided you’re not on a Production environment I find it quickest to set it to 777, then reduce permissions as required and update user/group ownership until you reach a safe mode (such as 755) then copy these changes to other environments either manually or via Puppet/Chef
Obrigada, ajudou muito!!!