I am using a little bit older version of the PHP package of cloud-vision library, 0.19.0, because of some other dependency issues with other packages. This might be the cause of the problem, but I am not sure.
When working on localhost, I make a request and it all goes well, vision API returns the valid responses, but when I deployed to production, every time I try to use it, it just returns an error.
"message": "Request must specify image and features., "code": 3,"status": "INVALID_ARGUMENT","details": []
Is it the old package, or is something else the problem here? I ran out of ideas.
I am using a PHP library, so the code is pretty simple,I use the
file_get_contents($imageUrl)

$imageUrldoesn't point to a valid image. Have you made absolutely certain that the path you're using is correct? Is the URI a local path or a remote URI? In certain PHP configurations,file_get_contents()will not work for remote URIs. Refer to the docs for info on that: php.net/file_get_contents. If you are fetching a remote file, try using curl or another utility to download it. - jdp