Hi! I am getting trouble running php script.
I am getting several warnings such as:
Warning: A non-numeric value encountered in /Users/miguel/Desktop/sendPushes.php on line 2
line 2: const AUTH_KEY_PATH = ‘/Users/miguel/Desktop/AuthKey_0000000000.p8’;
Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /Users/miguel/Desktop/sendPushes.php on line 41
line 40: $pkey = openssl_pkey_get_private(‘file://’ . AUTH_KEY_PATH);
line 41: openssl_sign(‘$header.$claims’, $signature, $pkey, ‘sha256’);
So I have my .p8 and my sendPushes.php in my desktop.
On your line two you’ve got an apostrophe character instead of the single quote character. See how they’re slightly angled? Please delete both those characters and replace with the ’ character and you should be good to go.