Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: rename #414

Open
edesignagentur opened this issue Apr 16, 2024 · 2 comments
Open

PHP Warning: rename #414

edesignagentur opened this issue Apr 16, 2024 · 2 comments
Labels

Comments

@edesignagentur
Copy link

Hi everyone,

we are getting PHP warnings like this:

Core: Error handler (FE): PHP Warning: rename(/web/typo3_src-12.4.8/public/typo3temp/assets/tx_staticfilecache/https_websitedomain-swiss.com_443_1713096909408_1713096929698_1713096945415_1713096952942_1713096960463_1713096997423_1713097003268_1713097007779_1713097011803_1713097014684_1713097020187_1713097025938_1713097034288_1713097044102_1713097047035_1713097050147/,/web/typo3_src-12.4.8/public/typo3temp/assets/tx_staticfilecache/https_websitedomain-swiss.com_443_1713096909408_1713096929698_1713096945415_1713096952942_1713096960463_1713096997423_1713097003268_1713097007779_1713097011803_1713097014684_1713097020187_1713097025938_1713097034288_1713097044102_1713097047035_1713097050147_1713265324924/): File name too long in /web/typo3_src-12.4.8/vendor/lochmueller/staticfilecache/Classes/Service/RemoveService.php line 71

How can we fix this ?

Environment

  • TYPO3 12.4.13
  • staticfilecache version: 14.0.1
  • Composer mode
  • PHP 8.2
@lochmueller
Copy link
Owner

I refactor the write and delete process of files and directories:
3c0b16a
999000d

Could you check the permissions of the directory, that is not deleted on your machine? The problem is, that the dir is renamed before the directory is removed, to speed up the flush process: https://github.com/lochmueller/staticfilecache/blob/master/Classes/Service/RemoveService.php#L74
If there are not enough permissions and the dir is not dropped, the renaming is execute every flush cache process. This will end in the "folder name is to long" error.

Please check the permissions. If this is the problem, perhaps all "GeneralUtility::writeFile" calles, should added the third parameter (fix permissions)!?!

Regards,
Tim

@edesignagentur
Copy link
Author

Hi Tim,
just checked the permissions, each Folder automatically gets 770, even if the tx_staticfilecache has 777 permissions. I tried differnet combinations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants