• Resolved Ezjomo

    (@ezjomo)


    Two of my WP sites suddenly started throwing errors this morning… ?? The text of the error is identical in both cases.

    Warning:
    file_put_contents(/home/public/wp-content/autoptimize_404_handler.php):
    failed to open stream: Permission denied in
    /home/public/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on
    line 642
    Warning:
    file_put_contents(/home/public/wp-content/autoptimize_404_handler.php):
    failed to open stream: Permission denied in
    /home/public/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on
    line 642

    My one site wouldn’t even load until I disabled the AO plugin. Is this related to a recent plugin update, or is the problem on my end? I have no choice but to disable the plugin until I figure out what’s going on, and I’m not sure where to start! ??

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Looks like a simple filesystem permission issue, make sure the user under which PHP runs has write access to wp-content.

    Alternatively disabling the “404 fallback” option (main tab, near the bottom) should ‘fix’ this as well.

    hope this helps,
    frank

    Hi there @optimizingmatters

    I have the same issue.

    Our site is hosted on Pantheon https://pantheon.io/ so there is no control over file permissions for the /wp-content for security reasons. The only folder that the web server has write access to is /wp-content/uploads.

    I just came across this
    https://pantheon.io/docs/plugins-known-issues#autoptimize

    and have confirmed that the following is in place in the wp-config.php

    /** Changes location where Autoptimize stores optimized files */
    define(‘AUTOPTIMIZE_CACHE_CHILD_DIR’,’/uploads/autoptimize/’);

    So has anything changed that will prevent this workaround from working?

    Many thanks,

    Finn

    • This reply was modified 4 years, 5 months ago by finnlewis.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, that might indeed be an issue with the 404 fallback option, I’ll look into that. Can you confirm the problem goes away when “Enable 404 fallbacks?” is off?

    Thread Starter Ezjomo

    (@ezjomo)

    Can you confirm the problem goes away when “Enable 404 fallbacks?” is off?

    It worked for me! The site is now usable, and doesn’t seem to be throwing errors any more, after disabling the “404 fallback” option.

    I agree with @finnlewis though, that allowing /wp-content to be writable is a security issue, and I think my host has the same policy, which is why the error cropped up in the first place.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I pushed a small update to the Github version earlier today, can you test by either replacing 2.7.8 with this zip-file OR by applying the small change yourself and re-test?

    Thread Starter Ezjomo

    (@ezjomo)

    I pushed a small update to the Github version earlier today, can you test by either replacing 2.7.8 with this zip-file OR by applying the small change yourself and re-test?

    Everything is working great after installing the beta, even with “404 fallbacks” enabled. Thanks!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, this will be in the next update (no eta though), thanks for testing & confirming!

    Hey Frank,

    Just tested the updated beta as suggested and confirm that the PHP error has gone.

    Thanks for the swift action!

    We’ll use this version until another release.

    Many thanks!

    Finn

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Recent plugin update breaks two of my sites?’ is closed to new replies.