no idea what’s happening there @saphiro, as file_put_contents creates a file if it does not exist. are there any files in wp-content/cache/autoptimize/ or is this empty (apart from an index.html and .htaccess maybe)? maybe a problem with filesystem rights for the user the webserver is running under?
Hi!
Yes, there are a lot of files (.php, .php.deflate, .php.gzip, .php.none)
And the dashboard cache info says 10 archives 753 Kbytes.
?
And this came up
PHP Warning: file_put_contents(/home/user/public_html/wp-content/cache/autoptimize/autoptimize_0e8930769573a64f15e9025658478ed1.php.none) [function.file-put-contents]: failed to open stream: No such file or directory in /home/user/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 51
-
This reply was modified 9 years, 1 month ago by
saphiro.
OK, this is probably a race condition where 2 requests (page request by a visitor) are both triggering the same autoptimized file being created. as file_put_contents is called with the LOCX_EX flag, the first request gets an exclusive file lock (to write the file) leaving the second one to fail. In that case you can ignore these warnings as the file is being created (confirmed by the fact you have files in cache), albeit by another almost simultaneous process.