Closed jimkaler closed 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?
Hi @mheap I am facing this problem on local server.
Which operating system are you using?
Windows 10 Home 64bit
This is My Controller
@JimKaler Thanks for the info. It seems as though this may be a known issue with some distributions of PHP for Windows
@mheap i have tried it already but didn't effect :(
@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
@mheap i have to run these command from which directory? and i am using bash already.
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
@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
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.
yes via php artisan serve
Could you also try the following?
php -r file_get_contents("https://rest.nexmo.com")
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.