[Techtalk] RedHat 8, Apache and PHP

Beth Johnson linux.chick at verizon.net
Thu Feb 27 18:13:28 EST 2003


Hi there,
I'm trying to get PHP working with Apache; does anyone have these
working together on Psyche?

For Apache this is what I have installed via rpm:

httpd-2.0.40-11
httpd-manual-2.0.40-11
mod_perl-1.99_05-3
mod_python-3.0.0-10
mod_ssl-2.0.40-11

For PHP this is what I have installed via rpm:

php-4.2.2-8.0.7
php-manual-4.2.2-8.0.7
php-mysql-4.2.2-8.0.7
php-odbc-4.2.2-8.0.7
php-snmp-4.2.2-8.0.7
php-pgsql-4.2.2-8.0.7
php-ldap-4.2.2-8.0.7
php-imap-4.2.2-8.0.7
php-dbg-server-2.10pl3-6
php-dbg-client-2.10-6
php-dbg-base-2.10-4

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've checked for this line in my httpd.conf:

#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Checked that these lines are in /etc/httpd/conf.d/php.conf:

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288
</Files>

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've restarted the server.

I've created the following document, set 777 for now, in /var/www/html

<html>
<head>
<title>Testing PHP</title>
</head>
<body>
<h1>Testing PHP</h1>
<p>If you have php working, you'll get a greeting;</p>
<?php print "Hello world!"; ?>
</body>
</html>

When I pull it up the html renders fine, but the php doesn't execute.

I've tried downgrading httpd to Apache-1.3.27, but that leads to
dependency hell.  I've also looked at building from source, but the
documentation assumes that you know a lot about what is going on, and
that's not me!

Any help here?

regards,
Beth
0 for 2 in stuff she wanted to get done on her box this week. :-(

-- 
  /\/\    Beth Johnson
 / o o\   Cosmic Wonderer
( / ^^\)  Springfield, MA USA
 \ M_M/   "Ruling a country is like cooking a small fish--
           you have to handle it with care."--Lao Tzu
	




More information about the Techtalk mailing list