# Issues runnning php script

**URL:** <https://forums.kodeco.com/t/issues-runnning-php-script/58025>\
**Category:** Push Notifications by Tutorials\
**Created:** [December 19, 2018, 5:26pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025 "2018-12-19T17:26:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmbcosta](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/lmbcosta/32/82188_2.png) [@lmbcosta](https://forums.kodeco.com/u/lmbcosta)\
**Post date:** [December 19, 2018, 5:26pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/1 "2018-12-19T17:26:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gargoyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gargoyle/32/107285_2.png) [@gargoyle](https://forums.kodeco.com/u/gargoyle)\
**Post date:** [December 20, 2018, 3:46pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/2 "2018-12-20T15:46:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![roanacla](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/roanacla/32/110937_2.png) [@roanacla](https://forums.kodeco.com/u/roanacla)\
**Post date:** [January 10, 2019, 1:53pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/3 "2019-01-10T13:53:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gargoyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gargoyle/32/107285_2.png) [@gargoyle](https://forums.kodeco.com/u/gargoyle)\
**Post date:** [January 10, 2019, 3:39pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/4 "2019-01-10T15:39:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon92344950](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@anon92344950](https://forums.kodeco.com/u/anon92344950)\
**Post date:** [May 27, 2019, 12:32pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/5 "2019-05-27T12:32:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gargoyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gargoyle/32/107285_2.png) [@gargoyle](https://forums.kodeco.com/u/gargoyle)\
**Post date:** [May 27, 2019, 3:29pm UTC](https://forums.kodeco.com/t/issues-runnning-php-script/58025/6 "2019-05-27T15:29:25Z")

</div>

@anon92344950 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.
