Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Applications > Issue <<  63 of 141 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 2605
Last update: 07-01-04
Issue:
How do I test PHP or make sure it's working on Red Hat Enterprise Linux?
Resolution:
Create the file /var/www/html/test.php that contains the following line:

/var/www/html/test.php

<?php phpinfo(); ?>
   


Start your web server:
# service httpd start
On a properly configured system, pointing your web browser to http://<your-web-server>/test.php should give you a php information page with version, build date, etc.

If for some reason that doesn't work, here are a couple of things to double check:
  • is php installed? Confirm with: rpm -q php
  • did customization of /etc/httpd/httpd.conf somehow disable Apache's ability to server php content
  • network connectivity and port filtering; do you get a response on port 80 via "telnet 127.0.0.1 80"? is a firewall filtering the port (eg. nmap -sS <your-web-server>)
  • rule out potential DNS issues by using the machine's IP address but keep in mind any name based virtual hosting directives you've given to Apache


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Applications > Issue <<   63  of  141  >>