2

I spent much time to figure out why apache2 crashes. My environment is:

  • Debian Testing
  • Apache 2 (rewrite, ssl, etc)
  • PHP 5.3 Zend installed from zend repo

Nothing unsual, but dmesg says:

apache2[xxxx]: segfault at 18 ip xxxx sp xxxx error 4 in libphp5.so[xxxxx]

There is nothing else in logs I found and it is very difficult to find the problem.

1 Answer 1

8

I've started discover problem from php modules, because much segmentation faults relates to php module. After few tests I found that disabling module curl fixes the problem. But in my case curl is required, so I have to continue investigation.

The one important think that php-cli with curl enabled works ok and php -m too.

So definitely it is apache's problem. Hour later I've discovered that with disabled ssl and enabled curl apache works.

There is an conflict in two modules (mod_ssl, php_curl). And ldd mod_ssl.so show that this library depends on libcrypto.so.1.0.0. Actually aptitude shows me that version of openssl is 1.0.0-e. But phpinfo() shows me that it built with --with-openssl=/usr/local/openssl-0.9.8o. There is conflict. There are two modules depends on openssl but built with different versions: 0.9.8o vs 1.0.0-e!

I had to downgrade my version of apache2 and openssl to appropriate version and now it works: ssl and curl both.

Because it was difficult to figure out this problem I've decided to post this tip here. And I hope this little note helps somebody to save some time.

1
  • Made my day! I compared php -i | grep "OpenSSL" with curl -V and there is the conflict. Thanks! Apr 13, 2018 at 15:05

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.