XF 2.1 Problems with PHP 7.3

interforo

Active member
After upgrading my server to PHP 7.3 I have issues when users posts

They get this error and apparently is only on private messages

Code:
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. in src/vendor/minishlink/web-push/src/WebPush.php at line 72

    XF::handlePhpError()
    trigger_error() in src/vendor/minishlink/web-push/src/WebPush.php at line 72
    Minishlink\WebPush\WebPush->__construct() in src/XF/Service/PushNotification.php at line 280
    XF\Service\PushNotification->getWebPushObject() in src/XF/Service/PushNotification.php at line 127
    XF\Service\PushNotification->sendNotifications() in src/XF/Service/PusherTrait.php at line 182
    XF\Service\Conversation\Pusher->push() in src/XF/Service/Conversation/Notifier.php at line 130
    XF\Service\Conversation\Notifier->_sendNotifications() in src/XF/Service/Conversation/Notifier.php at line 65
    XF\Service\Conversation\Notifier->notifyReply() in src/XF/Service/Conversation/Replier.php at line 193
    XF\Service\Conversation\Replier->sendNotifications() in src/XF/Service/Conversation/Replier.php at line 172
    XF\Service\Conversation\Replier->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
    XF\Service\Conversation\Replier->save() in src/XF/Pub/Controller/Conversation.php at line 506
    XF\Pub\Controller\Conversation->actionAddReply() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in index.php at line 20
 
It's not a problem with Xenforo or PHP or them working together, it's that when you move to a new php version you will likely have to (re)add the GMP extension to it if your web host doesn't add it by default. It may be different for other people but for me the way my server works is I got folders for different versions of php and each has its own subfolders of extensions. So if I move from 7.2 to 7.4 the 7.4 process is going to look in its own folders to see what extensions are there and even if I installed GMP earlier when I was using php 7.2, it won't find it until I install and enable it for php 7.4. On some systems you would edit php.ini or php.rc to add the extension and I'm sure there's other ways to do it based on your setup. I hope that explains things better.
 
Back
Top Bottom