Sounds like Apache isn't configured correctly. Before testing PHP scripts, start with an HTML file. Write a simple text file called index.html and put it in the location where Apache serves the default web site. When you can use your web browser to see that file by going to http://127.0.0.1/index.html then you can move onto the next step of putting a PHP file in the same directory and calling that with your web browser. You may or may not have PHP working with Apache yet... but before you can test that, you have to make sure Apache can find the files in the first place.