These are the steps that worked for me on all installations so far (you might need to remove the dlls you copied to the windows or system32 directory first:
1) make sure that you use the zip version of php not the msi installer version
2) install apache into a path that doesn't contain any white spaces (e.g. c:\wamp\apache)
3) unzip the php zip file to e.g. c:\wamp\php (not inside the apache installation directory)
4) copy php4ts.dll to system32
5) copy all files from dlls to system32
6) do not copy any php dlls anywhere to the apache installation directory.
7) Make sure that there are no old php dlls in any path set in the PATH environment variable and that there are no php dlls outside system32 at all (might be a pain if you want to upgrade php at a later time and it doesn't work because there are any dlls where they shouldn't be)
8) Edit httpd.conf and add the following lines:
LoadModule php4_module c:\wamp\php\sapi\php4apache.dll
at the end of the LoadModule block
AddModule mod_php4.c
at the end of the AddModule block
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
somewhere below the AddModule block.
Then restart Apache and it should work, you never know for sure but I never had any big problems with this installation procedure.
Hope this helps you 🙂
Thomas