Re: Can't modify LoadModule line for PHP

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

 




On Sat, Mar 22, 2008 at 2:05 AM, Lester Caine <lester@xxxxxxxxxxx> wrote:
istojic@xxxxxxxxx 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
 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux