git-updater: E_WARNING: file_get_contents(.../tmp-readme.txt), No such file or directory
New Relic reports the E_WARNING below. I also have the issue in #703, maybe they are related?
Stack trace
E_WARNING: file_get_contents(/opt/wordpress/wp-content/tmp-readme.txt): failed to open stream: No such file or directory
in file_get_contents called at /opt/wordpress/wp-content/plugins/github-updater/vendor/class-parser.php (168)
in WordPressdotorg\Plugin_Directory\Readme\Parser::parse_readme called at /opt/wordpress/wp-content/plugins/github-updater/vendor/class-parser.php (159)
in WordPressdotorg\Plugin_Directory\Readme\Parser::__construct called at /opt/wordpress/wp-content/plugins/github-updater/src/GitHub_Updater/Readme_Parser.php (43)
in Fragen\GitHub_Updater\Readme_Parser::__construct called at /opt/wordpress/wp-content/plugins/github-updater/src/GitHub_Updater/API/GitHub_API.php (207)
in Fragen\GitHub_Updater\API\GitHub_API::get_remote_readme called at /opt/wordpress/wp-content/plugins/github-updater/src/GitHub_Updater/Base.php (314)
in Fragen\GitHub_Updater\Base::get_remote_repo_meta called at /opt/wordpress/wp-content/plugins/github-updater/src/GitHub_Updater/Base.php (280) in Fragen\GitHub_Updater\Base::run_cron_batch called at /opt/wordpress/wp-includes/class-wp-hook.php (286)
in WP_Hook::apply_filters called at /opt/wordpress/wp-includes/class-wp-hook.php (310)
in WP_Hook::do_action called at /opt/wordpress/wp-includes/plugin.php (515)
in do_action_ref_array called at /opt/wordpress/wp-cron.php (126)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 36 (25 by maintainers)
Commits related to this issue
- add comment for not finding tmp path Related https://github.com/afragen/github-updater/issues/704 — committed to afragen/git-updater by afragen 4 years ago
Ok, I’ve adjusted the permissions. I’ll take another look at the logs in an hour or two.
Oh! This sounds promising! I’ll do my best to get this set this evening and will report back.
@bishless @chesio I’ve reverted back to the original behavior of using the temp directory.
@bishless can you set the location of your temp directory using
WP_TEMP_DIR
and let me know if that works?Thanks for the information @chesio. Based on this I will revert back and recommend the use of setting
WP_TEMP_DIR
if there are issues.I don’t think changing the location for temporary files via
WP_TEMP_DIR
constant makes the location inconsistent. The location is constant, just different than default.In my case, I actually prefer to have temporary files outside of publicly accessible part of the website. So if you plan to use
uploads
directory, please make the location filterable.Another reason why I prefer the old way is that I can assume that only temporary files are placed in a designated temporary directory, so I can safely purge its contents in case it happens to fill up for some reason. This logic does not apply to files in
uploads
directory.I agree it’s hard to have nice things sometimes (and time consuming), but I wouldn’t just give up in this case 😃 All in all, half of this thread was about not being able to switch branches.
The server does have a
/tmp
dir… but it’s up one level from the wp directory.I’ll clear the log and reinstall the develop branch and let you know what I see in a couple hours.
I have Siteground’s SG-Cache plugin installed, but assumed it was only caching front end views/assets. Maybe that’s an incorrect assumption.
I’ll try disabling it temporarily to see if the behavior changes (gonna wait to do this until late tonight, though - have a ton of traffic hitting our site re: a semi-viral Paycheck Protection Program post #yikes)