Before you dig too deep into Apache and spend your weekend hating PHP/Apache/programming...
Is your Apache web server serving pages? Yes, okay, Apache is working.
Have you tested that Apache is serving PHP pages? If you haven't, here is a basic test:
create a file and save as phpinfo.php in what ever directory is your htdocs directory for Apache. In that file, put only the following content:
<?php phpinfo(); ?>
Can you view that page in a browser and see all of your PHP settings? If yes, good Apache is parsing PHP pages.
If you've made it this far, good. Now you are a point of troubleshooting the php.ini. Did you create a backup of your originial php.ini before you copied one from another PHP server? If yes, use that original.
Open it up and look for register_globals and if it isn't already set to OFF, change it to OFF.
Okay, if you get through all of that, post again and we'll start on debugging your code. tekky and drawmack already gave good advice to troubleshoot so don't be so quick to dismiss it in favor of ripping apart your Apache. Maybe what I've written looks like a lot of work, but since I have no idea of how you built your web server or configured it with PHP, I can only suggest some basics. Again, if you answer yes to everything suggested in my post, then we should be back at square one with this thread which is debugging the code. And yes, you'll need to post some code if you want someone to look at it in order to QUICKLY help you. So far, I have not seen a lot of successes with remote troubleshooting by playing 20 questions.