TinyPortal

Development => Support => Topic started by: FERNSIDEâ„¢ on March 21, 2008, 12:31:17 PM

Title: $fp = fopen($backend, "r"); <-- This Error???
Post by: FERNSIDEâ„¢ on March 21, 2008, 12:31:17 PM
Hello peeps  :)

I just had a look in my error log, and saw these two errors.

2: fopen(http://www.tinyportal.net/tp.xml) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: no suitable wrapper could be found
File: *******/htdocs/home/Sources/TPortal.php
Line: 1607

2: fopen() [<a href='function.fopen'>function.fopen</a>]: URL file-access is disabled in the server configuration
File: *******/htdocs/home/Sources/TPortal.php
Line: 1607


Located it to this line.
$fp = fopen($backend, "r");

Im at a loss as to what it means.

Usual details:
SMF 1.1.4
TP 0.9.8
Invazion theme.

And any additional information, will be added due to request.

Thank You in advance :)



Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: G6Cad on March 21, 2008, 05:55:47 PM
That error comes from the server as the string in the error say, your host block that file for some reason.
You have to contact them and ask them to help you with that issue.

The server seem to be blocked for outside urls
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: IchBin on March 21, 2008, 06:34:22 PM
When are you getting this error? Can you figure out what you are doing when this happens?
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: PowerPyx on March 21, 2008, 07:17:42 PM
@Sabreâ,,¢ : which php version do you use ?

use a texteditor and c&p the following code in it, afterwards save it as info.php and upload it to your forum maindirectory e.g. where the index.php besides


<?php
phpinfo
();
?>


run that info.php with : http://yourforum.tld/pathtoforum(if_necessary)/info.php

look if allow_url_fopen = ON or = OFF

Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: IchBin on March 21, 2008, 07:46:53 PM
Well, it already says its disabled. :) Which is why I was asking what is happening when this error occurs.
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: FERNSIDEâ„¢ on March 21, 2008, 08:56:27 PM
Quote from: IchBinâ,,¢ on March 21, 2008, 06:34:22 PM
When are you getting this error? Can you figure out what you are doing when this happens?
Morning mate :)

In your error log, your info is in this order
Name:
IP:
Error URL:
Error messsage:

I clicked on that error url, and this screen appeared.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg515.imageshack.us%2Fimg515%2F9739%2Ftpbn3.png&hash=751df6ed18a01f4b10fe203418c5840460e0e874)

I remember seeing that screen last night, when I clicked save in a section in the admin panel(cant recall which, was very active last night)  and was logged out   O.O    (happens quite often)
When I logged back in, that was the screen displayed.
Could this error have come about because of that??
Or shall I start the elimination/back tracking process??

Quote from: PowerPyx on March 21, 2008, 07:17:42 PM
@Sabreâ,,¢ : which php version do you use ?
PHP version 5.2.5   <-- From host site in c/panel.
Is that what you were looking for?

Quote from: G6 on March 21, 2008, 05:55:47 PM
The server seem to be blocked for outside urls
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fsmilies.sofrayt.com%2Ffsc%2Fgentleman.gif&hash=74715f2f6813c21592496d85dd7928a12ec63cf8) Morning Mam :)
Sorry, Im waiting for the kettle to boil, then I'll have my mornin cuppa. But until then, I am trying to figure out what you mean. lol       <--no mornin cuppa yet remember :D
Does this mean no links/urls or something to that accord, can be added to my site?
No no no wait!!
Im right off arent I!!?

Thank You all for your assistance :)
*heads to the kitchen for his mornin cuppa*
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: IchBin on March 21, 2008, 11:43:43 PM
Well you need to figure out EXACTLY when this is happening. Clear your log, and click on things one at a time, each time refreshing your error log. Figure out exactly where you are at, and what you are doing or there's nothing we can do.

Do you have a custom block that is referencing any files via a URL?
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: FERNSIDEâ„¢ on March 21, 2008, 11:47:40 PM
In fact, I did add one last night.
It showed where in the world people were from.
Similar to the Google maps mod.
I deleted not long after.

I'll start the elimination process and see what happens.
Thanks mate :)
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: PowerPyx on March 22, 2008, 09:33:08 PM
ask your provider to turn the above mentioned paramter to turn on, or ask him if you can do this with a own php.ini -- php 5.2.5 standard has this parameter turned off.
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: IchBin on March 22, 2008, 09:53:42 PM
I wouldn't turn that on if it were me. It allows remote files to be grabbed to your server, which is a way that some hackers use to get files on the server so they can gain access or control through an exploit in a script or something.
Title: Re: $fp = fopen($backend, "r"); <-- This Error???
Post by: Ianedres on March 22, 2008, 09:59:08 PM
It is a security risk to allow urls with fopen; IMHO, before changing your php.ini, I would first try to find the offending call to the URL (as per IchBin) and modify it to a relative path if the file is stored on your site instead of referencing it by the URL.