How to make a simple php test file work under Apache?

Apache is working fine. I put in files of difft types like txt,jpg,html and they all work fine under http://localhost/filename.fileextension

However I know some files have to be moved/copied to make php work. Some changes to php.ini or httpd.conf also.    

Could you please let me know those?

I am a beginner

Thanks.
perfect_tranquilityAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
nplibConnect With a Mentor Commented:
just make a php file in the document root of the web site, and call it
test.php
<?php
echo "Hello World";
?>
0
 
hernst42Commented:
See http://www.php.net/manual/en/install.windows.apache2.php which steps are required to make php available in apache for windows. Or use a complete apache, mysq, php stack like

http://www.wampserver.com
http://www.apachefriends.org/en/xampp-windows.html
0
 
perfect_tranquilityAuthor Commented:
that link,hernst ias for apache 2.0 while mine is 2.2.8 are you sure there wont be any compatibility issues????

I just was working with PHP 5.2.3 and it supposedly made the Apache server to crash. I uninstalled it and it is no longer crashing. plz provide me with a matrix that will be stable as in php5 and apache.

oracle 9i will come later. i am not using any 3rd party tools
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
hernst42Commented:
From the link:
Note: Apache 2.2.x Support  Users of Apache 2.2.x may use the documentation below except the appropriate DLL file is named php5apache2_2.dll and it only exists as of PHP 5.2.0.
0
 
perfect_tranquilityAuthor Commented:
now after doing what i thought was pertinent, i get a 500:Internal Server Error

Please ask what you think might have gone wrong,
0
 
hernst42Commented:
Instead of trying to set up apache and php manually use
http://www.wampserver.com
http://www.apachefriends.org/en/xampp-windows.html

http://zend.com/products/zend_core (if you ever plan to use oracle with php)

This will save you hours of putting all pieces correctly together.
0
 
ChorchConnect With a Mentor Commented:
You should easilly see you PHP and Apache config creating a PHP file, e.g.:

http://localhost/test.php

with the following code in it:
<?php
phpinfo();
?>

Open in new window

0
All Courses

From novice to tech pro — start learning today.