Nexmo / nexmo-laravel

Add Vonage functionality such as SMS and voice calling to your Laravel app with this Laravel Service Provider.
MIT License
318 stars 79 forks source link

cURL error 60: SSL certificate problem: unable to get local issuer certificate while NEXMO API integration in Laravel #22

Closed jimkaler closed 6 years ago

jimkaler commented 6 years ago

Hello guys, I am having error while using Nexmo sms api in laravel. i have tried everything what i found on google please help me out.

mheap commented 6 years ago

Hey @JimKaler,

It sounds like an environment issue to me. Does this occur when you're running the code locally, or when deployed to a server somewhere?

jimkaler commented 6 years ago

Hi @mheap I am facing this problem on local server.

mheap commented 6 years ago

Which operating system are you using?

jimkaler commented 6 years ago

Windows 10 Home 64bit

jimkaler commented 6 years ago

error

jimkaler commented 6 years ago

This is My Controller controller

mheap commented 6 years ago

@JimKaler Thanks for the info. It seems as though this may be a known issue with some distributions of PHP for Windows

https://github.com/nexmo/nexmo-php#troubleshooting

jimkaler commented 6 years ago

@mheap i have tried it already but didn't effect :(

mheap commented 6 years ago

@JimKaler What happens if we take the PHP client out of the picture? Can you run these two items on the command line for me? You may need to use bash for Windows

php -r 'file_get_contents("https://api.nexmo.com");';
curl -i https://api.nexmo.com
jimkaler commented 6 years ago

@mheap i have to run these command from which directory? and i am using bash already.

mheap commented 6 years ago

From any directory. They try and access the Nexmo API without using any dependencies.

You will likely need to run via https://docs.microsoft.com/en-us/windows/wsl/about

jimkaler commented 6 years ago

@mheap while running php -r file_get_contents("https://api.nexmo.com") Warning: file_get_contents(https://api.nexmo.com): failed to open stream: HTTP r equest failed! HTTP/1.1 404 Not Found in Command line code on line 1 i am getting error

mheap commented 6 years ago

Are you running your Laravel app via php artisan serve, or a different server?

On 13 Feb 2018, at 12:17, JimKaler notifications@github.com wrote:

@mheap while running php -r file_get_contents("https://api.nexmo.com") Warning: file_get_contents(https://api.nexmo.com): failed to open stream: HTTP r equest failed! HTTP/1.1 404 Not Found in Command line code on line 1 i am getting error

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jimkaler commented 6 years ago

yes via php artisan serve

mheap commented 6 years ago

Could you also try the following?

php -r file_get_contents("https://rest.nexmo.com")