• Turned on the advanced option for Remove Files From Server. I understand this only works for new content, so I uploaded a new image and it successfully copies the file to the server and then it shows up in the S3 bucket. I see the new \wp-content\uploads\2019\3\file.jpg show up on the local server. The S3 bucket has a slightly different naming scheme \wp-content\uploads\2019\03\13080518\\file.jpg. 30 minutes later the local file still exists on the local server.

Viewing 10 replies - 1 through 10 (of 10 total)
  • See debug error log below. Notice how the slashes are pointing in the opposite direction on the second half of the file path. Perhaps that is why it is failing unless it is permissions related, not sure what permissions to add since WP has permission to write to that same folder.

    Debug log error:
    [DATE] AS3CF: Error removing local file D:\inetpub\wwwroot\WebSiteName/wp-content/uploads/2019/03/file.jpg.

    We performed a test giving Full Control to Everyone on the entire wp-content directory. This is a Windows 2012R2 Server. Error continues to show as above.

    ybenaziz

    (@ybenaziz)

    I have the same problem, the file are not removed from local. when I debug , unlink function failed because the path is still used by another process ( I think the upload to s3 server process) so this is why unlink throw the error “Resource temporarily unavailable”.

    I’m having the exact same issue, file gets copied to DO Spaces but does not remove from local.

    Hi everybody,

    If anyone knows if there is a previous version where we haven’t this bug.

    ybenaziz can you drop your debug log into the new thread that was started for remove users from file above? I am in an isolated environment and cannot share mine. Also a cut and paste from the support tab might be helpful for them. Thanks!

    @ianmjones @rodlathamcaci It’s the same error that you have :

    Debug log error:
    AS3CF: Error removing local file C:\FilePath/file.jpg.

    This is the part of code that throw this error ( classes/amazon-s3-and-cloudfront.php , Function : “remove_local_files”) :

    			if ( ! @unlink( $path ) ) {
    				$message = 'Error removing local file ';
    
    				if ( ! file_exists( $path ) ) {
    					$message = "Error removing local file. Couldn't find the file at ";
    				} else if ( ! is_writable( $path ) ) {
    					$message = 'Error removing local file. Ownership or permissions are mis-configured for ';
    				}
    
    				AS3CF_Error::log( $message . $path );
    			}

    The @ with the unlink function prevent throwing the exact error. when we remove the @ we got this :

    Adding Image directly in Post :

    [2019-03-29 09:09:01] local.ERROR: unlink(C:\laragon\www\backstage\project\htdocs\content/uploads/sites/3/ccc-rr.jpg): Resource temporarily unavailable {"exception":"[object] (ErrorException(code: 0): unlink(C:\\laragon\\www\\backstage\\project\\htdocs\\content/uploads/sites/3/ccc-rr.jpg): Resource temporarily unavailable at C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php:1389)
    [stacktrace]
    #0 [internal function]: Themosis\\Core\\Bootstrap\\ExceptionHandler->handleError(2, 'unlink(C:\\\\larag...', 'C:\\\\laragon\\\\www\\\\...', 1389, Array)
    #1 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1389): unlink('C:\\\\laragon\\\\www\\\\...')
    #2 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1249): Amazon_S3_And_CloudFront->remove_local_files(Array, 303)
    #3 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1040): Amazon_S3_And_CloudFront->upload_attachment(303, Array)
    #4 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\class-wp-hook.php(286): Amazon_S3_And_CloudFront->wp_update_attachment_metadata(Array, 303)
    #5 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #6 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\post.php(5581): apply_filters('wp_update_attac...', Array, 303)
    #7 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-admin\\includes\\media.php(401): wp_update_attachment_metadata(303, Array)
    #8 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-admin\\includes\\ajax-actions.php(2357): media_handle_upload('async-upload', '302', Array)
    #9 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-admin\\async-upload.php(33): wp_ajax_upload_attachment()
    #10 {main}
    "} 
    

    Adding Image in Library :

    [2019-03-29 09:12:47] local.ERROR: unlink(C:\laragon\www\backstage\project\htdocs\content/uploads/sites/3/ccc-rr.jpg): Resource temporarily unavailable {"exception":"[object] (ErrorException(code: 0): unlink(C:\\laragon\\www\\backstage\\project\\htdocs\\content/uploads/sites/3/ccc-rr.jpg): Resource temporarily unavailable at C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php:1389)
    [stacktrace]
    #0 [internal function]: Themosis\\Core\\Bootstrap\\ExceptionHandler->handleError(2, 'unlink(C:\\\\larag...', 'C:\\\\laragon\\\\www\\\\...', 1389, Array)
    #1 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1389): unlink('C:\\\\laragon\\\\www\\\\...')
    #2 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1249): Amazon_S3_And_CloudFront->remove_local_files(Array, 304)
    #3 C:\\laragon\\www\\backstage\\project\\htdocs\\content\\plugins\\amazon-s3-and-cloudfront\\classes\\amazon-s3-and-cloudfront.php(1040): Amazon_S3_And_CloudFront->upload_attachment(304, Array)
    #4 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\class-wp-hook.php(286): Amazon_S3_And_CloudFront->wp_update_attachment_metadata(Array, 304)
    #5 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #6 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-includes\\post.php(5581): apply_filters('wp_update_attac...', Array, 304)
    #7 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-admin\\includes\\media.php(401): wp_update_attachment_metadata(304, Array)
    #8 C:\\laragon\\www\\backstage\\project\\htdocs\\cms\\wp-admin\\async-upload.php(91): media_handle_upload('async-upload', 0)
    #9 {main}
    "} 
    
    • This reply was modified 2 months, 3 weeks ago by  ybenaziz.
    • This reply was modified 2 months, 3 weeks ago by  ybenaziz.
    Plugin Contributor ianmjones

    (@ianmjones)

    Hi,

    Please confirm you’re using either Apache or Nginx and not IIS?

    https://deliciousbrains.com/wp-offload-media/pricing/#requirements

    @ianmjones

    Hi,

    Yes, I use Apache 2.4.35, and all other requirements are honored.

    Thank you

    ybenaziz

    (@ybenaziz)

    Hi Everybody,

    Any news about the issue ?

    Thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.