Allright, you can uninstall apache and php and start all over again. This time don't move any files...
Install apache again...After the installation test it to see if it's working properly (just type
http://localhost/ into your web browser- you should see a picture of a
feature and a 'congratulations, apache is running' message).
Now go grab the PHP installer from www.php.net and install that (the MSI is the easiest way ).
Now let's make sure that PHP is working, before we make it run with Apache.
Create a plain text file in Notepad. Call it 'test.php' or whatever. Make it contain exactly this:
<?php
echo 'Hello Universe.';
?>
Now save the file into the same directory as wherever the php.exe file is (probably in C:\PHP I think - do a Windows 'Find' to locate it). Then open a Windows Command Prompt and go to that directory. Then type in:
php.exe -q test.php
It should say 'Hello Universe' back to you if the PHP is working.
Now you need to stop the Apache service and re-configure it. You can do this through 'Services'. I don't know where that is on XP but on my Win2K machine it's Start -> Program Files -> Administrative Tools -> Services. Once you've got Services open just click on Apache to select it, then use the control buttons (similar to the controls of a CD player) - you need to press the 'stop' one (shaped like a square). It should let you know that the Apache service has stopped. (Keep the Services window open - we'll need it again in a minute.)
Now you need to find your Apache configuration file. This is called httpd.conf. On my machine it's here: C:\Program Files\Apache Group\Apache2\conf\httpd.conf (if yours is not in the same place try a Find). Once you've found httpd.conf, open it up in a plain text editor - I can't stress this enough. If you open it up in Word or some non-plain text editor, and then save it, it will introduce lots of extra formatting, and you will break Apache. (If you knew that anyway, sorry for stating the obvious.) So, use Notepad or any plain-text or programmer's text editor.
You would do well to save out a copy of httpd.conf before making any changes. Call it httpd.conf.original or something. That way if we screw up, you can just make another copy of the original and start again (rather than having to reinstall Apache).
Now you need to add some lines to the file. I recommend you put these lines in a logical place so they're easy to find later. Try a search for the text 'AddType'. You may find one or more 'AddType' directives. After those lines, type the following exactly as it's written:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
... except that, you need to make sure that those paths are correct. The default install of PHP installs itself into C:\php\ so it's probably correct. (Note that Apache can use forward slashes for filesystem paths - stick with this for now. You can use backslashes but the syntax is even more weird - you have to use two backslashes to 'escape' the characters. So, forward slashes will do fine.)
Save httpd.conf, then start the Apache service up again through the Services window. If all is well, PHP and Apache should now play nicely.
Now let's put a PHP script in the 'web root' folder for Apache. For me, that's C:\Program Files\Apache Group\Apache2\htdocs\ - The 'test.php' we used earlier to test if PHP worked at all will do fine. Just drop the file in the folder.
Go back to your browser (IE) and type in 'http://localhost/test.php'. If you see Hello Universe in a rather ugly serif font, congratulations! You have a working PHP/Apache installation.
Hopes this works for you...
Alan