views:

18

answers:

0

I am using a server with CGI interface and trying to get a script on there to use curl to get data from an api in another directory like so:

website/admin/pages/ -has a curl script that calls

website/api/pages/

This fails. I don't even get a response shown in the curlinfo that should give a header. It just has a 0 for header and not a 404, 500 or anything. On another server not running CGI, and my localhost MAMP it works ok, and I can even use: localhost:8888/admin/pages/ to call the website/api/pages/ API and it works ok. I can also use the website/admin/pages/ to call the other live servers api and it works fine: working-website/api/pages/.

In summary:

server to its own server API - FAIL

server to another servers identical API - OK

other server to failing servers API - OK

SO I think it has something to do with curling itself on a php CGI server. Can anyone help me out figure out what is wrong with this?

Cheers