[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

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
0
mwclassen
Asked:
mwclassen
  • 2
  • 2
1 Solution
 
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
 
ppfoongCommented:

Then PHP is not working.

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

0
 
mwclassenAuthor Commented:

That worked, ppfoong!  Thanks for your help.

mwclassen
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now