Closed FelixTraxler closed 4 years ago
Does your environment meet all requirements (like php, lib-curl, lib-openssl)?
Thanks for the fast response!
Just checked and indeed one requirement (HTTP/2) was not met. My bad. My machine does support HTTP/2, but it seems as the Xampp server does not.
I installed the newest version of xampp (7.4.1) on my machine, but HTTP/2 is still disabled. If I use the curl
command in the terminal, HTTP/2 works, but phpinfo() still shows it as disabled.
I have uploaded my script to another server with HTTP/2 enabled and it worked. I don't know why HTTP/2 is disabled in xampp, but it seems like that was the issue. Thanks for your help!
I faced the same issue with xampp running on my Mac. I uploaded the same code on cPanel hosting it working right away.
Trying to get the example script to work. I have changed the
key_id
,team_id
,app_bundle_id
,private_key_path
(to a .p8 file) and thedeviceTokens
. If I run it, I do not get any error messages and the response array is empty.Using the exact same credentials, I can however send push notifications via the PushNotifications App by onmyway133.
Any ideas what I am doing wrong?
var_dump for Notifications array (for a single device id):