26 Mar

Stop Magento Permissions Errors ... Permanently

When working with customers not hosting with Sonassi Hosting, we continually run into the same permissions errors - along with the rest of the Magento using world. This isn't an issue if PHP runs as the same user as your FTP/SSH user, but if they are different, all kinds of headaches ensue. Whenever granted root … Continue reading

24 Mar

Magento HTTPS Redirect Loop

So you've enabled HTTPS in your store and suddenly you are faced with a redirect loop. In Magento versions prior to 1.6.2.0, Magento was only capable of checking the Apache $_SERVER['HTTPS'] variable. In ./lib/Zend/Controller/Request/Http.php the HTTPS sanity check would observe the contents of the HTTPS environment variable, if set to 'on' - it would be … Continue reading

8 Mar

What is Memcache actually caching in Magento

Your Memcache configuration in ./app/etc/local/xml will dictate what Memcache is actually caching. If you are only using a the single-level cache (without <slow_backend>), then Magento will store its cache (in its entirety) in Memcache. **HOWEVER** without the <slow_backend> defined - it is caching content, without cache_tags - ie. without the ability to differentiate cache items. … Continue reading

8 Mar

Secure your Magento Admin

Changing the URL for your Magento admin isn't really a way to protect your store; security through obscurity isn't security at all. Fortunately, there is a nice simple modification that you can make to your .htaccess file to protect certain URLs from prying eyes. For a single-store view Magento installation ############################################ ## Secure admin RewriteCond … Continue reading

9 Sep

Magento batch update category quick script

Just to supplement another post we made on bulk creating categories, below is a script used for bulk updating and attaching images to categories based on a specific CSV. There is no documentation to go with this code, I'm simply posting it because a subscriber has requested it. <?php define('MAGENTO', realpath(dirname(__FILE__) . "/..")); require_once MAGENTO … Continue reading

31 Aug

Magento category children count fix

The children_count field in Magento can sometimes become inaccurate if you have created a category via the PHP API and set an entity_id whilst doing so. It is due to part of the after_save mechanism which overrides the children_count parameter (even if explicitly set via $_category->setChildrenCount()). For the majority of the admin area, an inaccurate … Continue reading