Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Server side calls via proxy server #17

Open
lleoun opened this Issue Apr 13, 2011 · 4 comments

Comments

Projects
None yet
2 participants

lleoun commented Apr 13, 2011

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

Owner

jmathai commented Apr 13, 2011

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 <
reply@reply.github.com>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:
#17

lleoun commented Apr 14, 2011

Sure, here you go:
seldprx06.corpextra.net:8080

Thanks a million in advance!!

Owner

jmathai commented May 3, 2011

Sorry for the delay responding. Will try to have a look at it this week.

lleoun commented May 4, 2011

That's great, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment