Score:0

OmekaS, php, can't write their error log file, seemingly with correct permissions

ph flag

I am currently installing and configuring an instance of OmekaS, a CMS for libraries (in short).

I am encountering an error when trying to write to log files.

They should be in /var/www/CMS/log/application.log; but this file stays empty no matter what.

When checking /var/log/apache2/error/log, i get this :

 [php7:notice] [pid 1447] [client 172.18.1.181:2898] [Omeka S] File logging disabled: not writeable., referer: https://193.48.29.1/admin/log

However, this is surprising, as when i do ls -la in this folder i get

drwxrwxr-x  2 www-data      www-data        4096 Mar 29 02:33 log

for the folder and

-rwxrwxrwx  1 www-data www-data   33 Mar 29 02:33 application.log

for the file. I have even tried setting it to 777.

I read the documentation and set the config files written : https://omeka.org/s/docs/user-manual/errorLogging/

And this is the bit of code from the CMS returning the error :

            if (!is_file($writers['stream']['options']['stream'])
            || !is_writeable($writers['stream']['options']['stream'])
        ) {
            error_log('[Omeka S] File logging disabled: not writeable.'); // @translate
            unset($writers['stream']);
            if (empty($writers)) {
                return (new Logger)->addWriter(new Noop);
            }
        }

I have tried creating a dummy php file that only create a file, and it works.

I have no idea what's wrong

Thanks

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.