Skip to main content
ErrorsMagentoPatches

Magento – SUPEE-5994 – can’t find file to patch at input line 347

By May 18, 2015August 5th, 20152 Comments

Magento has released several security patches to its CE platform, the latest (15/05/2015) critical patch being SUPEE-5994. However, when trying to apply the patch for one Magento site, I received the following PEAR (input line 347) error;

PEAR – can’t find file to patch at input line 347


Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
patching file app/code/core/Mage/Customer/Model/Customer.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
patching file app/code/core/Mage/Install/Controller/Router/Install.php
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php
patching file downloader/Maged/Model/Connect.php
patching file downloader/Maged/View.php
patching file downloader/template/connect/packages_prepare.phtml
patching file downloader/template/messages.phtml
patching file get.php
can't find file to patch at input line 347
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git lib/PEAR/PEAR/PEAR.php lib/PEAR/PEAR/PEAR.php
|index b4633bf..e6f8edc 100644
|--- lib/PEAR/PEAR/PEAR.php
|+++ lib/PEAR/PEAR/PEAR.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
42 out of 42 hunks ignored
patching file lib/PEAR/PEAR/PEAR5.php
patching file lib/Varien/Io/File.php

Missing PEAR files

Stackexchange pointed to a missing PEAR file (lib/PEAR/PEAR/PEAR.php) and recommended downloading the latest Magento CE version and uploading the missing PEAR folder and files.

/lib/PEAR/PEAR.php
/lib/PEAR/PEAR/PEAR.php
/lib/PEAR/PEAR/PEAR5.php

PEAR Permissions

PEAR.php already existed on my server but my file permissions were wrong. Changing the PEAR folder to 755 fixed the issue and allowed the patch to run correctly.

Hopefully this also helps somebody else out, for Security Patch SUPEE-5994 or future Magento patches.

Further Magento patch articles

Andrew Taylor

A senior UI designer with over 25 years of web design and web development experience working for some of the largest companies in the UK. An expert in all things Magento and WordPress.

2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.