Failed to open stream: HTTP request failed! — public notice from WPforChurch
-
Lately we have been getting a lot of emails to our support page from users experiencing some form of a “failed to open stream” error. For clarity, here is an full-length example of the error although the exact verbiage varies by website
Warning: file_get_contents(https://domainname.org/wp-content/uploads/2016/02/20160214-The-Pleasure-and-Desire-of-God-Part-II-1-Timothy-2-1-7-Pastor-Wes.mp3): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /domainname.org/wp-content/plugins/sermon-manager-for-wordpress/includes/podcast-functions.php on line 196
Warning: Cannot modify header information – headers already sent by (output started at /domainname.org/wp-content/plugins/sermon-manager-for-wordpress/includes/podcast-functions.php:196) in /domainname.org/wp-includes/pluggable.php on line 1228
I want to post this on the forum here so anyone searching the web will find this answer first (hopefully).
?
?First, this error is related to the level of file security on your web host (the host for the media file–which in your case is different from your church website). You may not have changed anything on your site or upload your sermons any differently but if your file host changes security protocols this will suddenly start appearing. Don’t worry–it’s not you.So this is why you get the error: during the sermon post/update process our code (podcast-functions.php) requires access to the uploaded mp3 to calculate the length of the audio file (an iTunes podcast requirement). Opening the mp3 file on the server (open stream request) is sometimes forbidden by the web host servers and hence the “open stream error.”
Currently, you have two workarounds which may help your situation.
?
?Workaround #1 — Enter the length of the mp3 file yourself in the designated field. If you don’t host a podcast on iTunes this data is completely irrelevant to you so just write in 60 seconds every time. Our code will detect whether or not you have manually entered the required data and will skip the file check process.
?
Workaround #2 — Contact your web-host about the error to see if they will change their security settings. If they don’t understand why you ask about this reference the exact time the last error occurred so that they can find it in the error logs and see for themselves. Be warned; however, that most web-host support staff (especially shared hosting) will not be experienced enough to know how to change their security protocols to even want to change them.
?
Ultimately, we need to change the way our code calculates file length and we are in the process of doing that now but no estimate on when that will be completed. Check the change-log of sermon manager for any reference to “mp3 file length calculation” if you are wondering if this was ever fixed.https://www.ads-software.com/plugins/sermon-manager-for-wordpress/
- The topic ‘Failed to open stream: HTTP request failed! — public notice from WPforChurch’ is closed to new replies.