We have an issue with php-mime-mail-parser throwing a segmentation fault importing emails on our symfony 3.4 application. Since its an automated process we want to be either notified or skip the importing of the particular email that causes the segmentation fault. Is it possible to try catch the segmentation fault in php? Linux version is CentOS 7.
Asked
Active
Viewed 208 times
0
-
1Best to try and let us know, in theory you should be able to try catch anything, even if the error isn't caused by PHP itself, if the code fails to run it will go to the catch. – Moudi Dec 13 '22 at 14:19
-
6A segmentation fault is a very fatal error and kills the script completely. You won't be able to catch it. – aynber Dec 13 '22 at 14:20
-
1@Moudi already tried and it doesnt work. should have phrased the question differently: is there any method other than try catch! – h1mupstairs Dec 13 '22 at 14:36
-
Thank you for that information, I would invest in configuring Xdebug and try to fix the bug, as the only way to stop it from happening is fixing the bug causing the segmentation fault. – Moudi Dec 13 '22 at 14:51
-
@Moidi yes thats what I feared. Many thanks for your help! – h1mupstairs Dec 13 '22 at 15:58
-
1Maybe this can help: https://stackoverflow.com/a/13269679/6546935 – Ali Dec 13 '22 at 20:52