You are here:  » Getting the following error

Support Forum



Getting the following error

Submitted by ukresident on Wed, 2007-10-17 14:53 in

Hello,

I'm running the fetch script through ssh (putty) and getting the following message:

[root@vps ~]# /home/sitefolder/www/shoppingscriptfolder/scripts/fetch.sh
--15:38:52-- http://www.site.com/feed.xml%0D
=> `/home/sitefolder/www/shoppingscriptfolder/feeds/feed.xml'
Resolving www.site.com... xx.xxx.xx.xxx
Connecting to www.site.com|xx.xxx.xx.xxx|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
15:38:52 ERROR 404: Not Found.

Its odd becasue the feed is actually there, why is it coming back with a 404?

Many thanks

Anton

Submitted by support on Wed, 2007-10-17 17:31

Hello Anton,

When you are scripting the wget command, it is vital that you use quotation marks around the URL, otherwise it can get mis-interpreted by the shell. This is quite often the cause of the problem when you get a 404 from wget, but the URL works fine when you request it through a browser.

For example:

wget -O merchant.xml "http://www.example.com/feeds/getfeed.asp?merchant=124&aid=456"

It's the ? and & in the URL that make the quotes necessary...

Cheers,
David.

Submitted by ukresident on Thu, 2007-10-18 08:43

Thanks David

I do have quotation marks around the url but don't worry about it, I found the answer in this forum thread (it had to do with adding a space after the closing quotation mark of the URL

http://www.pricetapestry.com/node/198

Thanks again mate!

Submitted by support on Thu, 2007-10-18 10:31

Good stuff - i'd forgotten about the space on the end trick!

Cheers,
David.