Cache.DefinitionImpl / Cache.SerializerPath ignored
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 361
- Avg merge
- 3d 41m
- Merged PRs (30d)
- 2
Description
I have HTMLPurifier 4.15.0 from PEAR on an ubuntu server 22.04.
I've set
$config->set('Cache.DefinitionImpl', null);
but I'm still seeing this warning:
/usr/share/php/HTMLPurifier/DefinitionCache/Serializer.php(297): Directory /usr/share/php/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777
If I add:
$config->set('Cache.SerializerPath', '/some/dir'); // which is writable by the web server
the exact same warning still appears (still mentioning DefinitionCache/Serializer not my directory).
I can't set the permissions of the default directory because I have no access and I don't need caching anyway because I'm doing inbound filtering.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DefinitionCache/Serializer.php around line 297 and trace how Cache.DefinitionImpl and Cache.SerializerPath are read from the configuration. Reproduce the warning with caching disabled and with a writable serializer path, then verify that the configured behavior is honored without referencing the unwritable default directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100