-
Notifications
You must be signed in to change notification settings - Fork 71
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
metadata name not present leads to exception #39
Comments
Additionally .. i found this when getting an error like "Could not write new cache file to C:/inetpub/symfony/app/cache/prod/jms_diextra/metadata/.cache.php.". I suspect that with ajax requests one php process is creating a lock on the file while the other is trying to read it. I will comment again as soon as i know more. |
Under, unfortunately unknown, circumstances rename() does not work properly under windows when the target file exists. See also this comment http:https://us2.php.net/manual/en/function.rename.php#60341 When testing and removing the @ in front of rename() the following occured: PHP Warning: rename(C:\inetpub\symfony\app\cache\prod\jms_diextra\metadata\met666B.tmp,C:/inetpub/symfony/app/cache/prod/jms_diextra/metadata/.cache.php): Access is denied. (code: 5) in C:\inetpub\symfony\vendor\jms\metadata\src\Metadata\Cache\FileCache.php on line 98 This is a patch to fix the problem for the windows platform. Like the comment describes the function will no longer be atomic (rename vs unlink+copy). But it seems to be the best solution available. Sometimes it happens, sometimes it doesn't, i'm afraid i can't pinpoint the exact cause without diving into PHP internals and C. The problem was found investigating this issue schmittjoh#39
The problem is that if the metadata is an instance of |
this has been fixed in cc1f2b8 already |
Thanks stof, I have to update. |
I have a situation where an exception is thrown from this point https://github.com/schmittjoh/metadata/blob/master/src/Metadata/Cache/FileCache.php#L48 The file is ".cache.php" which leads me to conclude that the $metadata->name property was not present. In which cases can this happen? And shouldn't the library safe-guard against this ??
The text was updated successfully, but these errors were encountered: