Tiny Tiny RSS: Community

PHP 7.3 - Use of undefined constant GLOB_BRACE



For starters, thanks for great work and awesome pice of software, I use it daily for quite long time (after closing of Google Reader)! :slight_smile:
I can’t imagine my day without starting it with Android app and reading few articles.

Recently I found some minor warning about one of the plugins:

E_WARNING (2)	plugins/cache_starred_images/init.php:87	glob() expects parameter 2 to be int, string given1. plugins/cache_starred_images/init.php(87): glob(cache/starred-images//*.{png,mp4,status}, GLOB_BRACE)
2. classes/pluginhost.php(125): hook_house_keeping()
3. classes/rssutils.php(1504): run_hooks(24, hook_house_keeping, )
4. update.php(208): housekeeping_common(1)

This happens after I migrated from shared hosting PHP 7.0 to VPS with dockerized PHP 7.3.3.
Version of TTRSS is commit from 1 April 1a484ec3f58ff5e7a5745f231b68cb64ba65929d, I use MySQL.

All of the features works ok, I didn’t found any issues.
Just this warning keeps coming in the journal of admin panel.

Would be great if this can be corrected, thanks :wink:


interesting. php docs for glob state that

Note : The GLOB_BRACE flag is not available on some non GNU systems, like Solaris.

otherwise i see no mention of this constant being deprecated or removed. what kind of OS are you running on your vps? docker is linux only, i think, so it’s kinda strange.


Generally speaking, in case of Docker, VM OS doesn’t matter. However Docker image OS matter.
I’m using official PHP Docker image php:7-fpm-alpine https://hub.docker.com/_/php

non GNU systems

This gave me some thinking, I changed it to debian-based php:7-fpm and so far I don’t see any warning in admin panel yet. Guess I’ll be next one in gas chamber category for wasting your time ¯\_(ツ)_/¯

BTW I can contribute with ready to use docker-compose.yml for easy dockerized deployment of TTRSS.
Just give me a sign if this would be welcomed in repo.


yeah but can you even run non-linux in docker. it’s not a VM.

ah, alpine. musl probably doesn’t support this for glob() so it’s not enabled in php.

i’ll take a look tomorrow if brace matching is actually used in there. if it is, i’m not sure if its a good idea to rewrite the code because of musl limitations.


yeah it actually does use brace syntax. if someone really wants to use musl/alpine/whatever and cache_starred together i’ll promise to review a clean PR, otherwise this stays as is.


Thanks for your time by checking it.
I’ll stick to debian based image of PHP.
Outcome is basically the same besides quirks for alpine like in this case.
Saving few MBs is not worth it.


I see you got it solved, but just for anyone else who gets here that error is because alpine doesn’t use gnu libc. The libc they use (I forget which one) doesn’t have all the necessary regex functions, so php loses out on a couple of necessary plugins.