"XML or text declaration not at start of entity" (first line is empty)

I really love tinytinyrss and use it for many years. Many thanks for the amazing work :slight_smile:

I wanted to use aggregated/public feeds (of labels or categories) to share rss items with friends. But when I copy the link and open it in firefox it says:

XML Parsing Error: XML or text declaration not at start of entity

Someone already had that problem a long time ago, but no answers have been made there: https://tt-rss.org/oldforum/viewtopic.php?f=1&t=878&p=3953&hilit=XML+text+declaration#p3953

I am on the latest master branch. Git commit id: 34a61a0c3c3d660145a11a9fd0aa3b517dc86180 (didn’t change anything in the repo, except entering the configs)
I also use PHP 7.1. and the update_daemon2.php-script.

I am really surprised, that nobody has this problem or nobody mentioned it lately.

If it’s exactly like that post in the old forum, then there’s an extra line in the feed (line 1 is empty and shouldn’t be there). This is probably because one of your PHP files has whitespace after the closing ?> tag. Check your config file first, then custom plugins and remove any spaces, tabs, line breaks, etc. after the closing PHP tag.

If there’s absolutely no HTML, etc. in the PHP file, you can actually just remove that closing tag completely.

also check before the opening <?php tag. i think i’ve removed most (if not all) closing tags from the source already. config.php is the likely candidate, yes.

I already checked the “empty line before/after the php-tag”-thing, but there was nothing there. What helped me, was to copy the config.php-dist and recreate my config file with the old information, but the latest *-dist. Thanks.