Solution to PHP segmentation fault: first execute the command "ulimit -c unlimited"; then bring "--debug" when compiling PHP; then recompile PHP and view the current call stack. .
Experience of a Segment fault in a php script
Run cli on a new server today A Segment fault error occurred in a php script. The first impression should be that there is a problem with the installation of an extension.
This php code calls the soap interface. I checked that there is no problem with the soap extension. I don’t know the reason at 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.
It turns out that you need to bring --debug when compiling php.
So I recompiled php, then used gdb to check the currently called stack and used the bt command
I found out that it was the problem with the curl module and solved it, over
More related For knowledge, please visit PHP中文网!
The above is the detailed content of What to do if a PHP segmentation fault occurs. For more information, please follow other related articles on the PHP Chinese website!