# php5 - core dumps - ssl related?



## RSecor (Nov 29, 2012)

Was just doing some of the general software maintenance on one of the server and bam php5 is unhappy.

The following extensions cause php5 to core dump (Segmentation fault: 11 (core dumped)) when any single one of them are enabled:

```
; extension=snmp.so
; extension=curl.so
; extension=ftp.so
; extension=ldap.so
; extension=imap.so
```
# This is with the following:

```
openssl-1.0.1_4     SSL and crypto library
php5-5.4.7          PHP Scripting Language
```
Any ideas out there?


----------



## Beeblebrox (Nov 29, 2012)

Are you enabling those in php.ini? Aren't those for windows servers?


> Windows Extensions
> ; Note that ODBC support is built in, so no dll is needed for it.
> ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
> ; extension folders as well as the separate PECL DLL download (PHP 5).


Look at  what you have enabled in php5-extensions:
`# make config -C /usr/ports/lang/php5-extensions`
If you are installing from the plain-vanilla package and not building your own ports, I really do not know what to tell you. However I am fairly sure that enabling those is not from php.ini

curl, for example is in ftp/php5-curl, while ldap is in net/php5-ldap. The extensions meta-port pulls all those in automatically. Maybe you should check if those packages are in fact installed on your system. You can look up all extensions on http://www.freshports.org


----------



## gkontos (Nov 29, 2012)

RSecor said:
			
		

> Was just doing some of the general software maintenance on one of the server and bam php5 is unhappy.



This is a well known problem. The only way to get around this is to back up your extensions before the upgrade and restore it after. 

The only thing you can do now to fix this is to remove extensions  (backup just incase),recompile php5 and your extensions again.


----------



## RSecor (Nov 29, 2012)

@Beeblebrox :  The php5-extensions port caused me too many problems in the past so I no longer use it.

@gkontos :  Based on your suggestions I ended up completely removing everything php (basically: pkg_delete php5-*) and then reinstalling everything from that list from scratch.  That seems to have fixed the issue.

General note (since I figured this one out about 3 or so years ago):
If you have the "recode" module for php installed it "MUST" be the first module in the extensions.ini list otherwise php "WILL" core dump.  The port probably should forceably add it to the top of the extensions.ini file instead of the end of it.


----------

