Re: PHP doesn't work with Apache2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



BuildSmart <buildsmart <at> daleenterprise.com> writes:

> 
> 
> 
> On Nov 24, 2007, at 11:12:33, ApplePro wrote:
> 
> Keith Roberts <keith <at> karsites.net> writes:
> 
>  
> To add to Dave's points:
> 
> Maybe the yum install of php is adding the following line to 
> 
> your httpd.conf file for you, which you will need to add 
> 
> manually when you compile php yourself?
> 
> AddType application/x-httpd-php .php
> 
> AddType application/x-httpd-php .hml
> AddType application/x-httpd-php .htm
> AddType application/x-httpd-php .html 
> 
> 
> 
> Thanks Keith, I've added code and rebooted server, but it still doesn't work.
> 
> PS: Sorry for pruned quote, but Gmane doesn't allow to post too much quote.
> 
> 
> 
> OK, let's go back to the beginning so you can follow what is required one step
at a time and understand what each step is.
> 
> First step, you build and install PHP from source and one of the files is
named libphp5.so and you need to know where it is in the source so you can
verify it against the installed file to ensure it is the same file so after the
make command do:
> ls -lsa $(find . -name libphp5.so)
> 
> Second step, what is the actual path of the new installed libphp5.so file?
> 
> You need to know that this module is installed in the correct location and you
need to know what this location is.
> 
> A HINT: this is usually a path where other apache modules are.
> 
> ANOTHER HINT: this should tell you where that directory is.
> /usr/sbin/apxs -q LIBEXECDIR
> 
> Verify that the libphp5.so file is in this directory and it's date/size match
that of the one from the apache build
> 
> Third piece of information I want is the unmodified line from your httpd.conf
that loads the php module.
> 
> These 3 pieces of information will tell you a lot about the installation.
> 
>  -- Dale
>  
> 
> 


I have libphp5.so file in many directories and the size is the same.

Apache fails to start. When I try to start it manually, I get this error message:

Starting httpd: httpd: Syntax error on line 188 of /etc/httpd/conf/httpd.conf:
LoadModule takes two arguments, a module name and the name of a shared object
file to load it from
[FAILED]


When I comment this line, Apache starts well:

LoadModule php5_module modules/libphp5.so

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux