Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

"Received error code 0 from GCM Service" if no "CURLOPT_SSL_VERIFYPEER" to false #5

Closed
timmy78 opened this issue Jan 22, 2015 · 4 comments

Comments

@timmy78
Copy link

timmy78 commented Jan 22, 2015

Hi

I used the library in local.
When I send a message, I receive the error : "Received error code 0 from GCM Service".

But when in the code I put the option CURLOPT_SSL_VERIFYPEER to false in Sender.php it works.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Why ?

Thank you !

@lkorth
Copy link
Owner

lkorth commented Jan 22, 2015

You may have outdated, or incorrect certificates on the box you're running this from. What is the output of curl https://android.googleapis.com/gcm/send on the same box?

@timmy78
Copy link
Author

timmy78 commented Jan 23, 2015

The response is "false" and the status is "0".

How to correct it ?

All the ports are opened.
I used this bundle last time (which use kriswallsmith/buzz lib) and it worked on the box.

Thank you !

@lkorth
Copy link
Owner

lkorth commented Jan 23, 2015

You may want to add the verbose flag to see what is happening. curl -v https://android.googleapis.com/gcm/send. It appears that there is an underlying issue with curl and SSL on your box that you will need to fix in order to use curl in PHP securely.

@lkorth
Copy link
Owner

lkorth commented Mar 19, 2015

Closing old issue.

@lkorth lkorth closed this as completed Mar 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants