WordPress.org

Forums

Media Vault
[resolved] PHP Notice and missing file (4 posts)

  1. ikivanov
    Member
    Posted 1 year ago #

    When I protect an image I am getting the following PHP Notice

    Notice: Trying to get property of non-object in .../plugins/media-vault/mv-metaboxes.php on line 124

    Warning: Cannot modify header information - headers already sent by (output started at /.../plugins/media-vault/mv-metaboxes.php:124) in /.../wp-includes/pluggable.php on line 896

    Then the url of the image changes, the file is moved, but the image does not show in the browser. Looks like it is missing, but it is there.
    When I copy/paste the URL in the browser while I am logged in, it does not show the image, but the flowing message as image (not text)
    The image ""Http://...........uloads/_mediavault/2014/02/FILENAME.jpg" can not be displayed because it contains errors.
    So, it sent the headers, but not the image.

    If I copy the same image via ftp and open it locally it opens.

    Therefore, looks like it is not served correctly.

    I hope this input helps you to clear the problem.

    https://wordpress.org/plugins/media-vault/

  2. Max GJ Panas
    Member
    Plugin Author

    Posted 1 year ago #

    I am pushing an update (v. 0.8.11) that should fix the php notice you are getting.

    As for the corrupted file, I have not come across that behavior before on my test setups. Media Vault uses php's readfile() to serve the files. you can check out the file handler script here if you want to see what else it is doing.

    I currently have other responsibilities I must attend to so might be a bit late in responding these next couple of days. Let me know if you have any updates on this.

    Thanks

  3. ikivanov
    Member
    Posted 1 year ago #

    Here is what was causing the problem:
    Notice: ob_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in .../plugins/media-vault/mv-file-handler.php on line 197

    I was able to solve this by adding
    if (ob_get_length())
    ob_clean();

    On line 197

    You may want to push another fix and mark this as solved.

  4. Max GJ Panas
    Member
    Plugin Author

    Posted 1 year ago #

    Hey ikivanov,

    Thank you for figuring it out! I will push the update ASAP.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Media Vault
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic