TinyPortal

Development => Support => Topic started by: ed_m2 on December 29, 2009, 11:06:52 AM

Title: fopen: failed to open stream
Post by: ed_m2 on December 29, 2009, 11:06:52 AM
hi peeps.

following on from this upgrade:
http://www.tinyportal.net/index.php?topic=31428.0

turns out since the upgrade i cant actually access any of the TP admin links (e.g. below for "news & credits" link)

Link to my site: http://www.covtri.co.uk
SMF version: 1.11
TP version: 1.0b4
Theme name and version: Customised default
Browser Name and Version: FF something or other
Mods installed:
1. Anti-Bot Registration Puzzles 1.2
2. TinyPortal 1.083
3. SMF Media Gallery 2.0.5
Related Error messages:
Quote
2: fopen(http://www.tinyportal.net/xml/tp1082.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Connection timed out
File: .............................../Sources/TPmodules.php
Line: 1516

i'm assuming this is the same function that return smf news & package news ?.. both if which work ok in my admin panel.

similar errors in search suggest missing files in the installation, any ideas what they would be then ?
or is this a server issue ?

thx for any help.

ed
Title: Re: fopen: failed to open stream
Post by: Renegd98 on December 29, 2009, 01:15:16 PM
fopen errors usually mean you will need to talk to your host. They may have institued new security protocols that have casued this issue to appear or you may not be the owner of the files on the server. I would call and ask them to make sure you are the owner of all the files on the server for your domain.
Title: Re: fopen: failed to open stream
Post by: IchBin on December 29, 2009, 04:40:35 PM
This actually looks like another case of the TP.net server being slow. The connection actually timed out, which I'm assuming that others will get this at times as well. It's really slow to load for me in my TPadmin, but I'm still able load. Bloc will need to check out the server to see why it's so slow.
Title: Re: fopen: failed to open stream
Post by: ed_m2 on December 29, 2009, 07:12:58 PM
hmmm ok tah.

the one time i copied & pasted the xml address into my browser it came up ok, just did it again and a little slow but still there.

if i have time i might have a naughty dip into the TPadmin source code, i dont really pay attention to streamed info in admin anyway (version updates aside).
Title: Re: fopen: failed to open stream
Post by: ed_m2 on January 15, 2010, 09:03:11 PM
ok so.... tp.net is back up and stable ?

i've just got TP back up and running on my other site and all the admin xml feeds work ok.

but still have the problem on the original site.

some php or apache setting ??
or something else ?
Title: Re: fopen: failed to open stream
Post by: IchBin on January 15, 2010, 09:07:48 PM
Sounds like a server configuration problem IMO. Hard to say with error like that.
Title: Re: fopen: failed to open stream
Post by: Bluto on February 01, 2010, 01:17:57 PM
I doubt it's a server issue for fopen if it only times out on that URL And I believe he would have seen an fopen error long ago if it was the server. If they have modified the server config, like adding mod_security, then you may have to ad your own php.ini to your root to try to the override fopen rule
Title: Re: fopen: failed to open stream
Post by: Skhilled on February 01, 2010, 03:01:02 PM
If you are going to add your own php.ini, I suggest you check your TOS for your hosting or ask them if it is OK. Some hosting will not allow it and will shut you down for doing it. It is best to ask first. ;)
Title: Re: fopen: failed to open stream
Post by: ZarPrime on February 01, 2010, 05:36:53 PM
Absolutely, especially wrt to something like fopen.  Some hosts have decided that fopen is a security risk.  This is generally only true with the hosts that don't know how to secure their servers properly or haven't taken the time to figure it out.

ZarPrime.
Title: Re: fopen: failed to open stream
Post by: scept1c on February 05, 2010, 09:43:19 AM
so I need to reconfiger the server?
Title: Re: fopen: failed to open stream
Post by: ed_m2 on February 05, 2010, 11:52:10 AM
i keep meaning to check this out... if i do a phpinfo() readout i should see if this setting is disabled ?
my host has an option for custom configuration variables in the control panel, just not the fopen one.
Title: Re: fopen: failed to open stream
Post by: ZarPrime on February 05, 2010, 02:39:40 PM
ed_m,

Yes, look for "allow_url_fopen"

ZarPrime
Title: Re: fopen: failed to open stream
Post by: ed_m2 on February 05, 2010, 06:52:37 PM
Quote from: ZarPrime on February 05, 2010, 02:39:40 PM
ed_m,

Yes, look for "allow_url_fopen"

ZarPrime

hmmm both local & master value is "On".
Title: Re: fopen: failed to open stream
Post by: ZarPrime on February 07, 2010, 02:55:39 PM
Ed,

As Ichbin mentioned in a previous post (http://www.tinyportal.net/index.php?topic=31608.msg252938#msg252938), this issue was likely due to the problems we were having with the TinyPortal server at that time.  If you are still having the issue, there is probably something else causing it, likely on your end.

ZarPrime
Title: Re: fopen: failed to open stream
Post by: ed_m2 on February 07, 2010, 09:09:10 PM
i know... and yes.
although the smf feeds work fine which is assume is also an fopen.
Title: Re: fopen: failed to open stream
Post by: Skhilled on February 07, 2010, 09:18:30 PM
In my experiences, fopen are either server issues or chown/chmod issues.
Title: Re: fopen: failed to open stream
Post by: IchBin on February 08, 2010, 05:04:00 AM
Are you still getting the error? If not, then I would consider this solved. If you are still getting this error, there is not much we can do. The file is there as you can see if you actually click the link for it on this site. I'd have a talk with your host if you can't connect to it from your site.
Title: Re: fopen: failed to open stream
Post by: ed_m2 on February 08, 2010, 12:15:54 PM
i just checked.... at present the panels/blocks page takes a looong time to load and either:
- times out with "The requested URL could not be retrieved"
- or loads as far as the latest block snippets with no content.

i will raise it with the hosts at some point

i guess the answer i really need is.. is the implmentation of these feeds any different to the smf ones that appear on the admin panel front page & packages page in smf ?
Title: Re: fopen: failed to open stream
Post by: ZarPrime on February 08, 2010, 02:01:18 PM
Ed,

I haven't had any problems with this since the Server problems here were fixed.  I don't personally know if the method for grabbing these pages from the SMF site is the same or different than the TP pages.  I think it has something to do with the packages server.  If you check with your host about it and nothing on your site seems to be amiss, post back and we can ask Bloc to check the Packages Server to see if there are any further issues here, but it seems to be working well on all of my sites, at least right now.

ZarPrime
Title: Re: fopen: failed to open stream
Post by: ed_m2 on February 08, 2010, 04:10:07 PM
tell you what..... you stop posting on this thread and i'll stop replying until i have more answers ... :)
Title: Re: fopen: failed to open stream
Post by: ZarPrime on February 08, 2010, 04:42:55 PM
I'll wait to hear back from you though I won't look forward to it. :P >:D

:2funny: :2funny:

ZarPrime
Title: Re: fopen: failed to open stream
Post by: scept1c on March 25, 2010, 09:26:28 AM
I had got fopen errors because they had changed setting on the server and I hadn't been the owner of my files any more.
Title: Re: fopen: failed to open stream
Post by: ZarPrime on March 25, 2010, 06:38:34 PM
It happens sometimes.  Can you just ask your host to change things back to the way it was?

ZarPrime
Title: Re: fopen: failed to open stream
Post by: scept1c on March 26, 2010, 08:10:19 AM
yes, thank you, I've already had to do it a few times, I'm starting to think about changing the host.
Title: Re: fopen: failed to open stream
Post by: ed_m2 on April 03, 2010, 07:53:52 PM
ok zar... you'll be pleased to know after some suitably ambiguous host support responses there is a section hidden away in the hosts admin cp with the following text:

Quote
To protect your hosting package against a number of different threats, 123-Reg prevent all automatic connections from PHP or CGI scripts to remote websites. Specifically if your script attempts to connect to a remote server, it will fail or time out.

We realise that some customers may wish to connect to remote websites for legitimate purposes (for example to obtain a news feed) and using this page you may request that a website you wish to connect to is enabled by our engineers at firewall level, thus allowing remote connections to it to be made.

Once you have submitted a request to enable connections to a remote website at firewall level our engineers will make a review of the request, and open the connection if suitable. Any open connections that you have requested, and our engineers have completed, will be shown below.

charming  :coolsmiley:
hopefully they'll unblock you and let me back into my admin pages.

Title: Re: fopen: failed to open stream
Post by: Ken. on April 03, 2010, 11:41:17 PM
ed_m, your text message is easier to read using the quote tags rather than the code tags, so I changed it for you.  ;)
Title: Re: fopen: failed to open stream
Post by: ed_m2 on April 04, 2010, 07:43:30 AM
oh yes.. my mistake.
Title: Re: fopen: failed to open stream
Post by: Bluto on April 04, 2010, 09:24:20 AM
What a bunch of bull. The security measures they are now using are in no doubt a knee jerk response to a bad experience.
Most hosts, including myself, allow any client to link to outside web sites. But, when using mod_security, Like I do on a Red Hat Linux box, we don't allow linking to files outside the domain for scripts. But there is a simple solution to this.
1. Get a hold of the files that are hosted outside your domain, upload them, and change the path in the config file.
2. If the server is using mod_security, 1 rule can be changed to allow the scripts to be run. We often disable this rule as many SMF mods won't work correctly with the rule enabled. Like almost anything released by SMF hacks, which likes to call home all the time.
So we will disable it with a stern warning to keep all of tour software, and scripts up to date, and that you are responsible for any security breaches to your site.
I've been disabling this rule since the new version of mod_security was released. I have yet to see a security breech.
These people are putting an undue burden on the tech staff.
There must be a similar solution to remedy your situation. If your provider offers SMF as a Fantastico install, they are going to have issues with every one of those installations. Point that out to them.
Good luck to you.
B-Lute
Title: Re: fopen: failed to open stream
Post by: ed_m2 on April 04, 2010, 02:53:42 PM
thanks bluto, yeh i did think it seemed rather draconian !
not sure i followed your workaround, but i'll see if they actually respond before going any further.
i didn't buy/set up the original hosting package and i'm not sure i have the energy to move it at present!

strangely all the smf news & packages feeds work ok, so either thats already on the list or uses a different method to get the feed.
Title: Re: fopen: failed to open stream
Post by: ZarPrime on April 04, 2010, 05:17:32 PM
Yep, no doubt Bluto is correct.  These guys obviously had a bad experience at one time or another and their solution was to tighten everything down to where it made it not only more difficult for their users but for their support staff as well.  Some of the people who run hosting companies should have considered another profession in their early years. >:D Keep us posted. ;)

ZarPrime
Title: Re: fopen: failed to open stream
Post by: Bluto on April 04, 2010, 07:35:40 PM
Looking to see a good outcome ed_m. They probably go alot of complaints when they changed things initially, as at that point, everyone who had SMF om their site was complaining. So they got on the whitelist quick. But you would think Tiny Portal would be next in line.     :idiot2:
Title: Re: fopen: failed to open stream
Post by: ed_m2 on April 06, 2010, 02:51:33 PM

i have my blocks back again !
(or the ability to edit them anyway)
case closed.
thank you and goodnight.

Title: Re: fopen: failed to open stream
Post by: ZarPrime on April 06, 2010, 04:47:30 PM
Well, this is certainly good news.  Out of curiosity, what did the problem turn out to be?  In the meantime, I will go ahead and mark the topic solved. O0

ZarPrime
Title: Re: fopen: failed to open stream
Post by: ed_m2 on April 06, 2010, 09:39:33 PM
im assuming it was the silly host security restrictions as above.... at least the first working day after my request it has been fixed.