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.
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.
Yeah, windows. 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.
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)
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.
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
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
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/
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