[Pro] Data feed

Is it possible to introduce a affiliate shops data feed into a Freeway website?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What format are they sending this data in? If it’s RSS, my ReadFeed Action might be what you need. Have a look on ActionsForge. It’s quite a geek-friendly interface, since you have to edit a text template to change the formatting, but this gives it enormous flexibility – everything from scraping headlines off of Yahoo News to posting your Twitter feed to whatever else you can find in a valid Atom XML format.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve been using the ReadFeed action and love the flexibility it allows, however I’m having some problems with what I thinks permissions related…

Example LINK:
http://www.roarimage.com/uploads/sadler/test/index.php

Twitter feeds OCCASIONAL error message:
Warning:fopen(http://twitter.com/statuses/user_timeline/36084933.rss) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /web2/user22172/website/uploads/sadler/test/Resources/Feed.php on line 31 could not open XML input

I can’t seem to fix the ‘_cache’ permissions to 755 for any significant length of time, is this the reason I’m getting the error message? I have a hard time understanding this though as the Blog feed next to it works fine all the time!

thanks in advance.
Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

…its now back up and running and receiving the Twitter Feed? I haven’t done a thing!!!

Can anyone help me to understand this. Is it possible that the Twitter accounts to blame?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

…and now its broken again!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This could be Twitter having a senior moment or something. 400 doesn’t
mean you got the address wrong or anything specific. There are global
server-level settings which govern the use of “stream wrappers” like
this Action uses within PHP. Your host could be monkeying with those
and you’d never know.

As to the permissions – what method are you using to set these, and
are you sure they are sticking? If you’re using Transmit, try this:
Click once on the folder, Get Info, set the permissions to 775. Then
click on the parent folder (your htdocs or public_html or whatever
your host chooses to call it) and press the Refresh button. Then click
on the _cache folder again and do Get Info again. See if the settings
“took”. If it reverted right back, then you may want to ask your
hosting provider to set these permissions for you and make them
“sticky”.

Also, after you set the permissions on the folder, reach into the
_cache folder and delete the existing cache file (if any).

Finally, if this doesn’t manage to fix it, then do try setting the
_cache folder to 777 and see if it does work then. If it does, then
you will need to ask your hosting provider to set the _cache folder to
be “owned” by the Web server’s user, so that it can read and write
into that folder, and remove all other privileges (set it to 700).

Walter

On Dec 7, 2010, at 4:32 AM, Scott Crundwell wrote:

I’ve been using the ReadFeed action and love the flexibility it
allows, however I’m having some problems with what I thinks
permissions related…

Example LINK:
http://www.roarimage.com/uploads/sadler/test/index.php

Twitter feeds OCCASIONAL error message:
Warning:fopen(http://twitter.com/statuses/user_timeline/
36084933.rss) [function.fopen]: failed to open stream: HTTP request
failed! HTTP/1.1 400 Bad Request in /web2/user22172/website/uploads/
sadler/test/Resources/Feed.php on line 31 could not open XML input

I can’t seem to fix the ‘_cache’ permissions to 755 for any
significant length of time, is this the reason I’m getting the error
message? I have a hard time understanding this though as the Blog
feed next to it works fine all the time!

thanks in advance.
Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This sort of transience, barring any sort of auto-reset of permissions
on your server, looks a lot like Twitter acting up rather than the
Action. You could test this assertion by choosing a different feed –
something from Yahoo is usually reliably public-readable – and
substituting that for a while. Do it on a demo page you don’t link to
any other pages in your site, and you can check it out over time to
see if the basic server stuff provided by the Action is working
correctly for you on your server.

Walter

On Dec 7, 2010, at 7:10 AM, Scott Crundwell wrote:

…and now its broken again!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Waltd, I’ve tried both 775 and 777. It stays for a while but eventually reverts back to 750. I’ll speak to the provider and see if they can assist.

I’ve also been testing the action with another Twitter account and it’s always seemed to work, maybe I’ll drop Twitter a line too!

Cheers for the response.
Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

UPDATE: Although the Feeds not working on my original test I’ve been running the same test on a different server without issue. It would appear the server permissions are at fault…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This may be a security script, trolling through the server looking for
“world-writable” folders and restoring them, since this is a common
attack vector in shared servers. You may need to tell them explicitly
to ignore this particular folder, or to set its “sticky
bit” (seriously, that’s the technical term) to make sure it stays put.

Walter

On Dec 7, 2010, at 11:15 AM, Scott Crundwell wrote:

UPDATE: Although the Feeds not working on my original test I’ve been
running the same test on a different server without issue. It would
appear the server permissions are at fault…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ok, the original test link’s now working again despite the cache folder still ‘sticking’ to the 750 permission code. Does this not imply that the cache folders permissions are indeed not to blame?

Just want to get all my facts straight before calling the provider.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Many shared servers use a sort of “sandbox” for each user, and let
Apache run as that user from within the shared environment. What this
means is that if your FTP login user is able to save to a folder, then
Apache can as well. So this could mean that your server is perfectly
happy with 750 permissions, and that the issue is in fact with the
source of the feed.

Could you try the following? Delete the cache file. If the server lets
you do this, that’s significant. If the page works on the very next
page load and the cache file reappears and re-populates itself with
the very next page load, then that’s also significant.

Walter

On Dec 7, 2010, at 11:49 AM, Scott Crundwell wrote:

Ok, the original test link’s now working again despite the cache
folder still ‘sticking’ to the 750 permission code. Does this not
imply that the cache folders permissions are indeed not to blame?

Just want to get all my facts straight before calling the provider.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

  1. I was able to delete the _cache file.
  2. Page reloaded but still no cigar. As a result…
  3. No _cache file was recreated, the _cache folder’s currently empty.

Does this help?

Could you try the following? Delete the cache file. If the server lets
you do this, that’s significant. If the page works on the very next
page load and the cache file reappears and re-populates itself with
the very next page load, then that’s also significant.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes. It means you really do have to get your host to set this folder
to be something the Web server is allowed to write to. I would put the
problem to them in those terms. (Don’t try to be over-technical, just
say that you have a PHP script which needs to be allowed to write
files into that folder. They will (or should) know enough to set these
to the bare minimum necessary for the process to work without opening
any unnecessary holes in their security model.

Walter

On Dec 7, 2010, at 12:22 PM, Scott Crundwell wrote:

  1. I was able to delete the _cache file.
  2. Page reloaded but still no cigar. As a result…
  3. No _cache file was recreated, the _cache folder’s currently empty.

Does this help?

Could you try the following? Delete the cache file. If the server
lets
you do this, that’s significant. If the page works on the very next
page load and the cache file reappears and re-populates itself with
the very next page load, then that’s also significant.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Waltd, I’ll put it to em’!!!
Will let you know tomorrow how I get on!!!

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Waltd,

After sending a request to my provider for fixing the permissions to 775 on the _cache folder, I received the following reply…

“We are unable to have the permission level set to 775 on our Linux hosting platform. We can get the URL for the feed unblocked for you but we will need the correct URL.”

Will this ‘unblocking the URL Feed’ help the situation? (incidentally the links working again this morning)

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As far as I can tell, that’s not the issue. If the cache file isn’t
being made, then the issue is elsewhere and permission based. This
reply is a bit deceptive sounding, though. Unable means ‘can’t’, when
I suspect they really mean ‘don’t want to’ or ‘won’t’. It’s trivially
easy to do, and they shouldn’t even waste the pixels replying except
to mark your ticket ‘done’. If I were you, I would shop for a
different host.

As to them ‘blocking’ this URL, are they seriously doing that at all?
You can test to see if that’s the case by making a test script in a
text editor. Put the following in it:

<?php
print file_get_contents('http://url.of/your/rss/feed');
?>

Obviously, change that fake URL for something real, then save the file
as test.php in your web directory and browse to the address http://your.site/test.php
in a browser. You might see something in your browser window, but
even if you don’t see anything but a blank screen, using View Source
should show all the XML goodness of the original feed.

Walter

On Dec 8, 2010, at 5:24 AM, Scott Crundwell wrote:

Hi Waltd,

After sending a request to my provider for fixing the permissions to
775 on the _cache folder, I received the following reply…

“We are unable to have the permission level set to 775 on our Linux
hosting platform. We can get the URL for the feed unblocked for you
but we will need the correct URL.”

Will this ‘unblocking the URL Feed’ help the situation?
(incidentally the links working again this morning)

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Waltd,

uploaded the ‘test.php’ file but when viewing the page there’s an error. View Source shows the same information…

LINK here…
http://www.roarimage.com/uploads/sadler/test.php

Scott

Obviously, change that fake URL for something real, then save the file
as test.php in your web directory and browse to the address http://your.site/test.php
in a browser. You might see something in your browser window, but
even if you don’t see anything but a blank screen, using View Source
should show all the XML goodness of the original feed.

Walter

On Dec 8, 2010, at 5:24 AM, Scott Crundwell wrote:

Hi Waltd,

After sending a request to my provider for fixing the permissions to
775 on the _cache folder, I received the following reply…

“We are unable to have the permission level set to 775 on our Linux
hosting platform. We can get the URL for the feed unblocked for you
but we will need the correct URL.”

Will this ‘unblocking the URL Feed’ help the situation?
(incidentally the links working again this morning)

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can you post the exact script at Pastie.org so I can see how you wrote
the URL? There shouldn’t be any backslashes in there – if the Web
formatter at FreewayTalk added some, that’s my fault but they
shouldn’t be there. The entire script is the word print, followed by
the command file_get_contents followed by a set of parentheses, within
which is the complete URL of the feed enclosed in single-quotes.

You do need to use a programmer’s text editor for this – nothing that
creates styled text of any sort. Free or cheap and very high quality
editors abound for the Mac, my recommendation is TextWrangler from http://barebones.com

Walter

On Dec 8, 2010, at 8:20 AM, Scott Crundwell wrote:

Hi Waltd,

uploaded the ‘test.php’ file but when viewing the page there’s an
error. View Source shows the same information…

LINK here…
http://www.roarimage.com/uploads/sadler/test.php

Scott

Obviously, change that fake URL for something real, then save the
file
as test.php in your web directory and browse to the address http://your.site/test.php
in a browser. You might see something in your browser window, but
even if you don’t see anything but a blank screen, using View Source
should show all the XML goodness of the original feed.

Walter

On Dec 8, 2010, at 5:24 AM, Scott Crundwell wrote:

Hi Waltd,

After sending a request to my provider for fixing the permissions to
775 on the _cache folder, I received the following reply…

“We are unable to have the permission level set to 775 on our Linux
hosting platform. We can get the URL for the feed unblocked for you
but we will need the correct URL.”

Will this ‘unblocking the URL Feed’ help the situation?
(incidentally the links working again this morning)

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m also mystified why your errors refer to line 8 and 9 – there
should be only three lines to this script, and two of them are the
opening and closing delimiters that frame all PHP scripts. You could
seriously do it in one line if you wanted to.

Walter

On Dec 8, 2010, at 8:29 AM, Walter Lee Davis wrote:

Can you post the exact script at Pastie.org so I can see how you
wrote the URL? There shouldn’t be any backslashes in there – if
the Web formatter at FreewayTalk added some, that’s my fault but
they shouldn’t be there. The entire script is the word print,
followed by the command file_get_contents followed by a set of
parentheses, within which is the complete URL of the feed enclosed
in single-quotes.

You do need to use a programmer’s text editor for this – nothing
that creates styled text of any sort. Free or cheap and very high
quality editors abound for the Mac, my recommendation is
TextWrangler from http://barebones.com

Walter

On Dec 8, 2010, at 8:20 AM, Scott Crundwell wrote:

Hi Waltd,

uploaded the ‘test.php’ file but when viewing the page there’s an
error. View Source shows the same information…

LINK here…
http://www.roarimage.com/uploads/sadler/test.php

Scott

Obviously, change that fake URL for something real, then save the
file
as test.php in your web directory and browse to the address http://your.site/test.php
in a browser. You might see something in your browser window, but
even if you don’t see anything but a blank screen, using View Source
should show all the XML goodness of the original feed.

Walter

On Dec 8, 2010, at 5:24 AM, Scott Crundwell wrote:

Hi Waltd,

After sending a request to my provider for fixing the permissions
to
775 on the _cache folder, I received the following reply…

“We are unable to have the permission level set to 775 on our Linux
hosting platform. We can get the URL for the feed unblocked for you
but we will need the correct URL.”

Will this ‘unblocking the URL Feed’ help the situation?
(incidentally the links working again this morning)

Scott


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options