55[ ![ SensioLabsInsight] ( https://insight.sensiolabs.com/projects/d60e8eea-aea1-4739-8ce0-a3c3c12c6ccf/mini.png )] ( https://insight.sensiolabs.com/projects/d60e8eea-aea1-4739-8ce0-a3c3c12c6ccf )
66
77## Installation
8+ Use [ composer] ( https://getcomposer.org/ ) to download and install the library and its dependencies.
9+
810` composer require minishlink/web-push `
911
1012## Usage
@@ -14,7 +16,8 @@ As it is standardized, you don't have to worry about what server type it relies
1416
1517Notifications with payloads are supported with this library on Firefox 46+ and Chrome 50+.
1618
17- You'll need at least PHP 5.6, and PHP 7.1 is recommended for much better performance.
19+ You'll need at least PHP 5.6 with the following extensions enabled: gmp, mbstring, curl, openssl.
20+ PHP 7.1 is recommended for much better performance.
1821
1922``` php
2023<?php
@@ -249,14 +252,24 @@ local public and private keys and compute the shared secret.
249252Then, if you have a PHP >= 7.1, WebPush uses ` openssl ` in order to encrypt the payload with the encryption key.
250253Otherwise, if you have PHP < 7.1, it uses [ Spomky-Labs/php-aes-gcm] ( https://github.com/Spomky-Labs/php-aes-gcm ) , which is slower.
251254
252- ### How to solve "SSL certificate problem: unable to get local issuer certificate" ?
255+ ### How to solve "SSL certificate problem: unable to get local issuer certificate"?
253256Your installation lacks some certificates.
254257
2552581 . Download [ cacert.pem] ( http://curl.haxx.se/ca/cacert.pem ) .
2562592 . Edit your ` php.ini ` : after ` [curl] ` , type ` curl.cainfo = /path/to/cacert.pem ` .
257260
258261You can also force using a client without peer verification.
259262
263+ ### How to solve "Bad key encryption key length"?
264+ Disable ` mbstring.func_overload ` in your ` php.ini ` .
265+
266+ ### How to solve "Class 'Minishlink\WebPush\WebPush' not found"
267+ Make sure to require Composer's [ autoloader] ( https://getcomposer.org/doc/01-basic-usage.md#autoloading ) .
268+
269+ ``` php
270+ require __DIR__ . '/path/to/vendor/autoload.php';
271+ ```
272+
260273### I lost my VAPID keys!
261274See [ issue #58 ] ( https://github.com/web-push-libs/web-push-php/issues/58 ) .
262275
0 commit comments