Tiny Tiny RSS: Community

I'm running a server on Windows 8.1 and what is this

Also have this issue, tt-rss doesn’t recognize git binary when I put it’s path in user $PATH. It work when I move it to system $PATH.

But then I got another issue (tt-rss event log shows nothing, I don’t know why but it’s always empty), below log from apache error.log:

fatal: ambiguous argument '%h'': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Because I set task daily and sync feeds hourly, the error trash my apache error.log by hundreds of lines and growing.

Other than above errors, everything else in tt-rss (except event log) works perfectly.

which user? why would your http server has anything to do with your user PATH?

looks like git doesn’t accept command line arguments correctly or exec() doesn’t pass correct quotes on your system. since you haven’t posted anything about your setup, i can’t help you further.

it could be your git binary since you’re obviously using something weird instead because you had to “move it to system $PATH” (whatever that means) or something on the php side.

try running this on your server, in shell:

 git log --pretty='%ct %h' -n1 HEAD /full/path/to/tt-rss

elaborate in detail on what you’re running exactly and how.

btw, regardless of the git-related outcome here, this commit should stop tt-rss spamming version-related errors in httpd error.log

it’s going to spam in a more appropriate place instead :face_with_raised_eyebrow:

Apache should never need to run git. Your system seems to be utterly broken…

that’s how we query version in tt-rss now. try to keep up!

Sorry, I don’t put any details before.

I’m on Windows 8.1 and I use amp stack, installed manually, activate ssl, vhosts and php extensions required by tt-rss.

Not http server but git binary. This known problem with running apache a service in windows, you need to put everything in system environment variable. Like custom variables and application binary in $Path. Otherwise apache/php will not be able to recognize it.

Capture
It work.

But if I did, I could not post inane stuff⸮

My apologies. Need more coffee… Although:

I would call that a “broken system”… But I am biased.

001

Yeah, windows. :grinning: But, other than above issues, everything works though.

Can I request feature adding additional config to disable git call completely or something else for silencing that errors? Sorry if this is to much asking for someone who just start using tt-rss on an unsupported os and software stack.

your above example works in command line because it’s some pseudo-unix shell like cygwin. nope, works just fine in powershell.

(e: also apparently you can’t pass directory to git like that so that last argument does nothing)

did the latest changeset not help? my first thought was something like windows or osx so i’ve replaced hardcoded single quotes with escapeshellarg()

anyway, yes, you can. see here.

Pull the latest changeset. Open tt-rss and immediately got this errors:

PHP (I’m on version 7.3.8):

Use of undefined constant VERSION - assumed 'VERSION' (this will throw an Error in a future version of PHP) in D:\wwwroot\tt-rss\include\functions.php on line 156

JS:

Unhandled exception

Stack trace:
SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.backendSanityCallback (https://rss.localhost/js/AppBase.js?1576672496:341:23)
    at https://rss.localhost/js/tt-rss.js?1576672496:94:13
    at onComplete (https://rss.localhost/js/common.js?1576672496:26:32)
    at klass.respondToReadyState (https://rss.localhost/lib/prototype.js?1576672497:1827:62)
    at klass.onStateChange (https://rss.localhost/lib/prototype.js?1576672497:1756:12)

That function in Windows replace percent character with space, thus making fatal error in php,

fatal: invalid --pretty format:  ct  h in D:\wwwroot\tt-rss\include\functions.php on line 1922

resulting unhandled exception in javascript.

As for workaround, I replace functions.php line 1909.

from:

exec('git log --pretty='.escapeshellarg('%ct %h').' -n1 HEAD 2>&1', $output, $rc);

to

exec('git log --pretty="%ct %h" -n1 HEAD 2>&1', $output, $rc);

And thats it. No more error. tt-rss version now displayed properly.

Capture

regardless of the above, no it doesn’t. not normally.

thing is your entire stack is seriously misconfigured somehow to force warnings/errors into raw server output. i’m not sure if this is because of using windows or other equally idiotic decisions you made but you might run into other amazing crashes until you get this sorted out.

i probably should add that nobody sane ever enables this kind of debugging output in production for obvious reasons but i suppose nobody sane would run a server on a literal fucking WINDOWS 8.1 in the first place so this would fall on deaf ears.

on a properly functioning system you can put whatever bullshit into that shell command and it won’t cause a fatal error, only a bunch of warnings in tt-rss event log.

what’s even more interesting is that tt-rss should specifically disable this kind of output because it breaks shit randomly where it shouldn’t while being annoyingly hard to debug.

e: also, i’ve moved this entire shameful discussion into a better fitting place.


It’s pre-production machine before I push everything live. Sorry to hear that. My bad I jump directly into FAQ and installation wiki and it doesn’t mention anything about windows being fully unsupported. Only after this discussions did I re-visit tt-rss website just to find out the requirements at the very bottom of the frontpage.

Thank you for the commit and the time you provided.

This fix did not work on my system. I’m still receiving the same error.

Mac OSCatalina 10.15.2
XAMPP 7.3.7

Also tried the fix suggested in vUNKNOWN (Unsupported). That didn’t work, either.

UPDATE: I rolled my package back to an earlier version and all seems well -

Tiny Tiny RSS v19.8 (2198403)

while being a side-effect of an unrelated change, i think on OS X showing you its unsuported is working as intended. i won’t be able to help you with it, anyway. i’ll add a separate check for Darwin and filter it out.

now if only i could somehow filter out people who try to run servers on arch :wink:

e: related to the above https://git.tt-rss.org/fox/tt-rss/commit/6439f7817d779f43437b79dfb04e5254f7e0bbf4

My setup is NGINX as the webserver and NGINX-Unit as the PHP application server. Unit is logging over and over again that it is unable to determine the version because git is not found. I’m assuming that unit must run PHP within a chrooted environment or something. Not sure how to get around that. If anyone else has similar and has any ideas how to make git usable from that environment let me know :slight_smile:

e: OK it’s a path issue. “git” is not found. But if I edit functions.php to put the full path to git in “/usr/local/bin/git” then it works and the version is displayed/

just make version_static.txt in tt-rss root directory and put something in it, ultimately it doesn’t matter anyway.

alternatively generate this file on build stage using proper git commit id.

Ahh thanks. I’ll just do that. As I mentioned in the edit above, it’s a simple path issue. “git” is not found whereas I can just change it to “/usr/local/bin/git” in functions.php and then it works fine. But to save doing manual editing of the code I’ll just add your suggestion of making a static file. Thanks.

e: OK got it. Unit has an environment option where you can set environment variables. Using this you can change the PATH environment variable that is passed into PHP. Problem solved :slight_smile: