Top Nav

Archive | Magento

Magento SUPEE-7405 Parse Error

Applying the new SUPEE-7405 patch to Magento (and probably other versions) results in a parse error in the sales order view page (admin/sales_order/view/order_id) if the site is running under PHP5.3. Here’s the error message:

The offending line is:

it can be changed to:

PHP 5.3 does not support the “[]” syntax for array initialization. Of course you should not be running PHP 5.3!


Changing Magento Path

Suppose you have a Magento Commerce store at:

but you want to change the URL to:

There are plenty of articles that give the basics like:

Basically the steps are:

1. Login to admin, go to Configuration -> Web and change the secure and insecure urls.

2. Move the store/ folder to catalog/

3. Clear cache and sessions folders with

4. Add a rewrite rule in your .htaccess to send traffic from the old path to the new path:

So far so good but we found several additional steps that might be needed. If compilation is turned on then you may need to do:

Next if you have APC installed in PHP then you may need to restart the web server to clear the APC cache with something like:

If you have memcached configured as the cache backend then you’ll also need to restart memcached:

Let us know if the comments if you find any other steps that are needed to successfully move magento to a new path.




Magento – List Applied Patches

You can view a list of patches that have been applied to a Magento site with:

You’ll get something like this:



Howto Determine Magento Version

Previously we posted an article on how to determine Magento version by checking the app/Mage.php file:

Determine Magento Commerce Version

Here’s another technique that I like using PHP command line:

Credit for this goes to




Determine Magento Commerce Version

While urgently patching dozens of Magento Commerce installations for the latest security alert, I needed a quick way to determine the version without logging into the admin.

I found the answer in a note on the bottom of this wiki page:

Just open app/Mage.php and look for the getVersionInfo() function. You’ll see something like this:

Here’s a Perl one liner to extract the version:

Thanks to Peteris Krumins for a great blog full of Perl one-liners. The one above
was derived from this article:

BTW … here’s the security alert:

If you’ve not already patched then you should really get it done right away or contact Reliable Penguin for assistance.