Article on how to set up TTRSS with Bluehost

Howtos, instructions and links to related software. Do not ask questions here.
Aldursil
Bear Rating Master
Bear Rating Master
Posts: 106
Joined: 18 Mar 2013, 03:11

Article on how to set up TTRSS with Bluehost

Postby Aldursil » 18 Mar 2013, 04:11

Using the linked article I was able to get TTRSS working with Bluehost. It requires you to edit the update.php file. Before doing this I had to use the wget method of updating. Now I can use the second option from the update settings recommendation.

http://posted-stuff.blogspot.com/2013/0 ... mment-form

Aldursil
Bear Rating Master
Bear Rating Master
Posts: 106
Joined: 18 Mar 2013, 03:11

Re: Article on how to set up TTRSS with Bluehost

Postby Aldursil » 24 Mar 2013, 01:18

This no longer works with 1.7.5. Might someone know how to take the article and then apply it to 1.7.5 so cron jobs will work again?

Thanks

From the article...

Edit: Changes to update.php..
...
init_connection($link);

// INSERT A HARD-CODED $argv VALUE
$argv = array('-feeds');
$op = $argv;

// CHANGE THIS IF STATEMENT TO BE THIS
if (count($argv) == 0){ // && !(defined('STDIN') || (substr(PHP_SAPI, ...
?> <html>
<head>
<title>Tiny Tiny RSS data update script.</title>
...
}

// CHANGE THE || TO && TO GET THIS TO WORK
if (count($argv) == 1 && in_array("-help", $op) ) {

User avatar
ebell451
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 15 Mar 2013, 15:06
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby ebell451 » 24 Mar 2013, 02:11

Per the information on this post: viewtopic.php?f=1&t=1456, you need to change the cron job

from

Code: Select all

cd /home/disinter/public_html/tinytinyrssx && /usr/php/53/usr/bin/php /home/disinter/public_html/tinytinyrssx/update.php -feeds >/dev/null 2>&1

to

Code: Select all

cd /home/disinter/public_html/tinytinyrssx && /usr/php/53/usr/bin/php /home/disinter/public_html/tinytinyrssx/update.php --feeds >/dev/null 2>&1


basically, add a - in front of -feeds

Aldursil
Bear Rating Master
Bear Rating Master
Posts: 106
Joined: 18 Mar 2013, 03:11

Re: Article on how to set up TTRSS with Bluehost

Postby Aldursil » 24 Mar 2013, 02:41

I have the cron job set to do that. When I try it manually it does not work. The update script needed to be updated to allow command line parameters to work with Bluehost. With the update it does not work anymore even if I use "--feeds". The script I posted in my previous post needs to be modified for 1.7.5 but I do not know what needs to be change.

Myx.Ostankin
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 25 Mar 2013, 12:56
Location: Saint Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby Myx.Ostankin » 25 Mar 2013, 13:20

Aldursil wrote:I have the cron job set to do that. When I try it manually it does not work. The update script needed to be updated to allow command line parameters to work with Bluehost. With the update it does not work anymore even if I use "--feeds". The script I posted in my previous post needs to be modified for 1.7.5 but I do not know what needs to be change.


In 1.7.5 the change appears to be even simpler. I changed the following line:

Code: Select all

$options = getopt("", $longopt);

into this:

Code: Select all

$options = array("feeds" => false);


Yet I have another problem. Not sure yet who is to blame: TTRSS, Bluehost or myself, but I can't load protected livejournal feeds. Entering http://username.livejournal.com/data/atom?auth=digest as a feed url and supplying correct username/password fails with HTTP 401. While entering the same url in a browser directly works fine.

Does anyone else have this issue?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby fox » 25 Mar 2013, 13:28

I tested basic protected feeds recently for an unrelated issue and they worked. Maybe they require digest now or something?

This could also theoretically be affected by curl missing and some esoteric setting in php preventing stuff from working. Do you have CURL?

Myx.Ostankin
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 25 Mar 2013, 12:56
Location: Saint Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby Myx.Ostankin » 25 Mar 2013, 13:44

fox wrote:I tested basic protected feeds recently for an unrelated issue and they worked. Maybe they require digest now or something?

Livejournal have used digest since time immemorial for what I know.

fox wrote:This could also theoretically be affected by curl missing and some esoteric setting in php preventing stuff from working. Do you have CURL?

Bluehost claims to have CURL, but googling this topic indicates that some people had problems with it. Anyway, my gut feeling is that the problem comes from Bluehost. I'll try running TTRSS on a different hosting and see if this helps. Will post here as soon as I get any results.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby fox » 25 Mar 2013, 13:46

I'm not sure if php supports digest, CURL should be able to.

Aldursil
Bear Rating Master
Bear Rating Master
Posts: 106
Joined: 18 Mar 2013, 03:11

Re: Article on how to set up TTRSS with Bluehost

Postby Aldursil » 26 Mar 2013, 05:49

Myx.Ostankin wrote:
Aldursil wrote:I have the cron job set to do that. When I try it manually it does not work. The update script needed to be updated to allow command line parameters to work with Bluehost. With the update it does not work anymore even if I use "--feeds". The script I posted in my previous post needs to be modified for 1.7.5 but I do not know what needs to be change.


In 1.7.5 the change appears to be even simpler. I changed the following line:

Code: Select all

$options = getopt("", $longopt);

into this:

Code: Select all

$options = array("feeds" => false);



Thanks! This worked for me as well.

Myx.Ostankin
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 25 Mar 2013, 12:56
Location: Saint Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby Myx.Ostankin » 27 Mar 2013, 01:38

Myx.Ostankin wrote:
fox wrote:This could also theoretically be affected by curl missing and some esoteric setting in php preventing stuff from working. Do you have CURL?

Bluehost claims to have CURL, but googling this topic indicates that some people had problems with it. Anyway, my gut feeling is that the problem comes from Bluehost. I'll try running TTRSS on a different hosting and see if this helps. Will post here as soon as I get any results.

I tested on my own home linux server and got the same 401 error - which means this is unlikely an issue with Bluehost. I'm running Debian 6, php version 5.3.3, curl version 7.21.0, and I can't see if there's anything else that may be wrong with my configuration.

Shall I report a proper bug with all the logs, screenshots and a test LJ account for illustration? I assume this is meant to work after all, since Livejournal protected feeds are even mentioned in the list of features...

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

Re: Article on how to set up TTRSS with Bluehost

Postby Latimer » 27 Mar 2013, 02:09

Would you be willing to try a different URL? I just subscribed to http://<ljname>.livejournal.com/data/rss?auth=digest, and I could see the protected posts.

PS. Cool trick by the way, I had no idea.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby fox » 27 Mar 2013, 09:02

That was the URL I used when I had a livejournal account.

Myx.Ostankin
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 25 Mar 2013, 12:56
Location: Saint Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby Myx.Ostankin » 27 Mar 2013, 10:59

Looks like I have found where the problem is. I played with different accounts and noticed that sometimes authorization fails, sometimes doesn't. I'm not 100% sure yet, but it looks like it depends not on the URL (both rss and atom are good), but on the password. I happened to have a ":" character in my password and this turned out to be the culprit.

I played a bit more and found that there are other characters that cause the same problem, namely "@", "[", "]" - maybe there are more of them. Strangely, "-" is fine.

Example: user having a password ttrssD1gest authenticates successfully, but after changing the password to ttrss:D1gest the same user gets 401.

Changing password helped, but this still looks like a bug somewhere on TTRSS side, as authentication in a browser works with any password.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby fox » 27 Mar 2013, 11:37

looks like an urlencode missing to me, yeah

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Article on how to set up TTRSS with Bluehost

Postby fox » 27 Mar 2013, 12:22

Okay, so I managed to fix this for CURL which apparently doesn't need urlencoded password. Unfortunately, the native php file_get_contents() doesn't want to download stuff whether the password is urlencoded (like it should be) or not. Not sure how to proceed further.

https://github.com/gothfox/Tiny-Tiny-RS ... 3a94a4e5d8

Edit: used the same password as above with a few more special characters added.


Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest