Apache PHP
Paul Guba
yellowdog-general@lists.terrasoftsolutions.com
Fri May 17 19:41:00 2002
Thanks this puts me on the right track I find no libphp4.so. However
no directoy libexec either. With the YDL default install I find many
modules installed in /usr/lib/apache. When I rpm -ql apache as you
requested it does not appear so I have to believe it not there. I guess
this mean a compile and install from .tar. Not sure I want to tackle
this unless I can fine a good how to. In the end I would like to use
MYSQL with PHP so I imagine I would need to compile that module in also.
On Friday, May 17, 2002, at 08:52 PM, Keary Suska wrote:
> on 5/17/02 6:25 PM, paulguba@comcast.net purportedly said:
>
>> Has anyone enabled PHP in Apache. Not sure if I need to recompile
>> Apache or
>> just activate a module. PHP4 is installed on my machine but not sure
>> if it
>> was installed as a module or CGI it can be either according to a
>> tutorial I'm
>> reading. I have added AddType application/x-httpd-php4 .php4 to my
>> virtual
>> server directive but not sure if this is correct as the tutorial
>> refers PHP3.
>> It also seems that the module is on by default on the server but my
>> scripts
>> don't seem to work.
>
> PHP can either be compiled into Apache or as a loadable (.so). If you
> are
> using stock RPMs, I don't think it will be compiled in unless the
> Apache RPM
> has "PHP" in the name. Even then, I can't say for sure, as I never use
> RPM
> for Apache/PHP.
>
> If PHP is installed as a loadable, you will see a file called
> "libphp4.so"
> under the libexec directory of the Apache installation directory. You
> may
> have to do an RPM -ql to find out where this is, as Apache RPMs tend to
> install in unpreferable locations.
>
> If you find this, then your httpd.conf file needs LoadModule and
> AddModule
> directives. There should be examples in your conf of this. On my
> system, PHP
> is loaded last but before mod_ssl. Like this:
>
> LoadModule php4_module libexec/libphp4.so
> .
> .
> AddModule mod_php4.c
>
> Then you need to tell Apache how to recognize PHP scripts. Typically,
> you
> do:
>
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
>
> If PHP is compiled in, you only need the AddModule and AddType
> directives.
> If you have these, and PHP still doesn't work, it is likely not
> compiled in.
> You could try running apachectl with either status or fullstatus for
> more
> info on available modules, IIRC.
>
> Keary Suska
> Esoteritech, Inc.
> "Leveraging Open Source for a better Internet"
>
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
>