php not working

Posted on 2006-04-11
Last Modified: 2013-12-16

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.

Question by:mwclassen
    LVL 14

    Expert Comment


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

    The content of the file will be:


    If PHP is working fine, a browse to will disclose all the PHP configuration and information to you.


    Author Comment


    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.

    LVL 14

    Accepted Solution


    Then PHP is not working.

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


    Author Comment


    That worked, ppfoong!  Thanks for your help.


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now