<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "geonames works for dev system, 'user does not exist' in production"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "geonames works for dev system, 'user does not exist' in production"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>geonames works for dev system, 'user does not exist' in production</title>
				<description><![CDATA[ Hi,
Our online store has been using geonames to validate worldwide postcodes for years, then it stopped working.

I read about the server switch (we were using ws.geonames.org - now:
 -- http://api.geonames.org/postalCodeSearch
I created a username and validated it from the acknowledgement email.

The checker is now working perfectly in the development system but returns an error from our production system.  

The response is:

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;geonames&gt;
&lt;status message="user does not exist." value="10"/&gt;
&lt;/geonames&gt;</pre>
		</div>

Clearly the request is finding the site, but for some reason, when the production system calls in, the username is rejected.  When dev calls in, it is accepted.  It is also accepted when I punch it into the browser.

The url and username are both hardcoded, and the source code has not been changed in the production system - it was copied from dev and is identical.  I have cleared the caches in the server to the best of my ability.

I have done some experiments through the browser.  With no parameters, Geonames returns a different message, so it seems that it is definitely getting the parameters.

Any ideas?

The difference between the two systems is that dev is on Ubuntu Linux in-house and the production system is hosted.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/3088.page#10393</guid>
				<link>http://forum.geonames.org/gforum/posts/list/3088.page#10393</link>
				<pubDate><![CDATA[Mon, 12 Sep 2011 06:57:40]]> GMT</pubDate>
				<author><![CDATA[ atoma.com.au]]></author>
			</item>
			<item>
				<title>Re:geonames works for dev system, 'user does not exist' in production</title>
				<description><![CDATA[ There is probably something wrong with how you make the calls in your production system. Either the username parameter is missing entirely or there are blanks or something that separate the parameter and make it not recognizable for the server.

Best

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/3088.page#10409</guid>
				<link>http://forum.geonames.org/gforum/posts/list/3088.page#10409</link>
				<pubDate><![CDATA[Tue, 13 Sep 2011 06:19:35]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:geonames works for dev system, 'user does not exist' in production</title>
				<description><![CDATA[ Found it.  Quelle Bizarre...

I was building the query string using
$query="postalcode=$postalcode&country=$country&username=$username"
and the result displayed as totally correct.

I changed it to
$query='postalcode='.$postalcode.'&country='.$country.'&username='.$username
and it works.

Some difference in the encoding used by these two versions of the statement?  Who knows. The results in both cases look the same when echoed.
I tried encoding and explicitly converting to unicode - no difference.

Anyhoo, problem averted for now.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/3088.page#10413</guid>
				<link>http://forum.geonames.org/gforum/posts/list/3088.page#10413</link>
				<pubDate><![CDATA[Thu, 15 Sep 2011 06:06:59]]> GMT</pubDate>
				<author><![CDATA[ AtomaAustralia]]></author>
			</item>
	</channel>
</rss>