1

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.

2

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.

  • Thanks a lot for this Marius. Are you able to enable Apache's APC extension since you've applied the patch ? – user3190 Jan 29 '14 at 11:24
  • @matdev. I didn't try to enable APC after installing the patch. I was only able to make it work on php 5.4. But I think these are 2 different issues. I don't think that APC and compatibility with php 5.4 have something in common. – Marius Jan 29 '14 at 11:28
  • It's pretty easy to apply the patch indeed. Still unable to enable APC though. Any tips to get my local version of magento running faster on XAMPP windows ? – user3190 Jan 30 '14 at 10:31
1

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`/
0

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy