how to run php on a local machine

i want to run php on my local machine so i have installed apache on my machine but i still cant run the php using my browser can someone help.

When you said you installed APACHE on your system, did you really mean you installed XAMPP?
( http://www.apachefriends.org/en/xampp.html )

If so, you would have to look at XAMPP/APACHE’s site under the FAQ section and it should steer you to the correct answer. There are a few setup issues that have to be altered to run the PHP locally.

Post back here again if you can’t figure it out…

Hi samzer,

I am having the same problem. Have you been able to get anywhere? If so, can you please describe what you did?

Thanks

i installed apache 2.2 and it was test ok but the issue now is to have php configured to run locally. i heard that i will have to make some configuration changes under the php.ini but i can’t file the line that i should change under that configuration. when i try to run the script on the browser it gives me the code as it is.

i type these o my browser localhost/program/test.php instead of giving me the result according to the script it give me the code as it is

Apache is a SERVER program. It is NOT PHP. OR Java. OR Javascript…

Once you install a server system, like Apache, next you have to install all of your languages such as PHP.
OR, just inst XAMPP which is a version of Apache with Java and PHP already installed into it.

The address for it is: http://www.apachefriends.org/en/xampp.html

Once installed, remember to use the LOCALHOST addresses not your web address for files.
Read the help and doc files that come with XAMPP…

If you don’t want to install this, you can go to PHP.net and download it and install it. And locate JAVA server software, etc and install all of those, too…

Hope this helps

Sponsor our Newsletter | Privacy Policy | Terms of Service