gravatar

Edmonds Commerce are a UK based E-Commerce web development agency. We are based in Shipley which is in Yorkshire near Leeds and Bradford.

Our primary specialism is Magento and Magento2 and other PHP based E-Commerce platforms such as OpenCart.

In terms of technology we are very strong in PHP, MySQL, Linux, HTML, CSS and Javascript.

Stop Magento writing to /tmp

Aug 14, 2012 · 1 minute read
Category: magento

So some of us disagree when it comes to what should happen when magento cannot write to var/ in the webroot. Magento itself chooses to try /tmp/magento/ if the var/ folder is not writable. This can cause many issues and confusion. Not least of which emptying var/ and making it writable does not make magento start using it, if there’s already a /tmp/magento!

One preferable option is to force magento to just stop if it can’t write to var/ - here’s a simple way to do this, which is sneaky but really handy :-

cd /tmp
ln -s abracadabra-dangling-symlink magento

What that does is create a dangling symlink in /tmp/ called magento, which cannot be overwritten by a directory. Magento then simply stops. Stopping because of permissions errors is often preferable to continuing and causing later confusion and problems.

AltStyle によって変換されたページ (->オリジナル) /