Red Hat Enterprise Linux > Applications > Issue
<<
63 of 141
>>
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
Red Hat Enterprise Linux
>
Applications
> Issue
<<
63
of
141
>>