GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Receiving HTTP 502 'bad gateway' error  XML
Forum Index -> General
Author Message
alexlittle



Joined: 03/08/2009 09:52:55
Messages: 2
Offline

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
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

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

[WWW]
alexlittle



Joined: 03/08/2009 09:52:55
Messages: 2
Offline

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
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team