Home>Article>Backend Development> How to solve php script segfault problem

How to solve php script segfault problem

藏色散人
藏色散人 Original
2020-09-30 09:05:10 1853browse

The solution to the php script segmentation error: first check the php code; then execute the command "ulimit -c unlimited"; finally recompile php and add "--debug" when compiling.

How to solve php script segfault problem

Recommended: "PHP Video Tutorial"

A php script has a segmentation fault (Segment fault) My experience

Today I ran a php script on cli on a new server, and a Segment fault error occurred. The first impression was that there was a problem with the installation of an extension.

This php code calls the soap interface. There is no problem with the soap extension. I don’t know the reason for the moment.

I thought that I could use gdb to debug the core file, so I installed gdb and executed the following command: ulimit -c unlimited

Executed again and the core.PID file was generated, using the gdb php path core.PID prompts no debugging information.

I asked Sanjinguo and it turns out that --debug is required when compiling PHP.

So I recompiled php and used gdb. I found that it was a problem with the curl module and solved it.

The above is the detailed content of How to solve php script segfault problem. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn