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.
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!