Question

I am talking about this patch: http://www.magentocommerce.com/blog/magento-now-supports-php-54/

How to apply it in a XAMPP-Windows 7 environment ?

I am hoping this patch will enable me to use the APC cache extension as currently my apache instance crashes when enabling APC and running a magento site.

Was it helpful?

Solution

I've successfully applied the patch manually for XAMPP on windows.
Go to this page. That is the patch for version 1.7 and at the end of the file you should see the modifications you need to do. They are not that many.
The code starts after the line __PATCHFILE_FOLLOWS__.
You just edit the files specified.
Let's take for example the first one app/code/core/Mage/Catalog/Model/Product.php.
Edit that file and remove the lines marked with -, in this case

$options->setOptions(array_diff($buyRequest->getOptions(), array('')));

and add the lines marked with + instead of that.

        foreach ($customOptions as $key => $value) {
            if ($value === '') {
                unset($customOptions[$key]);
            }
        }
        $options->setOptions($customOptions);

If the file you are supposed to edit does not exist, just create it and add the contents specified. this is the case for app/code/core/Zend/Pdf/FileParserDataSource.php.

OTHER TIPS

I've just applied a couple of security patches on my windows development environment for Magento 1.8.1. I tried to run the .sh file using git bash but it fell over. I found that making the following change to line 67 allowed it to run and it seems to have made the right changes to the files in the patch.

Before

CURRENT_DIR=`$PWD_BIN`/

After

CURRENT_DIR="."`$PWD_BIN`/

This is based on Marius' approach.

I have made the folder structure and patched the files, so just download the zip, and drop the app folder in your Magentos root folder, and click ok to the 3 overwrite warnings.

REMEMBER TO BACKUP YOUR MAGENTO INSTALL BEFORE APPLYING PATCHES LIKE THIS!

https://dl.dropboxusercontent.com/u/604159/magento-1_7-php-5_4-patched.zip https://dl.dropboxusercontent.com/u/604159/magento-1_7-backup.zip

Enjoy!

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top