OmekaS - File logging not writable, even with 777

Hello,

I am currently deploying an OmekaS site on my server.

I am encountering an error with file logging; i have found out that /var/www/omekas/log/application.log never gets incremented with new errors

I have checked in /var/log/apache2/error.log and i get this :


[php7:notice] [pid 19545] [client 172.21.2.45:1180] [Omeka S] File logging disabled: not writeable.

Which is strange, as i have even tried to chmod 777 the file and restart the apache server, in case.

Error logging is enabled, the htaccess is set to developement,

What am i missing ?

Thanks

Do you have SELinux active on this server? It could prevent a write even to a 777-mode file.

I just ran sestatus, and i got “disabled”.

when i check ls -la www-datais the owner, and my folder is in the same group as well

Okay i have something new.

Some pages throw me this error :

 Laminas\Db\Adapter\Exception\InvalidQueryException
Statement could not be executed (42000 - 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"log" ("created","severity","message","owner_id","context") VALUES ('2022-03-...' at line 1)

DĂ©tails :

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"log" ("created","severity","message","owner_id","context") VALUES ('2022-03-...' at line 1 in /var/www/Limunata_litteraria/vendor/laminas/laminas-db/src/Adapter/Driver/Pdo/Statement.php:238
Stack trace:

And i think it’s relevant to precise that the log table in mariadb is completely empty, even though i have used this omekaS instance for a few days already, and that the rest of it works fine.

any clue ?

Thanks

EDIT:

I updated omekaS to the latest version, and i am using Mariadb (to the latest version, as of writing)

This error looks like it would be related to the Log module, a community-written module that logs to the database rather than to a file. Are you using that module? You might have to check with its developer if so.

As for the built-in file logging of Omeka S, it is probably still down to permissions in one way or another. The same permissions that make the “files” folder writable should work for the “logs” folder.

1 Like

oh my god you are right. I disabled the log modules and omeka’s native logging system works fine. Thank you!

For future reference : i managed to get log to work by manually adding the config file so that it could connect to the db by itself

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.