Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php with apache who ?

Status
Not open for further replies.

haux

Programmer
Apr 11, 2001
79
DZ
i have RedHat6.2 at home, i had installed Apache (rpm), and php (rpm)
My apache server is running finelly (when i go to i see the test page of apache ) when i made a test.php page i got the script of php <?.....>
with a php3 as extention there is no change.

Please help me, must i download a apachxx.gz and a phpxxx.gz an compile theme to get all work ??? (i hope no!)

Thanks for all
 
In your Apache configuration file (httpd.conf), you will find some lines relating to PHP. You need to uncomment those lines, and restart Apache.

For example:

Code:
   #LoadModule php3_module  libexec/libphp3.so
Should be
Code:
   LoadModule php3_module   libexec/libphp3.so

(Or it might be for the PHP 4 module, I can't remember which one RedHat 6.2 has)

The other lines are:
Code:
   AddModule mod_php4.c
and
Code:
   #AddType application/x-httpd-php3 .php3
   #AddType application/x-httpd-php3-source .phps

Finally, there is a line with:
Code:
   DirectoryIndex index.html index.htm index.shtml

This line defines which files can be the default index file in a directory. Add the correct files for PHP:
Code:
   DirectoryIndex index.html index.shtml index.php index.php3

Whenever you install PHP, whether by compiling or by RPM, this needs to be done. upgrading to PHP4 will require that you find or establish the correct lines for PHP4 modules.

Honestly, if you are using the default RPMs that come with RedHat 6.2, then both PHP and Apache are outdated. You should at least download the most recent RPMs for Apache, PHP, and even Perl. -------------------

Current reading --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top