# Apache (Segmentation fault)



## Demontager (Oct 27, 2013)

I am seeing "Segmentation fault" when starting apache2 in debug. When *I* do 

```
# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
apache22 not running? (check /var/run/httpd.pid).
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
```
and everytime it restarts showing "not running" and indeed not running in netstat or top. Error log has only this:

```
[Sun Oct 27 09:39:56 2013] [info] mod_unique_id: using ip addr 198.100.147.6
[Sun Oct 27 09:39:57 2013] [info] Init: Seeding PRNG with 144 bytes of entropy
[Sun Oct 27 09:39:57 2013] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Sun Oct 27 09:39:57 2013] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Sun Oct 27 09:39:57 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Oct 27 09:39:57 2013] [info] Init: Initializing (virtual) servers for SSL
[Sun Oct 27 09:39:57 2013] [info] mod_ssl/2.2.25 compiled against Server: Apache/2.2.25, Library: OpenSSL/0.9.8y
[Sun Oct 27 09:40:03 2013] [info] mod_unique_id: using ip addr 198.100.XXX.X
[Sun Oct 27 09:40:04 2013] [info] Init: Seeding PRNG with 144 bytes of entropy
[Sun Oct 27 09:40:04 2013] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Sun Oct 27 09:40:04 2013] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Sun Oct 27 09:40:04 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Oct 27 09:40:04 2013] [info] Init: Initializing (virtual) servers for SSL
[Sun Oct 27 09:40:04 2013] [info] mod_ssl/2.2.25 compiled against Server: Apache/2.2.25, Library: OpenSSL/0.9.8y
```

Debug start

```
# httpd -X
Segmentation fault (core dumped)
```
dmesg

```
pid 58551 (httpd), uid 0: exited on signal 11 (core dumped)
```

P.S. Maybe it is related, server on ZFS.


----------



## Demontager (Oct 27, 2013)

Found what causing fault - a PHP module. After commenting

```
#LoadModule php5_module        libexec/apache22/libphp5.so
```
apache2 started.
Also if execute:

```
# php -v
Segmentation fault (core dumped)
```
PHP version installed - php5-5.4.21

Update: tried PHP 5.5, it works with Apache, but doesn't support APC, so need PHP 5.4.


----------



## Demontager (Oct 31, 2013)

I have reinstalled the php5.4 port plus extensions and magically it starts working, mystery..


----------

