Recent Topics

1 Nov 09, 2005 09:32    

Hello,

I'm running a Finnish blog for my users.

Finland has a site http://www.blogilista.fi which manages a list of Finnish blogs. When they are updated and which are the most popular Finnish blogs etc.

The problem is that I am unable to add b2evolution blogs to the list. The site says that there is no blog found in the given address. I can access the blog with my browser without any problems though.

I e-mailed the administrator of the site and asked about the problem. His opinionn was that the problem is with b2evolution. The site sends an php command which tries to open the given site. If this doesn't result in a correct answer it won't accept the blog.

Can I do anything about this or is this a bug with b2evolution? I think other users of b2evolution can suffer from the same problem.

I'm running the latest version of b2evolution.

2 Nov 09, 2005 15:20

I don't know what type of command they would be sending. fopen or cURL would let them read the site, but that shouldn't cause any problems. Are they using xml-rpc?

3 Nov 09, 2005 15:29

According to the administrator, they are using the fopen command.

But I do not know if they are using xml-rpc. As a matter of fact I don't even know what that is. :)

4 Nov 09, 2005 15:50

I didn't know a web page could do anything to keep fopen from fetching data from it, outside of making it unreadable. But if anyone online can view your page through a browser, then there should be no problem. Can the admin at this site view your page in a browser?

5 Nov 09, 2005 18:04

Yes, everyone can read the blogs through a browser.

The only problem is that my users are reporting problems when they are trying to add their blog to the Finnish bloglist.

According to the bloglist administrator, if the fopen function returns an error message the bloglist thinks that the blog is not working. He said that tthe problem is with b2evolution. Don't know if it is.

6 Nov 09, 2005 18:19

Can you post the link that they are trying to fopen() ?

¥

8 Nov 09, 2005 19:28

this may or may not help, but, with the following code :-

<?php

$url="http://www.kotichat.com/blog/blogs/index.php/satu.html";

$handle = fopen($url, 80);
$theResults="";
if($handle)
{
while (!feof($handle)) {
$theResults .= fgets($handle, 4096);
}
fclose($handle);
}

echo $theResults;
?>


I get the following response :-

Warning: fopen(http://www.kotichat.com/blog/blogs/index.php/satu.html): failed to open stream: HTTP request failed! HTTP/1.1 412 Precondition Failed in [path to test file]

¥

9 Nov 20, 2005 04:26

I get 503 - Connect failed with my browser (Konqueror) on both URLs currently.

10 Nov 20, 2005 17:00

I can open both URL's with my browsers (Internet Explorer and Mozilla Firefox) currently.

Are you still not able to open the pages?

11 Nov 20, 2005 17:24

Ok, now it works (from the browser).

But the code that ¥åßßå posted does not work.

The same for a simple

file_get_contents($url);

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html says:

10.4.13 412 Precondition Failed
The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.

So it's a server issue. I guess it's mod_security on Apache that prevents access when there's User-Agent PHP in the headers of the request.

I've just tried wget'ing the URL and it's the same error. But also if I change the user-agent to "Mozilla" simply:

wget --user-agent=Mozilla http://www.kotichat.com/blog/blogs/index.php/satu.html

12 Nov 21, 2005 07:57

Thank you.

I think you are right.

Probably our server administrators have changed that setting after our server was having a lot of DoS attacks lately. I have to talk to them if they can correct the problem.


Form is loading...