php not working

Hi,

I am setting up a remote server running Redhat Linux Enterprise 3 to serve email and web pages.

My current project is trying to setup MailWatch to view email that has been scored by Mailscanner.  Mailscanner is working fine logging to mysql and email works fine.  Apache is working fine, but I need php running.  I know php is installed and I ran an update for it.  It seems that php is not configured correctly, but I know nothing about php and precious little about linux.  

How do I configure and test php in a linux environment?  Even a "Hello World" sample would be helpful.

Thanks,
mwclassen
mwclassenAsked:
Who is Participating?
 
ppfoongCommented:

Then PHP is not working.

You need to load the PHP module in the httpd.conf configuration, and restart Apache.

0
 
ppfoongCommented:

Create a new file, call into phpinfo.php and put it inside the Apache html directory.

The content of the file will be:

<?
   phpinfo();
?>



If PHP is working fine, a browse to http://your.server.com/phpinfo.php will disclose all the PHP configuration and information to you.

0
 
mwclassenAuthor Commented:

I created the file and put it in the /var/www/html directory which is the home directory for Apache.  What happens when I browse to it is a download dialog pops up which gives me the file I created.

mwclassen
0
 
mwclassenAuthor Commented:

That worked, ppfoong!  Thanks for your help.

mwclassen
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.