6

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)
9

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.

  • 1
    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. – lcd047 Apr 30 '15 at 7:25
  • It is not a syntax error because it defaults to bytes if you do not specify the suffix. – Lambert Apr 30 '15 at 7:32
  • If it segfaults cause I told it to try in run in a 100kb of memory when it needs 100mb of memory to start up. I am the one who made the mistake. – nelaaro May 18 '15 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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