Apache and php not working child pid xxx exit signal Segmentation fault (11)

51,687

It was a simple syntax issue.

vim /etc/php.ini

; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
memory_limit = 1536

The problem was with the line I had changed.

memory_limit = 1536M

If you don't specify the suffix indicating the memory allocation, it does memory allocation by default in bytes. So each process that Apache attempts to start ends up running out of memory before it can load properly hence the Seg Fault.

This sets the maximum amount of memory in bytes that a script is allowed to allocate. http://php.net/manual/en/ini.core.php#ini.memory-limit

I am posting this answer because after googling for 20 minutes in panic trying to find out what was happening. I did not find a single clearly explained solution to this problem.

Share:
51,687

Related videos on Youtube

nelaaro
Author by

nelaaro

Updated on September 18, 2022

Comments

  • nelaaro
    nelaaro over 1 year

    After making a change to my php.ini file I got the error messages as shown below.

    vim /etc/php.ini

    ; Maximum amount of memory a script may consume (128MB)
    ; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
    memory_limit = 1536

    Apache starts, but it won't server any of my virtual hosts, which it was doing previously. I am not seeing any php error listed any where. I am not sure what I need to do to fix this.

    Thu Apr 30 08:29:06 2015] [notice] caught SIGTERM, shutting down
    [Thu Apr 30 08:29:07 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Apr 30 08:29:07 2015] [notice] Digest: generating secret for digest authentication ...
    [Thu Apr 30 08:29:07 2015] [notice] Digest: done
    [Thu Apr 30 08:29:07 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Apr 30 08:29:07 2015] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
    [Thu Apr 30 08:29:12 2015] [notice] child pid 35160 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:12 2015] [notice] child pid 35161 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:12 2015] [notice] child pid 35163 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:13 2015] [notice] child pid 35164 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:14 2015] [notice] child pid 35162 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:17 2015] [notice] child pid 35167 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:20 2015] [notice] child pid 35166 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:20 2015] [notice] child pid 35205 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:22 2015] [notice] child pid 35206 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:24 2015] [notice] child pid 35207 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:24 2015] [notice] child pid 35208 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:27 2015] [notice] child pid 35165 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:29 2015] [notice] child pid 35214 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:39 2015] [notice] child pid 35229 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:44 2015] [notice] child pid 35230 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:44 2015] [notice] child pid 35231 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:49 2015] [notice] child pid 35242 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:50 2015] [notice] child pid 35241 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:52 2015] [notice] child pid 35213 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:52 2015] [notice] child pid 35215 exit signal Segmentation fault (11)
    [Thu Apr 30 08:29:52 2015] [notice] child pid 35262 exit signal Segmentation fault (11)
    
  • lcd047
    lcd047 about 9 years
    However, a syntax error in a config file shouldn't trigger a segfault, ever. Especially not in a program exposed to the network. And even more so in php. You found a bug.
  • Lambert
    Lambert about 9 years
    It is not a syntax error because it defaults to bytes if you do not specify the suffix.