News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

November 20, 2019, 02:05:34 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189262
  • Total Topics: 20773
  • Online Today: 53
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 44
Total: 45

Author Topic: $fp = fopen($backend, "r"); <-- This Error???  (Read 5391 times)

0 Members and 1 Guest are viewing this topic.

FERNSIDEâ„¢

  • Guest
$fp = fopen($backend, "r"); <-- This Error???
« on: March 21, 2008, 06:31:17 AM »
Hello peeps  :)

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

Code: [Select]
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
Code: [Select]
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 :)




Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #1 on: March 21, 2008, 11:55:47 AM »
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

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #2 on: March 21, 2008, 12:34:22 PM »
When are you getting this error? Can you figure out what you are doing when this happens?

PowerPyx

  • Guest
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #3 on: March 21, 2008, 01: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

Code: [Select]
<?php
phpinfo
();
?>


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

look if allow_url_fopen = ON or = OFF

« Last Edit: March 21, 2008, 01:19:35 PM by PowerPyx »

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #4 on: March 21, 2008, 01:46:53 PM »
Well, it already says its disabled. :) Which is why I was asking what is happening when this error occurs.

FERNSIDEâ„¢

  • Guest
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #5 on: March 21, 2008, 02:56:27 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.


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??

@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?

The server seem to be blocked for outside urls
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*

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #6 on: March 21, 2008, 05: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?

FERNSIDEâ„¢

  • Guest
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #7 on: March 21, 2008, 05: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 :)

PowerPyx

  • Guest
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #8 on: March 22, 2008, 03: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.

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #9 on: March 22, 2008, 03: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.

Offline Ianedres

  • Friends
  • *
  • Posts: 684
  • $foo['ianedres'] < $foo['ichbin']
    • Clickity click dot dot dot com thingy
Re: $fp = fopen($backend, "r"); <-- This Error???
« Reply #10 on: March 22, 2008, 03: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.