TinyPortal

Development => Support => Installation => Topic started by: Akyhne on April 01, 2009, 07:43:20 AM

Title: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 07:43:20 AM
Link to my site: http://forum.teamhd.org
SMF version: SMF 1.1.8
TP version: TP 1.0 beta 3
Theme name and version: All themes
Mods installed: Don't think this is relevant

I have the following errors in my log:

Apply Filter: Only show the errors with the same message
2: fclose(): supplied argument is not a valid stream resource
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1521


Apply Filter: Only show the errors with the same message
2: fread(): supplied argument is not a valid stream resource
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1512

2: fopen(http://www.tinyportal.net/tpnews.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: no suitable wrapper could be found
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1508


2: fopen() [<a href='function.fopen'>function.fopen</a>]: URL file-access is disabled in the server configuration
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1508

Am I missing a file somewhere?
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 07:47:07 AM
Hmm, on this link (tpadmin;sa=modules) I have the following errors as well:

2: fclose(): supplied argument is not a valid stream resource
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1479

2: fread(): supplied argument is not a valid stream resource
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1470

2: fopen(http://www.tinyportal.net/tplatestmodules.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: no suitable wrapper could be found
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1466

2: fopen() [<a href='function.fopen'>function.fopen</a>]: URL file-access is disabled in the server configuration
File: /somewhere/mysite.com/Sources/TPmodules.php
Line: 1466
Title: Re: fopen, fread and fclose errors - missing file?
Post by: G6Cad on April 01, 2009, 08:17:34 AM
Permission issues with your host, they need to set *allow fopen*
You need to contact your host and ask them to change the settings on the server.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 08:21:41 AM
I saw people posting about similar issues and they got warned about sequrity issues. So what's the risc and why does TP use functions that are sequrity riscs?
Title: Re: fopen, fread and fclose errors - missing file?
Post by: G6Cad on April 01, 2009, 12:05:59 PM
TP itseöf does not come with any security issues what we know about, and fopen are not used with in our script, but in your own content, so one or more of your own added things causes the serrors, not tp itself
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 12:18:05 PM
fopen, fread and fclose are used in TPmodules.php in the function TPparseRSS(). That's where I have the errors.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Skhilled on April 01, 2009, 01:00:00 PM
Just wondering, do you have an RSS blocks enabled? If so, disable them and see if the errors go away.

Quote2: fopen() [<a href='function.fopen'>function.fopen[/url]]: URL file-access is disabled in the server configuration

That makes me think there's a server issue. Possibly, files not having the correct permissions or not owned by you?
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 03:01:27 PM
Quote from: Skhilled on April 01, 2009, 01:00:00 PM
Just wondering, do you have an RSS blocks enabled? If so, disable them and see if the errors go away.
No.

I only have the error when clicking some of the TP admin links in the admin center.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: IchBin on April 01, 2009, 03:45:16 PM
TPParseRss() is what creates the RSS Feeds. allow_url_fopen and allow_url_include are php settings that allow you to grab a file remotely (like an RSS feed) to parse it and display it on your page. These PHP settings can be a security risk if your PHP script is not written with security in mind. As G6 said, if you don't want these errors, you have to tell your host to enable those settings. You see this error in the TP admin panel because there is an RSS feed in their to display the news etc.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 03:50:43 PM
I have full access to my php.ini file at my host, so that's not the issue. the trouble is that I understand it's a sequrity risc. I don't think I have enabled anything that provides rss feed. I only use what you can see on the forum.teamhd.org, nothing else.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: G6Cad on April 01, 2009, 07:48:41 PM
You have 3 youtube video streams at the bottom of your forum, they are called  in from outside the server, so the server will not allow them to be streamed through to your site.

IchBin told what to change, and if you dont feel comfort with that, you have to remove these streaming vids from you tube ( and if you have others posted some where else, i just check your frontpage ) you have to live with these errors in the log.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 08:24:13 PM
You are not reading what I am writing. I have absolutely no errors when people are using the forum. I have errors when I goto the admin center and click some of the TP admin links.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: IchBin on April 01, 2009, 08:36:02 PM
Carina, there's a difference between embedding a youtube video and including a file in fopen. If you read my last post akyhne, you get this error because the TP admin panel uses an RSS feed for the news. Your concern is duly noted. What I'm telling you, is that if you're using SMF and TP only, you do not have to worry about this setting IMHO.
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 09:14:03 PM
You mean TP uses RSS feed from Tinyportal.net?
Title: Re: fopen, fread and fclose errors - missing file?
Post by: G6Cad on April 01, 2009, 09:17:50 PM
Yes, look in your blocks list-
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 09:39:37 PM
This is what I have installed. Is it the "Latest blockcodes from tinyportal.co.uk
[Show] [Hide]" that makes the trouble?
Title: Re: fopen, fread and fclose errors - missing file?
Post by: IchBin on April 01, 2009, 10:30:34 PM
index.php?action=tpadmin;sa=news
Title: Re: fopen, fread and fclose errors - missing file?
Post by: Akyhne on April 01, 2009, 10:37:00 PM
... but also in
action=tpadmin;sa=blocks
... and...
action=tpadmin;sa=modules

which I don't understand.