Hi,

I am attempting (unsuccessfully) to use the Twitter module though a forward proxy. I don't seem to be getting a valid token from the Twitter API. Is what I'm attempting possible? If so, what could I be doing wrong? Details as follows.

So, I had setup the Twitter module on a client site and it ran for several months without issue. Then without warning, a member of the client's support staff blocked all outgoing requests from that server through their firewall. Currently, said staff member is refusing to rollback those changes (he says it's a security risk and site policy) and insisting that all requests go though their forward proxy.

So, I added parameters like these to settings.php:

	$conf['proxy_server'] = '10.1.1.111';
	$conf['proxy_port'] = 8080;
	$conf['feeds_never_use_curl'] = true;

I believe these settings are correct and the proxy is doing what a forward proxy should do as I managed to get the the RSS feed imports working again.

However, the Twitter module appear unable to even authenticate.

The server is running:
PHP Version 5.4.23
SSL Version OpenSSL/0.9.8y

Drupal Core is recent and I have just updated to the latest dev versions of OAuth and Twitter:
Drupal Core: 7.25+1-dev
OAuth 7.x-3.2+0-dev
Twitter: 7.x-6.0-alpha2+2-dev

I thought it couldn't hurt to uninstall then reinstall the Twitter module. So, I have created a Twitter application and copied the OAuth keys into the Twitter module settings as per these instructions
https://drupal.org/node/1346824

However, the moment I hit "Go to Twitter to add an authenticated account" Drupal throws the following error:

Notice: Undefined offset: 1 in drupal_http_request() (line 989 of D:\inetpub\wwwroot\wc\includes\common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 993 of D:\inetpub\wwwroot\wc\includes\common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 993 of D:\inetpub\wwwroot\wc\includes\common.inc).
Notice: Undefined index: oauth_token in Twitter->get_request_token() (line 58 of D:\inetpub\wwwroot\wc\sites\all\modules\twitter\twitter.lib.php).
Notice: Undefined index: oauth_token_secret in Twitter->get_request_token() (line 58 of D:\inetpub\wwwroot\wc\sites\all\modules\twitter\twitter.lib.php).
Could not obtain a valid token from the Twitter API. Please review the configuration.

Whereas, if I follow the same steps to a site copy installed on my laptop (which doesn't use the forward proxy) I have no problems.

I have installed the Twitter module on about a dozen sites without forward proxy and never had this issue before.

Is it possible to use the Twitter module with a forward proxy? If so, what could I be doing wrong?

Thank you.

Regards

Brett S

Comments

BrettSh’s picture

Issue summary: View changes
BrettSh’s picture

Apologies for cross posting. However, I'm wondering if my issue might be with OAuth

https://drupal.org/node/2218645

DamienMcKenna’s picture

Version: 7.x-6.0-alpha2 » 7.x-6.x-dev
DamienMcKenna’s picture

Priority: Major » Normal

Support requests should always be give a "Normal" priority (https://www.drupal.org/node/45111).