Author Topic: WPBlacklist 2.9 won't work after host disabled allow_url_fopen  (Read 9058 times)

Offline daisywreath

  • No flame
  • *
  • Posts: 3
  • Karma: +0/-0
Recently my web host disabled allow_url_fopen for security reasons, and shortly after I started noticing problems using WPBlacklist.  On an existing blog, I can't import the blacklist (I get a file not found message), not even a copy located in my web space.

On a new blog, I wasn't able to install, got this error message:

Warning: file(): URL file-access is disabled in the server configuration in /home/[username deleted]/daisywreath.net/journal/wordpress/blacklist-install.php on line 87

Warning: file(http://www.jayallen.org/comment_spam/blacklist.txt): failed to open stream: no suitable wrapper could be found in /home/[username deleted]/daisywreath.net/journal/wordpress/blacklist-install.php on line 87

Is there anything I can do to get things working, or should I give it up and try to find some other way to control spam?  (I fumbled around with the code a bit and got the installer to work, but the blacklist still isn't functional, probably because I know approximately zip about this...)

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #1 on: May 03, 2005, 03:35:46 PM »
The easiest solution would be to manually download the blacklist.txt file from Jay Allen's site and put it in your WP root folder and then simply set the address for the blacklist.txt file in the installer to blacklist.txt instead of the jayallen.org address and see if that works. The fopen_url restriction should be there only for remote access of a file - local access should work fine. You would have one problem with this approach - each time you want to update the blacklist, you'd again have to download it from Jay Allen's site and put it on your local server. I will try to see if there's a way to modify the code so that it works even under the restrictions on your server.

Offline daisywreath

  • No flame
  • *
  • Posts: 3
  • Karma: +0/-0
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #2 on: May 04, 2005, 03:04:40 AM »
Woohoo!  It's working now!  When I had tried using a local copy on my site before, I was experimenting with the copy that the MT Blacklist plugin on an old Movable Type installation used to publish to the site's root, and the server didn't much care for that--never occurred to me to try putting it in the wordpress folder.  But putting it in the wordpress folder for installation and in the wp-admin folder to update it seems to be working fine.

It's no biggie for me to do this manually since it's only for two blogs and I usually only update the blacklist once a week or so.  If you ever decide to rework the code to get around this problem, though, I'd be absolutely thrilled.

Thanks for your help!

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #3 on: May 04, 2005, 02:02:18 PM »
You're welcome :) I'm glad that it's working fine now ... I need to see if there is a way around the file open block - probably for the next release if there is a way to do it....

Offline daisywreath

  • No flame
  • *
  • Posts: 3
  • Karma: +0/-0
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #4 on: May 04, 2005, 11:18:27 PM »
If it's of any help in getting around it, my host was recommending that people use the curl library instead.  That was how I got the installer working when I was futzing around with the code before I posted here, but I didn't really know enough about what I was doing to have gotten the actual plugin to work right using it  :?

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #5 on: May 05, 2005, 02:03:13 PM »
Thanks for the info :) I wouldn't have thought of curl and now that you've mentioned it, still not sure that I want to go that route :p But we'll see ...

Offline JimV

  • No flame
  • *
  • Posts: 1
  • Karma: +0/-0
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #6 on: June 14, 2005, 10:12:14 PM »
Hey Fahim,

Thanks for your excellent work on WP-Blacklist! I have a similar problem to daisywreath's, and found a handy snippet of PHP code by Matt Read to do the fetching:

http://wordpress.org/support/topic/34959#post-197864

Jim

« Last Edit: June 14, 2005, 10:14:06 PM by JimV »

Offline Fahim

  • Administrator
  • Inferno
  • *****
  • Posts: 663
  • Karma: +4/-0
    • http://www.farook.org
Re: WPBlacklist 2.9 won't work after host disabled allow_url_fopen
« Reply #7 on: June 15, 2005, 04:49:13 PM »
You're welcome Jim :) And thanks for the link to the code snippet - that will really help :) I will have to incorporate that into the next release of WPBlacklist...