<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Receiving HTTP 502 'bad gateway' error"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Receiving HTTP 502 'bad gateway' error"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Receiving HTTP 502 'bad gateway' error</title>
				<description><![CDATA[ Hi,

When I try to access http://ws.geonames.org/search?maxRows=1&q=London&country=GB via my web browser all works fine, but when access it via my PHP code (using fsockopen/fwrite) then I get the following error:

<h1>Bad Gateway!</h1>
<p>
    The proxy server received an invalid
    response from an upstream server.
</p>
<p>
If you think this is a server error, please contact
the <a href="mailto:%5bno%20address%20given%5d">webmaster</a>.
</p>
<h2>Error 502</h2>
<address>
  <a href="/">ws.geonames.org</a><br />
  <span>Mon Aug  3 10:12:44 2009<br />
  Apache/2.2.10 (Linux/SUSE)</span>
</address>

This has been working fine in the past but has recently stopped working and I'm not sure why as no changes have been made to the PHP code for a long time. I found this message in the forums relating to the same error message: http://forum.geonames.org/gforum/posts/list/530.page  but this is from a while ago and the explanation given doesn't explain why I can consistently access via my browser, but not PHP code.

Any help to get this resolved much appreciated,
Cheers,
Alex]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1476.page#6160</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1476.page#6160</link>
				<pubDate><![CDATA[Mon, 3 Aug 2009 10:14:21]]> GMT</pubDate>
				<author><![CDATA[ alexlittle]]></author>
			</item>
			<item>
				<title>Re:Receiving HTTP 502 'bad gateway' error</title>
				<description><![CDATA[ Hi Alex

Did you find a solution to your problem? We have recently moved the free web services to new servers. The only error message I see in the logfiles and have no explanation for is 'CharConversionException: Invalid char in port'. It could be possible that there are some encoding issues in your call.

Best

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1476.page#6177</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1476.page#6177</link>
				<pubDate><![CDATA[Sat, 8 Aug 2009 09:42:41]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Receiving HTTP 502 'bad gateway' error</title>
				<description><![CDATA[ Hi Marc,

Appears to be working again now - but I didn't change anything so perhaps just a glitch following the server changes. 

Cheers,
Alex]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1476.page#6185</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1476.page#6185</link>
				<pubDate><![CDATA[Mon, 10 Aug 2009 10:51:52]]> GMT</pubDate>
				<author><![CDATA[ alexlittle]]></author>
			</item>
	</channel>
</rss>