grav-plugin-seo icon indicating copy to clipboard operation
grav-plugin-seo copied to clipboard

Enabling SEO plugin causes page creation to crash php-fpm process

Open DissCent opened this issue 6 years ago • 1 comments

I recently installed the plugin on multiple, similar Grav installations. While it is running fine on Debian 9 (PHP 7.x), there seems to be a type name issue on Debian 8 (PHP 5.6.33).

Every time I try to create a new page (it doesn't matter which kind), I get an nginx error "502 bad gateway". I tracked it down to php5-fpm crashing with a segmentation fault.

Using GDB I could analyze the crash further:

Core was generated by `php-fpm: pool www                                                       '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  zend_lookup_class_ex (name=name@entry=0x7fc5392ded38 "Symfony\\Component\\EventDispatcher\\Event", name_length=name_length@entry=39, key=key@entry=0x0, 
    use_autoload=use_autoload@entry=0, ce=ce@entry=0x7ffc8a2ab160) at /build/php5-m8fq6G/php5-5.6.33+dfsg/Zend/zend_execute_API.c:931
931     /build/php5-m8fq6G/php5-5.6.33+dfsg/Zend/zend_execute_API.c: No such file or directory

I then tried modifying the SEO plugin code to find out where it is crashing exactly and it seems to be this line:

$blueprint->extend($extends, true);

in function "onBlueprintCreated". For me, it seems like PHP is mixing up class names. The Event class used in the plugin is Grav\Plugin\RocketTheme\Toolbox\Event\Event but it seems that PHP is looking for Symfony\Component\EventDispatcher\Event instead, which can't be found.

However, I didn't find a way to fix or workaround this. Can anybody please confirm the error and/or maybe post a fix for it? :) Thanks in advance!

DissCent avatar Mar 23 '18 12:03 DissCent

Very weird, first time I see this one. Will investigate, thanks!

paulmassen avatar Mar 23 '18 16:03 paulmassen