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