Getting PHP to work

Richard Hubbard rhubby at yahoo.com
Mon Aug 4 13:44:25 EDT 2003


Here is the deal...
--- Asheville Joe <josephj at main.nc.us> wrote:

> file and named it 
> /home/bigbird/pgm/phpinfo.php


This file needs to be placed in the directory where
Apache thinks your web pages are stored.

If you have a default install of red hat, then this
directory is /var/www/html

Place your phpinfo.php file there.

Then, in order to see the file, you can't just have
mozilla (or any web browser) open the file.  PHP is a
server side scripting language, so Apache has to be
involved.  To do that, open mozilla, but instead of
opening the file like you are opening a word
processing document, type in the location bar:
http://localhost/phpinfo.php
This will tell mozilla to contact Apache and have
apache send the file to your browser (which is how all
of the web pages on the internet work).  Apache will
then do the php, and send the completed html page to
your browser.

If you don't have a standard red hat install (maybe
you are using slackware?) you need to find out where
Apache thinks it's files are stored.

If you look in a file called 'httpd.conf' somewhere
under the /etc directory (on mine it is in
/etc/httpd/conf/httpd.conf), you will find a line
called <Directory Root> (or <DirectoryRoot>, I forget
which) which will point to where your web pages are
stored.

At this point you may also want to check if php is
installed or not.  On most default installs it is, but
someone else pointed out how to do that.

Hope this helps!

Rich hubbard
There are 10 kinds of people in the world, those who
understand binary, and those who don't.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the nflug mailing list