Open kimannou opened 7 years ago
whats on line 19 of get_products.php
there is the GET request :
$products = $shopify('GET /admin/products.json', array('published_status'=>'published'));
curl exception 7 means it could not connect to the host.
The URI seems to be wrong but you may have done that for privacy concerns. What does the URI take you to?
in fact the shop exists : https://cmsplus-dev.myshopify.com as i told you when i execute get_products.php with an url : https://cmsservizi.net/shopify/get_products.php as you will see it works perfectly and shows the list of products... the same file in that url (get_products.php), when i execute it in the command line it gives me the error that i mentionned
can you try to curl to your myshopify url from the command line?
I figured something, i think it's a problem in my remote server. because when i try to execute https://cmsservizi.net/shopify/get_products.php in command line from my localhost it works perfectrly, as well as "curl" command, works in my localhost and not working in my remote server. Do you have any idea what is the configuration that i have to do in the remote server so i can make it work ? thank you in advance
What is hosting your remote server? can you tell what version of php and LAMP etc...
to be honest I would use the ohShopify php library instead of this one. Have you updated the HMAC issue on this library?
Hi ! it appear that the problem is in the server network,
even when i execute :
$ curl google.com
i get the error :
curl: (7) Couldn't connect to server
i contact the hosting company and i'll return to you with also the configuration of the server.
Thanks
Hi ! how can i create a CronJob ? i nfact i changed the get_products.php so it became like this : `session_start();
in fact this is working perfectly when i call it from an url in browser and it show the perfect result, but when i execute this code in a commmand line using :
php get_products.php
it shows this error : ` ~/www/shopify $ php get_products.php phpish\shopify\CurlException: [7] in /home/cmsservixi/www/shopify/get_products.php on line 19Array ( [method] => GET [uri] => https://myshop.myshopify.com/admin/products.json [query] => Array ( [published_status] => published )) Array ( )`