昨天发现 PHP 挂了。表现就是终端下使用 php -v、或者 php -m 出现 “Segmentation fault”。FPM 的日志中也出现类似提示信息。 使用 gdb 跟踪下来出现以下内容: bash-3.2$ gdb /usr/local/bin/php GNU gdb 6.3.50-20050815 (Apple version gdb-1700.2) (Th
昨天发现 PHP 挂了。表现就是终端下使用 php -v、或者 php -m 出现 “Segmentation fault”。FPM 的日志中也出现类似提示信息。
使用 gdb 跟踪下来出现以下内容:
bash-3.2$ gdb /usr/local/bin/php
GNU gdb 6.3.50-20050815 (Apple version gdb-1700.2) (Thu May 19 20:52:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “x86_64-apple-darwin”…Reading symbols for shared libraries ….
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/blocksort.o” – no debug information available for “blocksort.c”.warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/huffman.o” – no debug information available for “huffman.c”.
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/crctable.o” – no debug information available for “crctable.c”.
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/randtable.o” – no debug information available for “randtable.c”.
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/compress.o” – no debug information available for “compress.c”.
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/decompress.o” – no debug information available for “decompress.c”.
warning: Could not find object file “/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/bzlib.o” – no debug information available for “bzlib.c”.
…… done
(gdb) run -v
Starting program: /usr/local/bin/php -v
Reading symbols for shared libraries +++++++++……………………. done
Reading symbols for shared libraries …………… done
Reading symbols for shared libraries …. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries …… done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. doneProgram received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0×0000000000000000
0x0000000102f5949e in lpmapd ()
GOOGLE 后也没找到什么解决办法。也尝试了重启机器、升级版本等手段。真是令人蛋疼。最后无意中重装了模块,发现竟然是 php5-oracle 导致的。删除掉就正常了。哎,怪上次装好模块后忘记跑一边,就关机了。后来又给忘了。所以不管啥情况,更新后马上测试还是不变的真理。
原文地址:php -v 出现 “Segmentation fault”, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),