PHP CURL works fine from localhost not from server

Posted by Joby Joseph on Stack Overflow See other posts from Stack Overflow or by Joby Joseph
Published on 2012-06-12T03:42:00Z Indexed on 2012/06/12 4:40 UTC
Read the original article Hit count: 147

Filed under:
|

I have 2 servers, srv1 and srv2. All client sites are stored in srv2 and all authentication details are stored in srv1. Each time a client site is loaded, the site in srv2 sends a curl request to srv1 to validate. I am always getting bool(false) when I print the curl response using var_dump. But if I am requesting for validation from my local wamp installation(localhost) it is perfectly returning the response.

According to my understanding srv2 is blocking srv1 ip or something like that. Any help or suggestions will be greatly appreciated.

The solution is really urgent as all my clients are stuck with invalid authorization message.

Edit:

Now when i tested curl in srv2 is working fine i think. Because I am able to fetch other websites without any trouble. But I am not able to fetch data from srv1. I can view a page from srv1 through browser url but not through curl.

© Stack Overflow or respective owner

Related posts about php

Related posts about curl