When I try to start the feed update daemon, i receive the following error message:
Tiny Tiny RSS was unable to start properly. This usually means a misconfiguration or an incomplete upgrade.
Please fix errors indicated by the following messages:
PHP function mime_content_type() is missing, try enabling fileinfo module.
This only started occurring after the sanity check was updated to include checking for this module. However, I have checked on my site and the fileinfo module is enabled:
As far as I can tell, there are no disabled functions (checked using the code snippet at https://www.nutt.net/list-functions-disabled-in-php/ and got a “No functions disabled” result). If there’s a better way to check, please let me know.
Same issue occurs when I run the site under PHP 5.6.
Side note: The sanity check and your phpinfo() file are run through the web interface, which usually has a separate config from CLI. So while you need to fix this, make sure you fix it for both. Running php -m (I think) from a terminal will tell you what modules are loaded for the CLI instance.
Also, you don’t need all that crazy code to check for disabled functions. It’s listed in phpinfo() as well.
To be honest, I’m not sure why it wouldn’t be there if the module is installed. Do you actually get an undefined function error if you put just mime_content_type(); in its own PHP file and access it?
How is the command line different than the terminal? They’re different words that describe the same thing. Could you clarify how/where these are different?
So PHP says the function doesn’t exist, but when you run it it’s there and does exist? Did you load that test file from a web browser or the terminal?
Cannot load Zend OPcache - it was already loaded
Warning: mime_content_type() expects exactly 1 parameter, 0 given in /path/to/file/ttrss/mimecheck.php on line 2
So what’s happening is that you have multiple versions of php installed with different modules for each. Probably somewhere in some config there’s no clear definition of which version to use so the default is used, which does not have the fileinfo module installed.
Your setup is a bit messed, obviously, and this is further confirmed by the fact that it’s loaded the OpCache module more than once under at least one of the configurations.
At this point I, personally, would just remove/purge all PHP installs and set that part up anew. You, however, will have to decide on your own based on your knowledge of this stuff. Worst case, contact DreamHost support and explain the multiple PHP versions thing, I’m sure they could help. This particular issue is beyond the scope of this forum, but you’re welcome to post the end result so others can benefit from it.
e: Also check the path defined in config.php for PHP_EXECUTABLE.
Did doing that alone make your feed update cron job work? I think it didn’t for me so I also added -d extension=fileinfo.so as a parameter to the cron job (it’s also possible that I was too impatient and didn’t wait long enough for the job to run again).
I’m not using a cron job for my feed updates - I run the daemon in screen in the shell - so I’m not sure if you’re seeing the same problem I was. For me, the complete setup was:
Enable fileinfo via phprc file eit as per the support article linked by @larrypoppins
Specify the exact path to the php executable I wanted to use in config.php