MySQL functions themselves should not present any problems between PHP versions, but the use of variables in those functions may very well be a problem, particularly if you are relying on register_globals being on and using those variables Saying "my site practically broke" isn't very helpful; posting some of the error messages would be - it may well be that a few re-defined variables, the use of different variable names, or other simple fix would eliminate the majority of your problems.
When you hit the ESC key in vim it might appear that it "did nothing", but that is not true - you just didn't notice what it did - it signaled the vim editor to expect another action. Did you review the vim manual as I suggested, or review a vim tutorial? (actually, I guess you didn't, given the time of your response ). The "expected action" is the entry of the ":" (command follows), and the w (which means "write the buffer"), and the "q" (which means "quit") - all of which you would know if you rtfm as suggested.
I can't tell you what you will see on your screen, as I don't run putty under windows from the command line (I run it as a windows program, which then opens a terminal window on my machine, displays the shell terminal and provides terminal emulation).
Again, why are you torturing yourself with vim? I've described several easier ways for you to create that file - if you want to use vim, it will work, but you have to do it correctly and completely exactly as detailed in the article.
That will depend entirely on whether you have done it correctly, and if you properly manipulate the .htaccess file to use your installation, and if you modify the php.ini correctly to make the change. The article warned you: The instructions provided in this article or section are considered advanced.
You are expected to be knowledgeable in the UNIX shell.
Support for these instructions is not available from DreamHost tech support.
Frankly, if you are having this much trouble using vim to get the installscript on the server, I don't think you ought to be messing with it.
You can much more easily change the max_file_upload_size by just using a modified php.ini file (also in the wiki) than by installing a custom PHP. Either way , understand that if you bork it up, support will not sort it out for you.
As zlib is one of the packages in the installscript, I think it will give you the zip functions - I don't know about rar (I never use it).
If you have a specific question, that indicates you have read the man pages and maybe a tutorial or two, and you have an additional question, feel free to post it and I'll try to help again - but at this point I'm concerned that you are getting yourself into a mess, and I don't really want to encourage that. I think you are better off re-evaluating why your script(s) "practically broke" your site under PHP 5 than you are just assuming a custom PHP4 installation will fix things - from what I have read so far in this thread, I can almost guarantee that it will not.
Also, simply installing a custom PHP4 per that wiki article will do nothing toward changing your allowable file upload size - that's a function of a php.ini setting, l and you have not even addressed that yet.