## RSS Feeds through web proxy

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
rashan
Joomla! Apprentice
Posts: 14
Joined: Mon Jul 23, 2007 1:01 pm
Location: Carnegie Mellon University
Contact:

### RSS Feeds through web proxy

hello all,
i am running the latest Joomla 1.5 RC on Linux box. The server connects to the internet via squid proxy. I cannot get remote rss feeds on joomla, every time it gives the error . "Error: Feed not retrieved". (I have checked the rss URLs and they are OK)

I learnt that joomla uses a php class called simplepie and i also check the forums of that and found an old post saying it does not work behind a proxy. So I thought Joomla 1.5 feeds also not work behind a proxy.

is anyone out there managed to use RSS feeds behind a firewall or proxy out of the box . (In that case my problem should be something else)

If there are any hacks or patches needed, pls help me.
Rashan Anushka
Heinz College
Carnegie Mellon University

Member of the Sinhala (si-LK) Joomla Translation Team

flengl
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 23, 2008 1:34 pm

### Re: RSS Feeds through web proxy

Hello,

I have the same problem.
I can't retrieve rss feeds via proxy.

I always searching the solution.

Fabrice.

Geoff
Joomla! Virtuoso
Posts: 3173
Joined: Sun Apr 16, 2006 12:20 am
Location: 127.0.0.1

### Re: RSS Feeds through web proxy

mod note: moved to 1.5 administration
Backup, backup, backup!
The "Master" .htacess file by Nicholas http://snipt.net/nikosdion/the-master-htaccess

flengl
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 23, 2008 1:34 pm

### Re: RSS Feeds through web proxy

or

Thanks.

Fabrice.

jmvallejo
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 28, 2008 11:33 pm

### Re: RSS Feeds through web proxy

I have exactly the same problem, i did some research and found this:

http://www.ziguras.com/php/using-fsocko ... te-servers

It explains how to use the fsockopen function via a proxy server, you should be able to find the line in this file: \libraries\simplepie\simplepie.php on line 6601. I haven't been able to change it yet since i don't have direct access to the files on this server i'm using but i guess it should work with a bit of modification.

Please tell me how it goes

shkwong
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 08, 2008 4:05 am

### Re: RSS Feeds through web proxy

jmvallejo wrote:I have exactly the same problem, i did some research and found this:

<!-- m --><a class="postlink" href="http://www.ziguras.com/php/using-fsocko ... ing-fsocko ... te-servers</a><!-- m -->

It explains how to use the fsockopen function via a proxy server, you should be able to find the line in this file: \libraries\simplepie\simplepie.php on line 6601. I haven't been able to change it yet since i don't have direct access to the files on this server i'm using but i guess it should work with a bit of modification.

Please tell me how it goes
There is an easy wsy to do this: If you have installed curl package on your machinge, Joomla (well at least in 1.5) will attempt to use that first instead of making the socke call. Curl looks for the environment variable http_proxy. So just set that to whatever your proxy is:

E.g. for unix: (windows- sorry folks make the switch)
export http_proxy=http://proxy.bla:8080

If there is proxy authentication:

Put this line in the startup config file for apache: eg /etc/sysconfig/httpd (lor linux)

Just restart httpd and joomla RSS will work now. Try it.

Steven
Last edited by shkwong on Wed Nov 12, 2008 10:45 am, edited 1 time in total.

jmvallejo
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 28, 2008 11:33 pm

### Re: RSS Feeds through web proxy

shkwong wrote:
jmvallejo wrote:I have exactly the same problem, i did some research and found this:

<!-- m --><a class="postlink" href="http://www.ziguras.com/php/using-fsocko ... ing-fsocko ... te-servers</a><!-- m -->

It explains how to use the fsockopen function via a proxy server, you should be able to find the line in this file: \libraries\simplepie\simplepie.php on line 6601. I haven't been able to change it yet since i don't have direct access to the files on this server i'm using but i guess it should work with a bit of modification.

Please tell me how it goes
There is an easy wsy to do this: If you have installed curl package on your machinge, Joomla (well at least in 1.5) will attempt to use that first instead of making the socke call. Curl looks for the environment variable http_proxy. So just set that to whatever your proxy is:

E.g. for unix: (windows- sorry folks make the switch)
export http_proxy=http://proxy.bla:8080

Put this line in the startup config file for apache: eg /etc/sysconfig/httpd (lor linux)

Just restart httpd and joomla RSS will work now. Try it.

Steven
Thanks a lot Steven i had already done it the "hard way" but it's much better if you don't have to modify any code. Gonna give it a try tomorrow.

jmvallejo
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 28, 2008 11:33 pm

### Re: RSS Feeds through web proxy

How can i know if that curl package is installed? sry i'm a newb in linux ... already exported de variable but no clue what to try next. Thx for the help.

shkwong
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 08, 2008 4:05 am

### Re: RSS Feeds through web proxy

To check if curl is include in your php, just run php-config.

You should see curl as a compiled library or a included extension.

Steven

kabsila
Joomla! Apprentice
Posts: 5
Joined: Thu Sep 17, 2009 7:12 pm

### Re: RSS Feeds through web proxy

lecaro
Joomla! Apprentice
Posts: 10
Joined: Mon Sep 15, 2008 2:28 pm

### Re: RSS Feeds through web proxy

I put the code

Code: Select all

Changed the code around line 6536:
curl_setopt($fp, CURLOPT_PROXY,$ip);
curl_setopt($fp, CURLOPT_PROXYPORT,$port);
curl_setopt($fp, CURLOPT_PROXYUSERPWD,$login . ‘:’ . \$passwd);
where it says and I have this error
D:\xampp\htdocs\site\libraries\simplepie\simplepie.php on line 6538

and in d:\xampp\php\phi.ini
; Be sure to appropriately set the extension_dir directive.
extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll

and restart apache

I'm desperate, thanks