fopen error

Problems with the Linux version of XAMPP, questions, comments, and anything related.

fopen error

Postby zz85 » 24. May 2005 17:59

Hi. Firstly I must thank all the developers and contributors of XAMPP. thanks for making such powerful software so easy to use.

However, I have a small problem as described on my blog here http://www.lab4games.net/zz85/blog/2005 ... pen-error/

The problem is using fopen on a webpage other than my own domain causes an warning/error.

I would like to know what settings I can change to make it work or its because lampp php is compiled with fopen url wrappers turned off?

Thanks.
zz85
 
Posts: 2
Joined: 24. May 2005 15:40

Postby Wiedmann » 24. May 2005 18:18

However, I have a small problem as described on my blog here ...

Is it not better for us, if you post the error message here?

what is this?
zz85 wrote:>@ÿ¿
1@n



BTW:
I have no problem with:
Code: Select all
$link = fopen('http://www.lab4games.net/zz85/blog/', 'r');
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby zz85 » 24. May 2005 18:51

For the funny characters I have no idea. I dump the contents from wget (or links i cant remember) of my script. Actually I just realised I get slightly different characters of that error message.

Warning: fopen(http://www.lab4games.net/zz85/blog/) [function.fopen]:
failed to open stream: HTTP request failed! & empty($doing_rss) ) {
include(ABSPATH . '/wp-feed.php'); exit; } else if ( is_trackback() &&
empty($doing_trackback) ) { in /opt/lampp/htdocs/test/fopen.php on line 6
Bad!

knoppix@turtleshell:/opt/lampp/htdocs/test$ links http://127.0.0.1/test/
http://127.0.0.1/test/fopen.php
Warning: fopen(http://www.lab4games.net/zz85/blog/) [function.fopen]:
failed to open stream: HTTP request failed! **>@*Z...Iy? *1@*Z.. in
/opt/lampp/htdocs/test/fopen.php on line 6
Bad!

For my source,

<?php



$url = "http://www.lab4games.net/zz85/blog/";
$fh = fopen ($url,"r");
if (!$fh) die("Bad!");
while (!feof($fh))
{
$output = htmlspecialchars(fgets($fh,1024));
echo ("$output<br />");
}
fclose($fh);

?>

You can test it for yourself here. http://zz85.homedns.org/test/fopen.php

Oh, could it be also caused by a timeout?
zz85
 
Posts: 2
Joined: 24. May 2005 15:40


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 27 guests