Yesterday, I suddenly met an issue with session so I could not login to magento backend.
A best practice is to enable magento log to see what happened. The only way I could do is to enable it via database query. This post is to note and to save you guys time when facing the same problem.
INSERT INTO
<code>core_config_data</code> (<code>config_id</code>, <code>scope</code>, <code>scope_id</code>, <code>path</code>, <code>value</code>) VALUES ('', 'default', 0, 'dev/log/active', '1'), ('', 'default', 0, 'dev/log/file', 'system.log'), ('', 'default', 0, 'dev/log/exception_file', 'exception.log');