Server side calls via proxy server
I think it is an issue, please correct me if it is not:
My production server needs to make server side calls using a proxy server.
Uploading the working code in my test server to the production server I have a time out connection error. So I have edited EpiFoursquare.php and I have added:
curl_setopt($ch, CURLOPT_PROXY, 'proxy.theproxy.net:8080');
at the end of:
if($method === 'GET') $url .= is_null($params) ? '' : '?'.http_build_query($params, '', '&'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
Now I have:
Fatal error: Uncaught exception 'EpiFoursquareException' in EpiFoursquare.php:236 Stack trace: #0 EpiFoursquare.php(192): EpiFoursquareException::raise(Object(EpiCurlManager), false) EpiFoursquareJson->__get('access_token') #2 {main} thrown in EpiFoursquare.php on line 236
Thanks
This problem was reported on the twitter version of this library. I haven't had much f a chance to look at it. Do you have the proxy information which I can use to test this? I presume what's in your code are dummy values.
On Wed, Apr 13, 2011 at 9:16 AM, lleoun < [email protected]>wrote:
I think is is an issue, please correct me if it is not:
My production server needs to make server side calls using a proxy server.
Uploading the working code in my test server to the production server I have a time out connection error. So I have edited EpiFoursquare.php and I have added:
curl_setopt($ch, CURLOPT_PROXY, 'proxy.theproxy.net:8080');
at the end of:
if($method === 'GET') $url .= is_null($params) ? '' : '?'.http_build_query($params, '', '&'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
Now I have:
Fatal error: Uncaught exception 'EpiFoursquareException' in EpiFoursquare.php:236 Stack trace: #0 EpiFoursquare.php(192): EpiFoursquareException::raise(Object(EpiCurlManager), false) EpiFoursquareJson->__get('access_token') #2 {main} thrown in EpiFoursquare.php on line 236
Thanks
Reply to this email directly or view it on GitHub: https://github.com/jmathai/foursquare-async/issues/17
Sure, here you go: seldprx06.corpextra.net:8080
Thanks a million in advance!!
Sorry for the delay responding. Will try to have a look at it this week.
That's great, thanks a lot!