Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Oct 2009 15:03:21 -0400
From:      Michael Powell <nightrecon@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Apache server imap.so ssl_once_only_init error
Message-ID:  <haiok9$99l$1@ger.gmane.org>
References:  <200910071611.35468.david@vizion2000.net> <19148.49033.927239.566075@jerusalem.litteratus.org> <haig68$bql$1@ger.gmane.org> <200910071811.44265.david@vizion2000.net>

next in thread | previous in thread | raw e-mail | index | archive | help
David Southwell wrote:

>> Robert Huff wrote:
>> > David Southwell writes:
>> >>  /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/imap.so:
>> >>  Undefined symbol "ssl_onceonlyinit"
>> >
>> > I look at this and ask (knowing very little about either) "is
>> > this a problem with Apache, or a problem with PHP?".
>> 
>> Easy enough to see - comment out the imap.so module in
>> /usr/local/etc/php/extensions.ini and see if Apache will start. If it
>> does the problem is the imap module. A more generic way to drive this
>> wedge is
>>  to temporarily comment out the LoadModule php5_module line from
>>  httpd.conf.
>> 
>> If it starts without this module it isn't Apache. Some PHP modules have
>> dependencies in that they need the other modules loaded before they load.
>> Try moving the imap.so line in extensions.ini to the bottom of the file
>> so all the other crypt modules such as openssl, hash, mcrypt, etc are
>> loaded first.
>> 
>> -Mike
>> 
>> 
>> 
> Mike you are right on the ball.
> 
> When I comment out the imap.so line in extensions.ini the server starts up
> normally. So now we have the culprit. That is after doing a portupgrade
> -frR mail/php5-imap.
> 
> The question is where do I go from here??

Hrmmm. Probably need to look into more details. I am running Apache-
event-2.2.13 here with PHP5-5.2.11 and extensions-5.2.11, with PHP running 
as FastCGI via the apache module mod_fcgid instead of mod_php. I presume you 
are just doing the normal mod_php method.

Upon thinking about it a little more, I'm guessing that when you tried 
relocating the extension=imap.so to the bottom of extensions.ini it had no 
effect. Sometimes this is an easy and quick answer when the problem is just 
load order. Another to consider is if you really do not require the imap 
module just leave it commented out, although this is not elegant as it does 
not attack the root source of the problem.

What I'm thinking (after looking at the actual error message again) is this 
is a build-time problem and not runtime. I believe that these kinds of 
symbol errors arise mostly from libraries being mismatched at build time.

To elaborate a little, I'm wondering if when you built mod_php at one point 
in time and then built the php5-extensions at a later time if they were not 
slightly different versions. Also, IIRC there was once a problem with the 
imap module in that it could not be used with the recode and yaz modules. I 
have the recode module present so I doubt it is a problem, but do not use 
the yaz module. Might look and see about yaz.

I suspect the core of the problem is that mod_php and the extensions are 
slightly out of sync with one another. A very sloppy thing to do would be to 
just remove all the PHP stuff, including mod_php, update the ports tree 
fresh and reinstall all of it at one time together. This may not be wise on 
a production server however, as this will entail downtime. As I said - 
"sloppy, scattergun approach". I have done this a time or two, but don't 
really like doing it. YMMV

If mod_php and the extensions were built at different times, with maybe a 
ports tree update in between, they may need to be all recompiled so they all 
get linked correctly.

-Mike

P.S. - And the biggest assumption of all I'm making is that Apache was built 
with SSL support in the first place. A variable which should be eliminated.


 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?haiok9$99l$1>