XF 2.2 Server error after upgrade to PHP 8

alternadiv

Well-known member
After moving to PHP 8 and reacting to a post, I got this:


log
ErrorException: [E_USER_WARNING] [WebPush] gmp extension is not loaded but is required for sending push notifications with payload or for VAPID authentication. You can fix this in your php.ini. src/vendor/minishlink/web-push/src/WebPush.php:82
Generated by: Tyler May 25, 2021 at 7:43 AM
Stack trace
#0 [internal function]: XF::handlePhpError(512, '[E_USER_WARNING...', '/home/tjwinterf...', 82)
#1 src/vendor/minishlink/web-push/src/WebPush.php(82): trigger_error('[WebPush] gmp e...', 512)
#2 src/XF/Service/PushNotification.php(262): Minishlink\WebPush\WebPush->__construct(Array, Array, 10, Array)
#3 src/XF/Service/PushNotification.php(128): XF\Service\PushNotification->getWebPushObject()
#4 src/XF/Service/PusherTrait.php(194): XF\Service\PushNotification->sendNotifications()
#5 src/XF/Repository/UserAlert.php(163): XF\Service\Alert\Pusher->push()
#6 src/XF/Repository/UserAlert.php(101): XF\Repository\UserAlert->insertAlert(5704, 1, 'Tyler', 'post', 67504, 'reaction', Array, Array)
#7 src/XF/Reaction/AbstractHandler.php(186): XF\Repository\UserAlert->alertFromUser(Object(SV\UserPromoOnUpdate\XF\Entity\User), Object(SV\UserPromoOnUpdate\XF\Entity\User), 'post', 67504, 'reaction', Array)
#8 src/XF/Repository/Reaction.php(201): XF\Reaction\AbstractHandler->sendReactionAlert(Object(SV\UserPromoOnUpdate\XF\Entity\User), Object(SV\UserPromoOnUpdate\XF\Entity\User), 67504, Object(XFMG\XF\Entity\Post), 1)
#9 src/XF/Repository/Reaction.php(142): XF\Repository\Reaction->insertReaction(1, 'post', 67504, Object(SV\UserPromoOnUpdate\XF\Entity\User), true, false)
#10 src/XF/ControllerPlugin/Reaction.php(65): XF\Repository\Reaction->reactToContent(1, 'post', 67504, Object(SV\UserPromoOnUpdate\XF\Entity\User), true)
#11 src/XF/ControllerPlugin/Reaction.php(19): XF\ControllerPlugin\Reaction->actionToggleReaction(Object(XFMG\XF\Entity\Post), 'posts/reactions', 'posts')
#12 src/XF/ControllerPlugin/Reaction.php(12): XF\ControllerPlugin\Reaction->actionReact(Object(XFMG\XF\Entity\Post), 'posts', 'posts/react', 'posts/reactions')
#13 src/XF/Pub/Controller/Post.php(381): XF\ControllerPlugin\Reaction->actionReactSimple(Object(XFMG\XF\Entity\Post), 'posts')
#14 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Post->actionReact(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'React', Object(XF\Mvc\RouteMatch), Object(SV\AlertImprovements\XF\Pub\Controller\Post), NULL)
#16 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\AlertImprovements\XF\Pub\Controller\Post), NULL)
#17 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#19 src/XF.php(488): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
Request state
array(4) {
["url"] => string(32) "/posts/67504/react?reaction_id=1"
["referrer"] => string(89) "https://tacoma3g.com/threads/rig-of-the-month-may-2021-and-the-winner-is-nickyreno.11998/"
["_GET"] => array(1) {
["reaction_id"] => string(1) "1"
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(69) "/threads/rig-of-the-month-may-2021-and-the-winner-is-nickyreno.11998/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
 
Solution
This error tells you that the GMP extention is not loaded.
Check your ACP if it meets all requirements. You may have to add the missing extentions.
If you are on sharedhosting, you can usually enable this in the control panel. Or else you may have to install it yourself, depending on the system you use.

1621946556026.png
This error tells you that the GMP extention is not loaded.
Check your ACP if it meets all requirements. You may have to add the missing extentions.
If you are on sharedhosting, you can usually enable this in the control panel. Or else you may have to install it yourself, depending on the system you use.

1621946556026.png
 
Solution
Back
Top Bottom