update.php returns HTTP Code: 0

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
peterp
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 04 May 2016, 21:46

update.php returns HTTP Code: 0

Postby peterp » 05 May 2016, 00:38

Hi,

my freshly installed ubuntu 16.04, mysql, php7 results in a strange feed update behavior.

Each time my cronjob runs:

Code: Select all

php /var/www/ttrss/update.php --feeds


all feeds change to red-state; after randomly selecting one feed and pressing fD + "continue" (without selecting anything) the feeds are updated + change to normal-state

Code: Select all

./update.php --debug-feed 1 --force-refetch --force-rehash | tee debug_output.txt

[21:18:07/13221] Lock: update.lock
[21:18:07/13221] start
[21:18:07/13221] local cache will not be used for this feed
[21:18:07/13221] fetching [http://tt-rss.org/forum/rss.php]...
[21:18:07/13221] fetch done.
[21:18:07/13221] unable to fetch: HTTP Code: 0 [0]


Any idea how to solve this? Thanks

JustAMacUser
Bear Rating Overlord
Bear Rating Overlord
Posts: 373
Joined: 20 Aug 2013, 23:13

Re: update.php returns HTTP Code: 0

Postby JustAMacUser » 05 May 2016, 03:17

What happens if you ssh into your server and run:

Code: Select all

curl -IL http://tt-rss.org/forum/rss.php


Is the cron job being run as the same user as the web server?

Also check to make sure you're properly supporting SSL and redirects (are you using open_basedir)?

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

Re: update.php returns HTTP Code: 0

Postby fox » 05 May 2016, 07:45

start with the stickied threads, op

peterp
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 04 May 2016, 21:46

Re: update.php returns HTTP Code: 0

Postby peterp » 05 May 2016, 11:08

@ JustAMacUser

Code: Select all

curl -IL http://tt-rss.org/forum/rss.php
HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Date: Thu, 05 May 2016 07:38:04 GMT
Content-Type: text/html
Content-Length: 184
Connection: keep-alive
Location: https://tt-rss.org/forum/rss.php

HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Date: Thu, 05 May 2016 07:38:04 GMT
Content-Type: text/html
Content-Length: 184
Connection: keep-alive
Location: http://feeds.feedburner.com/tt-rss-forum
Strict-Transport-Security: max-age=31536000; includeSubdomains

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Last-Modified: Thu, 05 May 2016 07:34:33 GMT
Date: Thu, 05 May 2016 07:38:05 GMT
Expires: Thu, 05 May 2016 07:38:05 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked
Accept-Ranges: none
Vary: Accept-Encoding


Some more infos:

Code: Select all

Tiny Tiny RSS v16.3 (638fdf7)
PHP 7.0.4-7ubuntu2 (cli) ( NTS )
mysql  Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using  EditLine wrapper


directory is owned by www-data, cron job also runs as www-data

open_basedir:
/etc/php/7.0/apache2/php.ini

Code: Select all

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; http://php.net/open-basedir
;open_basedir =


Also reinstalled ttrss without success, never had trouble with my feeds before switching to ubuntu 16.04

@fox, i guess i checked all of the stickied threads now without finding a real hint; as this is not the first time you ask sb to start with the stickied threads, could you please be a bit more precise: which thread am i missing? thanks
Last edited by peterp on 06 May 2016, 03:28, edited 1 time in total.

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

Re: update.php returns HTTP Code: 0

Postby fox » 05 May 2016, 11:25

its largely the "post versions of everything including tt-rss" part, which you did in the above post

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

Re: update.php returns HTTP Code: 0

Postby fox » 05 May 2016, 11:44

anyway try disabling curl via config.php, maybe ubuntu just broke it somehow

Code: Select all

define('NO_CURL', 1);

peterp
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 04 May 2016, 21:46

Re: update.php returns HTTP Code: 0

Postby peterp » 05 May 2016, 13:20

seems like you are right.. after disabling it the feeds update as expected

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

Re: update.php returns HTTP Code: 0

Postby fox » 05 May 2016, 13:26

well your first mistake was installing ubuntu tbh

peterp
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 04 May 2016, 21:46

Re: update.php returns HTTP Code: 0

Postby peterp » 05 May 2016, 23:24

well, everyone needs a starting point.. anyway thanks for pointing me into the right direction

turned out that iredmail added /etc/php/7.0/cli/php.ini:

Code: Select all

disable_functions = ...,curl_exec,...


removing that solved my problem

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

Re: update.php returns HTTP Code: 0

Postby fox » 05 May 2016, 23:39

The right way to build your mail server with open source softwares.


k

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: update.php returns HTTP Code: 0

Postby sleeper_service » 06 May 2016, 04:26

not sure 'right' is the proper word... lazy? ignorant? "can't be bothered" sounds better.

wait, is this supposed to be a "secure" mail server written in php???


Return to “Support”

Who is online

Users browsing this forum: No registered users and 9 guests