smarty-php / smarty-php/smarty
Unable to rename "Access denied"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 709
- PR merge metrics
- No merged PRs in 30d
Description
On Windows with Apache multi thread with PHP 8.0.13 we got error:
2022-01-08 10:19:24.961970 PHP Fatal error: Uncaught ErrorException: rename(.....,....): Access is denied (code: 5) in D:\...\Smarty\libs\sysplugins\smarty_internal_runtime_writefile.php:75 in D:\...\Smarty\libs\sysplugins\smarty_internal_runtime_writefile.php:75
The problem is that two processes are trying to write to the same file at the same time. The file is already locked by one process and the other could not write to the file.
ForceCompile ha no matter on result.
Contributor guide
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 with libs/sysplugins/smarty_internal_runtime_writefile.php at line 75 and review how concurrent processes rename the same compiled file on Windows. Reproduce the Apache multi-threaded PHP 8.0.13 scenario if possible; the issue does not name a test or define the expected handling beyond avoiding the reported Access denied failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100