You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by is...@gmail.com on 2008/03/21 21:17:37 UTC

[users@httpd] Can't modify LoadModule line for PHP

Hello all,

A summary:
Modifying httpd.conf to try to point "LoadModule php5_module" to point to
anywhere but the original location results in Apache not being able to start
again.

And the history...
I'm a recent Mac convert running OS X 10.5.2 (aka Leopard), with it's
pre-bundled Apache 2.2 and PHP 5.2.4.  In an attempt to get GD library
working, I installed two additional copies of PHP (and one additional copy
of Apache due to a lack of understanding about how Macports works).  When I
attempt to change the LoadModule line to point from the original
"libexec/apache2/libphp5.so" to a different libphp5.so file, Apache log
files show the following error when I attempt to restart it "caught SIGTERM,
shutting down".  This error also occurred prior to the second Apache
installation.

I'd like to know a) what causes this error since it seems to be a
straightforward change everywhere else I've looked, and b) how I can verify
that the second Apache install isn't running.  I've already determined that
the second Apache and the "Web sharing" in System Preferences are unrelated.

When the server does run, I've recently begun receiving a "[warn] module
php5_module is already loaded, skipping" error twice, despite the LoadModule
line only being listed once.

It's highly frustrating and I'd appreciate any help.

Re: [users@httpd] Can't modify LoadModule line for PHP

Posted by is...@gmail.com.
On Sun, Mar 23, 2008 at 1:46 AM, Lester Caine <le...@lsces.co.uk> wrote:

> istojic@gmail.com wrote:
>
> > I hadn't thought to check whether additional .conf files were being
> > generated by the installer.  Sure enough, there were, and one had a
> > command to load the php5_module again.
> So changing the extension on it SHOULD switch PHP on and off.


Changing the extensions prevented the "module php5_module is already loaded,
skipping" warning I was receiving..  See below for details.

> Unfortunately, when I attempted to comment out the original LoadModule
> > php5... line in httpd.conf, I received the cursed SIGTERM error again.
> > I can comment out / modify other areas of the httpd.conf file, including
> > other LoadModule lines, but if I touch "LoadModule php5_module
> > libexec/apache2/libphp5.so" in any way (including commenting it out),
> > Apache won't start.
> Have you checked WHEN the extra .conf files are loaded?
>

I'm a little confused by the question.  One is loaded because the last line
of my httpd.conf is "Include /private/etc/apache2/other/*.conf", and the
file +entropy-php.conf is in that directory.  Another copy of the +entropy-
php.conf file resides in my apache2/users directory and causes the second
"module php5_module..." warning. I removed the latter because it was a
duplicate and I'm not sure why the installer put it there.


> I presume you have checked the entries in the extra conf file?
> And that loadmodule is the same? I have had problems with the PHP install,
> but
> usually the answer has been logical - so I don't know what to suggest next
> :(
> In the past I have dropped all the lines from the extra .conf into
> httpd.conf
> because that then matches the windows set-up - may be worth trying?
>

The loadmodule in the extra conf file is different, but ignored (based on
the warning and results of php_info).  I changed the extension so it
wouldn't be loaded, but still received the SIGTERM error when I attempted to
comment out the loadmodule php5_module line in my httpd.conf or modify it to
point elsewhere.  With your help I've found the cause of the warnings, so
thank you for that, but this last error is driving me crazy!

I've been unable to find anything in the Apache documentation (or elsewhere)
on why modifying that specific loadmodule line results in a SIGTERM.

-ilija

Re: [users@httpd] Can't modify LoadModule line for PHP

Posted by Lester Caine <le...@lsces.co.uk>.
istojic@gmail.com wrote:

> Thanks for the answer... I won't hold my breath for a standard between 
> the different distributions (as much as I'd enjoy that).
I'm bouncing between Mandriva - which I use at home and SUSE on my remote 
hosted machine because the host will not support Mandriva. That is a pain.

> I hadn't thought to check whether additional .conf files were being 
> generated by the installer.  Sure enough, there were, and one had a 
> command to load the php5_module again.
So changing the extension on it SHOULD switch PHP on and off.

> Unfortunately, when I attempted to comment out the original LoadModule 
> php5... line in httpd.conf, I received the cursed SIGTERM error again.  
> I can comment out / modify other areas of the httpd.conf file, including 
> other LoadModule lines, but if I touch "LoadModule php5_module   
> libexec/apache2/libphp5.so" in any way (including commenting it out), 
> Apache won't start.
Have you checked WHEN the extra .conf files are loaded?

> That behaviour seems bizarre.  I'll proceed with uninstalling the other 
> PHP packages as you mentioned (though I believe my path had something to 
> do with the differences I was seeing), but the Apache error mystifies me.
I presume you have checked the entries in the extra conf file?
And that loadmodule is the same? I have had problems with the PHP install, but 
usually the answer has been logical - so I don't know what to suggest next :(
In the past I have dropped all the lines from the extra .conf into httpd.conf 
because that then matches the windows set-up - may be worth trying?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't modify LoadModule line for PHP

Posted by is...@gmail.com.
On Sat, Mar 22, 2008 at 2:05 AM, Lester Caine <le...@lsces.co.uk> wrote:

> istojic@gmail.com wrote:
> > Hello all,
> >
> > A summary:
> > Modifying httpd.conf to try to point "LoadModule php5_module" to point
> > to anywhere but the original location results in Apache not being able
> > to start again.
> >
> > And the history...
> > I'm a recent Mac convert running OS X 10.5.2 (aka Leopard), with it's
> > pre-bundled Apache 2.2 and PHP 5.2.4.  In an attempt to get GD library
> > working, I installed two additional copies of PHP (and one additional
> > copy of Apache due to a lack of understanding about how Macports
> > works).  When I attempt to change the LoadModule line to point from the
> > original "libexec/apache2/libphp5.so" to a different libphp5.so file,
> > Apache log files show the following error when I attempt to restart it
> > "caught SIGTERM, shutting down".  This error also occurred prior to the
> > second Apache installation.
> >
> > I'd like to know a) what causes this error since it seems to be a
> > straightforward change everywhere else I've looked, and b) how I can
> > verify that the second Apache install isn't running.  I've already
> > determined that the second Apache and the "Web sharing" in System
> > Preferences are unrelated.
> >
> > When the server does run, I've recently begun receiving a "[warn] module
> > php5_module is already loaded, skipping" error twice, despite the
> > LoadModule line only being listed once.
> >
> > It's highly frustrating and I'd appreciate any help.
>
> Not being a Mac user I don't have direct experience, but since OSX is
> Linux
> like, I might expect similar ways of installing? When I install the php5
> module with Apache the conf data is loaded into a secondary conf file
> which is
> included IN httpd.conf automatically. So if you have added the Loadmodule
> yourself, then the already loaded error may be caused by that file.
>
> Going on from that, multiple copies of PHP can also be a problem if they
> are
> not picking up the right php.ini. So while you may be pointing to a
> different
> copy *IT* mat be trying to load the wrong extensions because it's seeing a
> wrong php.ini file.
>
> When I get messed up in Linux I simply uninstall the packages that are a
> problem, check from the package installer where files are and verify they
> have
> been deleted, and then start again clean. The package installer is also
> useful
> in that you can see WHERE it is putting things like php.ini and IF it is
> creating a php.conf to go into apache. It would be nice though if there
> was an
> agreed standard as to HOW all of this actually works - switching between
> distributions is a pain since they ALL do something different. :(
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
> L.S.Caine Electronic Services - http://home.lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
>

Hi Lester,

Thanks for the answer... I won't hold my breath for a standard between the
different distributions (as much as I'd enjoy that).

I hadn't thought to check whether additional .conf files were being
generated by the installer.  Sure enough, there were, and one had a command
to load the php5_module again.

Unfortunately, when I attempted to comment out the original LoadModule
php5... line in httpd.conf, I received the cursed SIGTERM error again.  I
can comment out / modify other areas of the httpd.conf file, including other
LoadModule lines, but if I touch "LoadModule php5_module
libexec/apache2/libphp5.so" in any way (including commenting it out), Apache
won't start.

That behaviour seems bizarre.  I'll proceed with uninstalling the other PHP
packages as you mentioned (though I believe my path had something to do with
the differences I was seeing), but the Apache error mystifies me.

Thanks again,
-ilija

Re: [users@httpd] Can't modify LoadModule line for PHP

Posted by Lester Caine <le...@lsces.co.uk>.
istojic@gmail.com wrote:
> Hello all,
> 
> A summary:
> Modifying httpd.conf to try to point "LoadModule php5_module" to point 
> to anywhere but the original location results in Apache not being able 
> to start again.
> 
> And the history...
> I'm a recent Mac convert running OS X 10.5.2 (aka Leopard), with it's 
> pre-bundled Apache 2.2 and PHP 5.2.4.  In an attempt to get GD library 
> working, I installed two additional copies of PHP (and one additional 
> copy of Apache due to a lack of understanding about how Macports 
> works).  When I attempt to change the LoadModule line to point from the 
> original "libexec/apache2/libphp5.so" to a different libphp5.so file, 
> Apache log files show the following error when I attempt to restart it 
> "caught SIGTERM, shutting down".  This error also occurred prior to the 
> second Apache installation.
> 
> I'd like to know a) what causes this error since it seems to be a 
> straightforward change everywhere else I've looked, and b) how I can 
> verify that the second Apache install isn't running.  I've already 
> determined that the second Apache and the "Web sharing" in System 
> Preferences are unrelated.
> 
> When the server does run, I've recently begun receiving a "[warn] module 
> php5_module is already loaded, skipping" error twice, despite the 
> LoadModule line only being listed once.
> 
> It's highly frustrating and I'd appreciate any help.

Not being a Mac user I don't have direct experience, but since OSX is Linux 
like, I might expect similar ways of installing? When I install the php5 
module with Apache the conf data is loaded into a secondary conf file which is 
included IN httpd.conf automatically. So if you have added the Loadmodule 
yourself, then the already loaded error may be caused by that file.

Going on from that, multiple copies of PHP can also be a problem if they are 
not picking up the right php.ini. So while you may be pointing to a different 
copy *IT* mat be trying to load the wrong extensions because it's seeing a 
wrong php.ini file.

When I get messed up in Linux I simply uninstall the packages that are a 
problem, check from the package installer where files are and verify they have 
been deleted, and then start again clean. The package installer is also useful 
in that you can see WHERE it is putting things like php.ini and IF it is 
creating a php.conf to go into apache. It would be nice though if there was an 
agreed standard as to HOW all of this actually works - switching between 
distributions is a pain since they ALL do something different. :(

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org