A few days ago my company got our production server for the upcoming website up and running so that I can start working with it. Since this server is being hosted at another office out of state I am learning how to deploy symfony on a server that I don’t have physical access to.
When doing all my previous work (all 3 months!) with symfony, I have either worked on it on my local machine or on a small dev server in our server closet. The main difference on this new server is that I cannot update the php.ini file whenever I choose. I am able to have it modified when there is a long-term need (ie- setting magic_quotes_gpc & short_open_tag to Off). But when running the build commands for the new platform I need a good bit of memory. The propel:build-model action takes more than 32 MB of memory and since I couldn’t change the php.ini file I had to find a way around it.
I discovered that the symfony .bat file that is in the symfony distro has php in it and I was able to simply use the ini_set function to set the memory limit to 64MB while executing any CLI symfony scripts.
Till Next Time
Tags: build-model, cli, ini_set, memory_limit, php, propel, symfony