Linux

Apache 和 php 不工作 child pid xxx exit signal Segmentation fault (11)

  • November 7, 2018

對我的 php.ini 文件進行更改後,我收到如下所示的錯誤消息。

vim /etc/php.ini

; 腳本可能消耗的最大記憶體量(128MB)

http://www.php.net/manual/en/ini.core.php#ini.memory-limit

memory_limit = 1536

Apache 啟動,但它不會為我的任何虛擬主機提供服務,這是它之前所做的。我在任何地方都沒有看到任何 php 錯誤。我不確定我需要做什麼來解決這個問題。

Thu Apr 30 08:29:06 2015] [notice] 擷取 SIGTERM,正在關閉
[Thu Apr 30 08:29:07 2015] [warn] Init:基於名稱的 SSL 虛擬主機僅適用於支持 TLS 伺服器名稱指示的客戶端(RFC 4366)
[Thu Apr 30 08:29:07 2015] [notice] 摘要:為摘要身份驗證生成密鑰...
[Thu Apr 30 08:29:07 2015] [notice] 摘要:完成
[Thu Apr 30 08:29:07 2015] [warn] Init:基於名稱的 SSL 虛擬主機僅適用於支持 TLS 伺服器名稱指示的客戶端(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 已配置——恢復正常操作
[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)

這是一個簡單的語法問題。

vim /etc/php.ini

; 腳本可能消耗的最大記憶體量(128MB)

http://www.php.net/manual/en/ini.core.php#ini.memory-limit

memory_limit = 1536

問題出在我更改的線路上。

memory_limit = 1536M

如果不指定表示記憶體分配的後綴​​,則預設以字節為單位進行記憶體分配。因此,Apache 嘗試啟動的每個程序最終都會在正確載入之前耗盡記憶體,因此會出現 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

我發布這個答案是因為在恐慌中搜尋了 20 分鐘後試圖找出發生了什麼。我沒有找到一個明確解釋的解決方案來解決這個問題。

引用自:https://unix.stackexchange.com/questions/199561