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.
Locked
User avatar
rashan
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Mon Jul 23, 2007 1:01 pm
Location: Carnegie Mellon University
Contact:

RSS Feeds through web proxy

Post by rashan » Tue Jul 31, 2007 11:40 am

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.
Thank you in advance
Rashan Anushka
Heinz College
Carnegie Mellon University

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

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

Re: RSS Feeds through web proxy

Post by flengl » Wed Apr 23, 2008 1:41 pm

Hello,

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

I always searching the solution.

Fabrice.

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

Re: RSS Feeds through web proxy

Post by Geoff » Thu Apr 24, 2008 4:26 am

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
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 23, 2008 1:34 pm

Re: RSS Feeds through web proxy

Post by flengl » Thu Apr 24, 2008 2:45 pm

Admin Modul Unpublished Weblinks 4 Joomla 1.5 ?

or

Advanced Tools for 1.5 ?

Thanks.

Fabrice.

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

Re: RSS Feeds through web proxy

Post by jmvallejo » Tue Oct 28, 2008 11:38 pm

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
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 08, 2008 4:05 am

Re: RSS Feeds through web proxy

Post by shkwong » Sat Nov 08, 2008 4:16 am

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:

export http_proxy=http://USERNAME:PASSWORD@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
Last edited by shkwong on Wed Nov 12, 2008 10:45 am, edited 1 time in total.

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

Re: RSS Feeds through web proxy

Post by jmvallejo » Sun Nov 09, 2008 11:33 pm

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.
;D

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

Re: RSS Feeds through web proxy

Post by jmvallejo » Wed Nov 12, 2008 8:27 pm

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
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 08, 2008 4:05 am

Re: RSS Feeds through web proxy

Post by shkwong » Thu Nov 13, 2008 12:01 am

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
Joomla! Apprentice
Posts: 5
Joined: Thu Sep 17, 2009 7:12 pm

Re: RSS Feeds through web proxy

Post by kabsila » Sat Sep 19, 2009 8:25 am


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

Re: RSS Feeds through web proxy

Post by lecaro » Fri Mar 11, 2011 5:36 pm

Please help ... This solution does not help ... I have joomla 1.5.22
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


Locked

Return to “Administration 1.5”