Closed firstbaptistmedia closed 11 years ago
Your settings work for me on my local machine. My guess then is that your PHP settings have allow_url_fopen = Off in your php.ini file.
Is this on your own server, or one where you can turn on allow_url_fopen?
Thanks, Wes. The site is hosted on Blue Host, and I have no idea where to begin looking for this PHP setting. Is that on a page within the site? I'm sorry. I just kind of lost on that.
So I finally found a php.ini file and this is what I found:
;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads. file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ;upload_tmp_dir =
; Maximum allowed size for uploaded files. upload_max_filesize = 10M
Is this what you are referring to?
"allow_url_fopen" is what you are looking for.
;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files. ; http://php.net/allow-url-fopen allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files. ; http://php.net/allow-url-include allow_url_include = Off
Uh oh. I pasted the wrong code. Here's what's in the file. It seems to be correct, right?
;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files. allow_url_include = off
; Define the anonymous ftp password (your email address) ;from="john@doe.com"
; Define the User-Agent string ; user_agent="PHP"
; Default timeout for socket based streams (seconds) default_socket_timeout = 60
Based on this last code, it seems that code is not the issue. Any other thoughts?
@firstbaptistmedia I had the same issue. You need to delete all of the code above, except for:
allow_url_fopen = On
allow_url_include = off
Am I right, @weshays ?
Thanks @claykitchens. I'm not sure if this is what you meant or not, but I first tried to just remove that section. No change. Then I actually removed all code in the file so the file only has what @weshays cited above. Now, I have this error on our site:
Warning: file_get_contents(http://firstbaptistkeller.com/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key=fbckeller&plaza_display=topics&items_to_display=5&show_dates=on&show_type=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home4/myfbckel/public_html/wp-content/plugins/the-city-plaza/widget_info.php on line 17
Any ideas? I'm obviously in way over my head here.
I'm facing a similar error. I have checked the php.ini and phpinfo.php settings.
allow_url_fopen = On, allow_url_include = off, and cURL is enabled.
The error message displayed on the WP site is below:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Could it be a permissions issue with the plugin files? Thanks.
I will take a closer look at this today.
I am now having the same issue as @firstbaptistmedia today. I have deleted the plugin and reinstalled with no resolution.
Warning: file_get_contents(http://alpinecoc.org/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key=alpinecoc&plaza_display=events&items_to_display=3&show_dates=on&show_type=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /nfs/c09/h04/mnt/139133/domains/alpinecoc.org/html/wp-content/plugins/the-city-plaza/widget_info.php on line 17
I spent some time on and updated the check for file_get_contents, which is where your error is coming from. If file_get_contents is not enabled it will try cURL. If cURL is not enabled then it will throw an exception saying you need one of them to use the plugin. 0.8.2 has been pushed to WordPress.org. Let me know if that resolves your issue.
Installed and tested 0.8.2. Still getting the same error. Thanks for the feedback.
If you go to Appearance => Widget => [Your Instance] and check the box "Clear cache on save" and save does that help? If you still get an error message paste it here.
Already tried to clear the cache. Sorry, should have specified that, too. Same error as above. Thanks.
Are you hosting this on your own server or with another provider? What subdomain are you using?
I've got same going on as @clcwebmaster. I've updated plugin & cleared cache with no luck. I've searched me php file for the file_get_contents that you mentioned @weshays but it's not in there (which may be the problem?).
We're hosted on bluehost.com. The php file is an auto-configured PHP 5.4 file.
Still having the same error as before: Warning: file_get_contents(http://firstbaptistkeller.com/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key=fbckeller&plaza_display=topics&items_to_display=5&show_dates=on&show_type=0): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home4/myfbckel/public_html/wp-content/plugins/the-city-plaza/widget_info.php on line 17
Thanks for trying to help out on this @weshays !
I am having the same issue as well:
"Warning: file_get_contents(http://alpinecoc.org/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key=alpinecoc&plaza_display=events&items_to_display=3&show_dates=on&show_type=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /nfs/c09/h04/mnt/139133/domains/alpinecoc.org/html/wp-content/plugins/the-city-plaza/widget_info.php on line 17"
Media Temple is our hosting provider and our subdomain is alpinecoc. @weshays - Thank you so much for your work on these plugins. I would imagine that you're being pulled in many different directions these days, but we appreciate you committing time to work on these issues!
Subdomain on The City is 'covenantlove'. Hosted on another provider, a VPS running PHP 5.3.10.
Found this error in records {with edits}:
{web host IP here} - - [17/Jul/2013:11:29:37 -0700] "GET /{WordPress install folder}/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key=https://{The City subdomain}.OnTheCity.org&plaza_display=events&items_to_display=5&show_dates=on&show_type=on HTTP/1.1" 404 - "-" "PHP/5.3.10" {requesting IP location} - {admin name} [17/Jul/2013:11:29:37 -0700] "GET /{WordPress install folder}/ HTTP/1.1" 200 17868 "{Church site URL}/{WordPress install folder}/wp-admin/options-reading.php?settings-updated=true" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:22.0) Gecko/20100101 Firefox/22.0"
Thanks. Hope this helps.
I upgraded to Wordpress 3.6 this morning and I am still having the same issue with the Plaza plugin. I know that 3.6 probably isn't supported yet, but I thought I'd let everyone know.
I'm still having the same issues. Not really sure what to do to get this going. All things are up-to-date.
I am also having the same issue listed above, with the following error message:
Warning: file_get_contents(http://{Church site URL}/{WordPress install folder}/wp-content/plugins/the-city-plaza/load_data.php?subdomain_key={CitySubdomain}&plaza_display=all&items_to_display=10&show_dates=on&show_type=on)[function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in {Church site URL}/{WordPress install folder}/wp-content/plugins/the-city-plaza/widget_info.php on line 17
I concur that it would be really nice to have this plugin up and running. Or at the very least, know that someone at The City is working on solving this.
@kirstenkeister Yes, I am trying to get back to this. I have been busy working on The City iOS app. I will review this some more later today.
For the most part I am the only one at The City that works on our open source projects - Dustin helps out with design from time to time. I would welcome any help from the developer community: feature, bug fixes, documentation updates, etc. All of this takes time and for the most part I do this for fun and it is not officially support by The City or ACS.
@firstbaptistmedia did you see this https://my.bluehost.com/cgi/help/377
@kirstenkeister What are you using as the subdomain?
anyone else still having this issue? @clcwebmaster?
I was having the issue until I updated my .htaccess file with "php_value allow_url_fopen On". Just updating the php.ini file didn't work for me. Thanks @weshays for all of your work on this! I can not thank you enough!!!
Same issue: 'Authorization required'. Plugin installed is 0.8.2. On WordPress 3.5.2. Haven't updated to the new WordPress 3.6 yet.
allow_url_fopen is set to On. allow_url_include was Off but I enabled it with no changes.
Thanks.
@weshays I hadn't realized it wasn't officially supported, so I doubly appreciate your working on this for us. Our subdomain is truroanglican, and that's what I had been entering. Since I wasn't sure when the plugin would be fixed, I actually went ahead and created a plugin that simply parses the JSON feed (using json_decode() ) from our City Plaza and it's working as a quick fix for now. I'm sure it's not as efficient as the plugin you've created, but then I'm a designer not a developer.
I checked our PHP settings, and the allow_url_fopen and allow_url_include are both set to On (http://192.254.185.67/~truroang/phpinfo.php). We've upgraded to WP 3.6, but the plugin still doesn't seem to be working. Is it possible it's because we're on a shared server? We're in the process of upgrading our website, hence the IP address rather than a domain name url.
Hey @weshays yes, I've seen that, but unfortunately, there is a lot of stuff in this fille, and I'm not sure where that line goes. I'm not sure this will work, but here's a link to the PHP file that bluehost generates.
https://dl.dropboxusercontent.com/u/11307880/PHP_test.rtf
I'm in way over my head with this. I don't know if you would have time to glance at this file and help me figure out what I am missing. I've tried deleting everything in the file but the section mentioned in this thread, and I've tried just adding the line from this article into the file. Both with no luck.
@clcwebmaster @firstbaptistmedia @weshays I have been experiencing the same issue each time I installed the plugin on our various sites. The only thing that I had to to was add "php_value allow_url_fopen On" to my .htaccess file. Once I added that to the .htaccess file, the plugin worked flawlessly. No other files were edited. I hope this helps.
Clay
@claykitchens Is there a specific heading or place in the .htaccess file that the line needs to be? I have several things in that file already (admittedly, I have no idea what any of them do). I've tried dropping your line in few places, but doing this just "broke" the site. Any suggestions?
@firstbaptistmedia @weshays I added it on the third line of the file. I have attached a screen shot for reference. I have not edited any other files within this site to make it work -- only .htaccess.
@firstbaptistmedia You should only have to add it to your web's root directory. However, if you, or your service provider, has "AllowOverride None" (Apache configuration) your site will start displaying 500 errors (Internal server error).
As for the PHP_test.rft file it looks fine to me.
@kirstenkeister Do your server logs show any errors?
Well, I'm still stumped. I added the line into .htaccess as @claykitchens mentioned.
It seems that the server/host automatically added some info. I entered it just as indicated above. When I saved and reopened, it looked like this.
Oh well. Thanks for trying guys. I don't know what else to do.
Adding "php_value allow_url_fopen On" to an .htaccess file "breaks" my site as well.
Changing the php value through php.ini does not break the site, but did not change the error on the plugin.
Thanks.
@firstbaptistmedia Does the line still have the "#" in front? If so you need to remove that.
@clcwebmaster It breaks your site because of the "AllowOverride None". Try "AllowOverride All" and that should allow you to update your htaccess file. When you edited the php.ini file was the error the same?
@weshays The host site seems to be putting it in there automatically somehow. If I delete it, it mysteriously returns. Not sure how to eliminate it permanently.
@weshays @firstbaptistmedia I installed the Plaza plugin on a fresh install of Wordpress that is hosted by HostGator. It appears that the plugin makes the first call without incident, but the error shows after the next API call is attempted. I edited the .htaccess to insert "php_value allow_url_fopen On" and I received an internal server error. Our church site is hosted on MediaTemple, without any plugin issues, and the only change was to add "php_value allow_url_fopen On" in the .htaccess file.
@claykitchens If Apache is not configured to allow overriding values in an .htaccess file then you will get the internal server error. Change the "AllowOverride None" to "AllowOverride All" and that should allow you to update your htaccess file.
Should that solution not fix the issue then check out the apache error log.
Well, I don't know what change, but as if my "magic" our feed started populating a couple of weeks ago. Seems to be good, now. Thanks!!
The priority order for cURL and URL fopen was changed to give priority to cURL. That fixed the issue for several sites that used the plugin.
I'm not reopening this ticket; rather I'm shedding light on what was causing my error should it help someone else. I was using the plugin in a test site which I had password protected from the general public. I removed the password block temporarily to test the plugin and our information was populated on the test site. Apparently I had cut off some two-way authentication between the test site and The City Plaza. Thanks all for your feedback.
I'm new to this plugin and not sure if this is the place for this, but though the fields seem pretty straight forward, my feed is not populating. I don't know where to start troubleshooting this...
thanks for any help!