Hi Scott,

Many thanks for your help.

1 - I do see several blocks <IfDefine>...</IfDefine> in httpd.conf but I
only got:
    root 3353 0.0 0.3 1728 564 pts/1 s 15:48 0:00 fgrep httpd
when I did
    ps auxww | fgrep httpd

 2 - PHP seems to be installed. I got
    php -4.0.6-7
when I did
    rpm -q php

3 - I modified the Apache start-up script as follows:
(I will try to creat the separate file later)

# Source additional OPTIONS if we have them.
if [ -f /etc/sysconfig/apache ] ; then
        . /etc/sysconfig/apache
fi
# note JF 02/07/17
# added following 2 lines
OPTIONS="-DHAVE_PHP4"
echo $OPTIONS

4 - It still doesn't work.
I'm testing with following index.html. Can you suggest any other test ?

<!-- Contents "under construction" -->
<html>
<head>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1">
  <title>jfazenda</title>
</head>

<BODY Text='#000000' BGCOLOR='#ffffff' LINK='#aa0000' VLINK='#aa0000'
ALINK='#aaaa00'>
<center>
<font face='arial' size='2' color=#333333>
<br><br><h3>under construction</h3>
<br><br><hr width=50%>
<br>
<P>Testing PHP</P>
<br>
<?php print 'Hello World'; ?>
<br><hr width=50%>
<br><br>Contact : [EMAIL PROTECTED]</font>
</body>
</html>

Thanks again, JF

> Subject: Re: PHP - HOW TO MAKE IT WORK WITHIN APACHE
> Date: Tue, 16 Jul 2002 15:32:45 -0500
> From: Scott Lamb <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
>
> J Fazenda wrote:
> > I found the following lines in the httpd.conf that was installed in
my
> > system:
> >
> > <IfDefine> HAVE_PHP4>
> > LoadModule php4-module
> > </IfDefine>
> > .....
> > <IfDefine> HAVE_PHP4>
> > AddModule php4-module.c
> > </IfDefine>
> >
> > And the following lines in the Apache startup script :
> [...]
> >         daemon $httpd `moduleargs` $OPTIONS
> >
> > The "Apache Aministrator's Handbook" I'm using says that to activate

> > modules, Apache should be started" with /usr/sbin/httpd -D<name>."
> > Is it correct to assume that  some "options" should be passed to the

> > function start() from the file ./etc/sysconfig/apache ?
>
> Take a look at that `moduleargs`. You'll also find in the file a
> function called moduleargs that is intended to generate all of those
> defines. It takes a file list of /usr/lib/modules/*.so and applies
some
> regular expressions. Do a "ps auxww | fgrep httpd" and you should see
a
> bunch of -DHAVE_xxx arguments.
>
> > Were can I get  this famous file ./etc/sysconfig/apache or
instructions
> > to make it. I cannot find this file in my system.
>
> There's nothing very special about it. It contains a shell script
> fragment so you can customize options. You could create it with text
> like this:
>
>      OPTIONS="-DHAVE_PHP4"
>
> but one has to wonder why it doesn't do that on its own. My guess is
below.
>
> > This may be a bit academic because I guess I could try to make it
work
> > by just commenting the "If" and "/If" lines around "LoadModule" and
> > "AddModule", but I would like to follow the thinking of whoever made

> > these start and conf files.
>
> RedHat made those scripts. The goal, I think, was to be able to
> distribute things like PHP as seperate modules and not have to change
> the httpd.conf when they are installed and removed. So, you possibly
> have various things that wouldn't without additional RPMs in those
> <IfDefine>s.
>
> I suspect you don't have the PHP RPMs installed. Do a "rpm -q php".
> Also, your configuration doesn't quite match up with mine. My RedHat
7.2
> system has this instead:
>
>      <IfDefine HAVE_PHP4>
>      LoadModule php4_module        modules/libphp4.so
>      </IfDefine>
>
>      ...
>
>      <IfDefine HAVE_PHP4>
>      AddModule mod_php4.c
>      </IfDefine>
>
> so maybe you don't have the latest RPMs. Go to RedHat's update site,
> make sure you have the latest Apache and PHP stuff. This is
particularly
> important because there was a big Apache security advisory lately.
>
> --
> Scott Lamb




-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to