Re: Apache+mod_ssl + mod_php segfault (culprit found!)

2004-09-19 Thread Matthew Seaman
On Sun, Sep 19, 2004 at 12:07:38AM -0500, Kevin D. Kinsey, DaleCo, S.P. wrote:
 
 Matthew Seaman wrote:
 
 This sounds to me very much like you've got the mod_php loadable
 object linked against an incompatible version of a shlib which
 apach+mod_ssl is also linked to.  At a guess:
 
i) I'd finger the OpenSSL libs as a prime suspect: particularly if
   you've also installed OpenSSL from ports.  It's not necessary
   to install OpenSSL from ports as the version in the base system
   is perfectly OK.
 
  
 
 snip other good stuff
 
 It certainly seems that you are right as usual, Matthew.
 Removing openssl.so from /usr/local/lib/php/20020429
 and restarting Apache works (no core dump!) ... albeit
 PHP doesn't have OpenSSL support in it now, I guess ...
 
 After checking with ldd(1) as you suggested ... how should
 we fix this if we want PHP to have support for OpenSSL?
 It's not that critical in my case ... but PHP is ;-)

Hmmm... Well, it works for me.  Let's see:

% ldd /usr/local/lib/php/20020429/openssl.so 
/usr/local/lib/php/20020429/openssl.so:
libcrypto.so.3 = /usr/lib/libcrypto.so.3 (0x28116000)
libssl.so.3 = /usr/lib/libssl.so.3 (0x28213000)

% ldd /usr/local/libexec/apache/libssl.so 
/usr/local/libexec/apache/libssl.so:
libssl.so.3 = /usr/lib/libssl.so.3 (0x28132000)
libcrypto.so.3 = /usr/lib/libcrypto.so.3 (0x28161000)

I guess that so long as the shlib version numbers and entry points are
the same in both cases, you won't have a problem.  You do know that
apache13+mod_ssl involves a lot of patching to the apache part, and
that modules compiled for that combination aren't suitable for use
with plain apache13, and vice versa?

Try setting APACHE_PORT=www/apache13-modssl in your /etc/make.conf or
in the ENV[] section in /usr/local/etc/pkgtools.conf and recompiling
PHP and any PHP extensions.

Note that there's an unresolved bug to do with SSL support in PHP4 --
if you load SSL support as a module, you don't get all of the
functionality you do when SSL is compiled into PHP directly.  One
package that is adversely affected is Squirrelmail, which is prevented
from using the encrypted version of IMAP.  There's been several posts
about the problem around the FreeBSD lists, including instructions on
how to fudge the new PHP ports structure to get a compiled-in SSL
extension.

The bug doesn't affect PHP5, but then again, a log of PHP applications
don't work under PHP5 yet either.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpkPo223La1F.pgp
Description: PGP signature


Re: Apache+mod_ssl + mod_php segfault (culprit found!)

2004-09-19 Thread Vonleigh Simmons
Matthew Seaman wrote:
It certainly seems that you are right as usual, Matthew.
Removing openssl.so from /usr/local/lib/php/20020429
and restarting Apache works (no core dump!)
	Unfortunately this didn't work for me. Deleted the file and still 
apache dumps on me.


Try setting APACHE_PORT=www/apache13-modssl in your /etc/make.conf or
in the ENV[] section in /usr/local/etc/pkgtools.conf and recompiling
PHP and any PHP extensions.
	I did this as well. First I put the APACHE_PORT in /etc/make.conf, 
then I made deinstall apache, php and php4-extensions. Made clean on 
all of them. Then I reinstalled apache first, then php. Apache dumps on 
startup. Tried building the extensions, no change.

	However the starting it up, switching php on, then restarting still 
works (which is very lucky, as I need this up).

	I'm open to any other suggestions though, this has been very 
frustrating as my first experience with freebsd.

Vonleigh Simmons
http://illusionart.com/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache+mod_ssl + mod_php segfault (culprit found!)

2004-09-18 Thread Kevin D. Kinsey, DaleCo, S.P.
Matthew Seaman wrote:
This sounds to me very much like you've got the mod_php loadable
object linked against an incompatible version of a shlib which
apach+mod_ssl is also linked to.  At a guess:
   i) I'd finger the OpenSSL libs as a prime suspect: particularly if
  you've also installed OpenSSL from ports.  It's not necessary
  to install OpenSSL from ports as the version in the base system
  is perfectly OK.
 

snip other good stuff
It certainly seems that you are right as usual, Matthew.
Removing openssl.so from /usr/local/lib/php/20020429
and restarting Apache works (no core dump!) ... albeit
PHP doesn't have OpenSSL support in it now, I guess ...
After checking with ldd(1) as you suggested ... how should
we fix this if we want PHP to have support for OpenSSL?
It's not that critical in my case ... but PHP is ;-)
RTFM pointers accepted :-)
Kevin Kinsey
DaleCo, S.P.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache+mod_ssl + mod_php segfault

2004-09-10 Thread Matthew Seaman
On Thu, Sep 09, 2004 at 04:02:30PM -0700, Vonleigh Simmons wrote:
   I sent this already but didn't get any replies. I'm a little 
   desperate because I need to get this working, so if you can suggest 
 anything at all, I'd really appreciate it. I'm running FreeBSD 5.2-RELEASE, 
 apache is apache13-modssl, php is the mod_php version. All latest versions 
 (cvsup this morning).
 
   The problem is that apache segfaults on startup when 
 loadmodule/addmodule php are in the config file. Originally I fixed the 
 problem by compiling apache without expat. However, after a portupgrade 
 it stopped working again.
 
   Right now it's working with a major kludge: start up apache with 
 loadmodule/addmodule commented out, comment them back in and do an 
 apachectl restart. Somehow this lets apache work without segfaulting. 
 However, if I do an apachectl graceful/restart, then it segfaults again 
 and won't start up.
 
   I've tried recompiling apache, recompiling php, getting rid of php 
 extensions, etc, all to no avail. There is nothing in the logs, it 
 simply fails to start up. Any help or ideas are greatly appreciated.

This sounds to me very much like you've got the mod_php loadable
object linked against an incompatible version of a shlib which
apach+mod_ssl is also linked to.  At a guess:

i) I'd finger the OpenSSL libs as a prime suspect: particularly if
   you've also installed OpenSSL from ports.  It's not necessary
   to install OpenSSL from ports as the version in the base system
   is perfectly OK.

   ii) Different threading libraries can have similar bad effects.
   Everything should be compiled using the same threading
   libraries: if necessary, use /etc/libmap.conf to force the
   issue.  (Although I've never heard of that being necessary for
   any variant of apache before now)

The reason your kludge works would be to do with the order of
resolving the required shlibs: something like one shlib resolves all
the required symbols, but the other one is missing some.

Use ldd(1) to investigate what shlibs a binary needs, and check for
conflicts:

% ldd /usr/local/sbin/httpd 
/usr/local/sbin/httpd:
libz.so.2 = /usr/lib/libz.so.2 (0x280b3000)
libssl.so.3 = /usr/lib/libssl.so.3 (0x280c1000)
libcrypto.so.3 = /usr/lib/libcrypto.so.3 (0x280f)
libaprutil-0.so.9 = /usr/local/lib/apache2/libaprutil-0.so.9 (0x281ed000)
libexpat.so.5 = /usr/local/lib/libexpat.so.5 (0x281ff000)
libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x2821d000)
libapr-0.so.9 = /usr/local/lib/apache2/libapr-0.so.9 (0x2830b000)
libm.so.2 = /usr/lib/libm.so.2 (0x28327000)
libcrypt.so.2 = /usr/lib/libcrypt.so.2 (0x28343000)
libc.so.4 = /usr/lib/libc.so.4 (0x2835c000)

% ldd /usr/local/libexec/apache2/libphp5.so 
/usr/local/libexec/apache2/libphp5.so:
libcrypt.so.2 = /usr/lib/libcrypt.so.2 (0x28266000)
libm.so.2 = /usr/lib/libm.so.2 (0x2827f000)
libxml2.so.5 = /usr/local/lib/libxml2.so.5 (0x2829b000)
libz.so.2 = /usr/lib/libz.so.2 (0x2838e000)
libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x2839c000)

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpuq7TcBy0zQ.pgp
Description: PGP signature


Re: Apache+mod_ssl + mod_php segfault

2004-09-10 Thread Vonleigh Simmons
Use ldd(1) to investigate what shlibs a binary needs, and check for
conflicts:
	This is what it outputs. Seems to be the same (although the numbers 
between parenthesis don't coincide, don't know if they should):

/usr/local/sbin/httpd:
libcrypt.so.2 = /lib/libcrypt.so.2 (0x280aa000)
libmm.so.13 = /usr/local/lib/libmm.so.13 (0x280c3000)
libc.so.5 = /lib/libc.so.5 (0x280c7000)
/usr/local/libexec/apache/libphp4.so:
libcrypt.so.2 = /lib/libcrypt.so.2 (0x28248000)
libm.so.2 = /lib/libm.so.2 (0x28261000)
Vonleigh Simmons
http://illusionart.com/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache+mod_ssl + mod_php segfault

2004-09-09 Thread Subhro
Did you use something non standard while compiling? Something like
including excessive optimizations like -O2 or -O3 in CFLAGS in your
Makefile or /etc/make.conf? If not, could I have the core?

Regards
S.


On Thu, 9 Sep 2004 16:02:30 -0700, Vonleigh Simmons
[EMAIL PROTECTED] wrote:
I sent this already but didn't get any replies. I'm a little desperate
 because I need to get this working, so if you can suggest anything at
 all, I'd really appreciate it. I'm running FreeBSD 5.2-RELEASE, apache
 is apache13-modssl, php is the mod_php version. All latest versions
 (cvsup this morning).
 
The problem is that apache segfaults on startup when
 loadmodule/addmodule php are in the config file. Originally I fixed the
 problem by compiling apache without expat. However, after a portupgrade
 it stopped working again.
 
Right now it's working with a major kludge: start up apache with
 loadmodule/addmodule commented out, comment them back in and do an
 apachectl restart. Somehow this lets apache work without segfaulting.
 However, if I do an apachectl graceful/restart, then it segfaults again
 and won't start up.
 
I've tried recompiling apache, recompiling php, getting rid of php
 extensions, etc, all to no avail. There is nothing in the logs, it
 simply fails to start up. Any help or ideas are greatly appreciated.
 
 Vonleigh Simmons
 http://illusionart.com/
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 



-- 
Subhro Sankha Kar
School of Information Technology
Block AQ-13/1 Sector V
ZIP 700091
India
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache+mod_ssl + mod_php segfault

2004-09-09 Thread Vonleigh Simmons
Did you use something non standard while compiling? Something like
including excessive optimizations like -O2 or -O3 in CFLAGS in your
Makefile or /etc/make.conf? If not, could I have the core?
	It's compiled straight from ports. The only directive I have is 
WITHOUT_APACHE_EXPAT, since that solved this problem previously. I'll 
send you the core to your email.

Vonleigh Simmons
http://illusionart.com/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]