I need to deploy a symfony2 application on shared hosting with cPanel. I have managed to upload it, set umask for the app/cache and app/logs directories (by adding the umask(0000) line in the needed files, as per the documentation) but I have a strange problem:
It appears to stop working randomly whenever I upload new files with ftp. It always spits out “No route found for GET /(whatever-link)” even though the same files work fine on localhost. Clearing out the cache folder does nothing.
Then, here is the strange part – I believe I have noticed after a couple of hours of inactivity it starts working again with no changes to the files.
This is driving me mad, what am I missing?
I have figured out the problem and will provide the solution here, to help some unlucky visitors from the future:
The hosting provider had an older version of eAccelerator enabled – one that strips comments out of php files when caching them. Needless to say this caused havoc on my entire application.
I solved it by removing all annotations and instead using yaml for everything, including doctrine mappings.
Read more about the issue here: http://wildlyinaccurate.com/eaccelerator-and-doctrine-2/