Help me patch this php file

In Drupal I get the error message as explained here, so I suppose I must use this patch: http://pear.php.net/bugs/bug.php?id=18129
I know how to use Putty to get to this file, but then what?
TheoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pmasottaCommented:
create the patch on the same directorry of the file you want to patch
#cd <to desire directory>
# nano

copy&paste the patch text from the web page to putty
[ctr-x] to exit
save giving a name as file.patch


then run the patch command
# patch < file.patch
0
TheoAuthor Commented:
Thanks
I have opened nano
I copy the piece starting with ----IMC.php to EOF

Then go to Putty, but Ctrl V doesnt work
0
pmasottaCommented:
to paste on nano using putty just holding pressed SHIFT click the mouse rigth button
0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

TheoAuthor Commented:
"Only garbage was found in the patch input"
0
pmasottaCommented:
the patch should beggins with

--- IMC.php
+++ (clipboard)
@@ -134,9 +134,16 @@
      * @return boolean
      */
     public static function autoload($className)
-    {
-        return require str_replace('_', '/', $className) . '.php';
-    }


do not past the first text lines...
0
TheoAuthor Commented:
Yes, it does, but when I paste it all formatting is gone, so I have to put it back manually
0
TheoAuthor Commented:
patch: **** malformed patch at line 15: $className).'.php';


do not understand, just copied it like that
0
pmasottaCommented:
the formatting shouldn't be gone...
I just cut and pasted the text on nano using ubuntu and the format is kept...

from now on the problem could be the patch but this is the way to apply a patch ;-)
0
TheoAuthor Commented:
Sure I now learned how to apply a patch. But this is not Ubuntu by the way, but Centos .5.

And I am sorry, but the formatting just disappears when I copy this from Firefox to Putty ( and to Notepad as well)

And I have accepted this problem and am now struggling line by line to correct it, but I do not know what went wrong in line 15
0
pmasottaCommented:
ok do this

# wget http://pear.php.net/bugs/bug.php?id=18129
that brings the patch web page

the patch inside the file keeps the format, rename the recived file, edit it getting rid ov everithing but the formatted pach save it and apply the patch ;-)))
0
TheoAuthor Commented:
OK I will try that. Is it a problem that I am on PHP 5.2.16 and that this patch is for php 5.3.3?
0
pmasottaCommented:
yes.
a patch really works on the exact version that is supposed to fix...
A patch gives to the patching engine the file, the location, lines to erase(-), lines to add(+)
applying a patch on a different version== problems...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TheoAuthor Commented:
OK then it stops here. Thanks for your time and the patching skills, they will be of use in another situation.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.