Issues runnning php script

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.

Just try to review the path and seems ok, I think

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.

Hi, I have the same warning: openssl_sign(): supplied key param cannot be coerced into a private key in /Users/…/serverPushes.php

Any ideas on how to solve this problem?

Did you see my reply to the original post about the wrong apostrophe character being used? If that’s not the case for you please show your code.

The reason this is occurring is that’s the way it is in the book. You might want to fix that.

@tomtom that’s the way books print things. I’ll have to ask our editor if they can somehow prevent that from happening for the fall release.