Firefox PHP

Module: Embed Images

Posted by Maurice Makaay 
Re: Module: Embed Images
April 05, 2011 03:05PM
Did you upgrade to 5.2.16 at some point? So were you running an earlier version before?

Please, upload the file include/api/http_get.php from your installation here, so I can check it.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
April 05, 2011 03:13PM
Yes, i startet on january 15th, i startet with 5.2.15, could that be? Because befor the Update i read about making a own Theme to not loose my modifications made to some files, and the update was successful (i thought) :-)

Roger
Attachments:
open | download - http_get.zip (4.5 KB)
Re: Module: Embed Images
April 05, 2011 03:17PM
Only partly successful then. The file that you uploaded is part of 5.2.15. It is definitely not the one that is included with 5.2.16. Re-upload all 5.2.16 files to get this fixed.

A custom template in your own template directory is good indeed. That will allow you to blindly upload all files from the 5.2.16 package, without risking overwriting customizations.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
April 05, 2011 03:21PM
omg, now im part of the errors which are sitting 30cm in front of the PC - ah, im sorry to get you busy on that ...
i get busy now uploading all files now

greetings
Roger
Re: Module: Embed Images
April 05, 2011 03:52PM
PEBKAC ... everybody runs into one of those as some point, being the one that is "BKAC" ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 1 time(s). Last edit at 04/05/2011 04:01PM by Maurice Makaay.
Re: Module: Embed Images
April 05, 2011 04:27PM
Hello, so i do not leave the scene silent while my problem is solved:

Okay! The Module is working ! Great !

Thanx a lot, really a necessary module!

CU
Roger
Re: Module: Embed Images
April 10, 2011 05:57PM
Hi there,

I've got a specific problem with this module. My phorum is a wii gaming/hacking forum and lots of people uses game tags provided by a certain site. And that site presumably uses an automatic redirector to keep the background processing of the images to minimum. And that just confuses embedded images plugin, it fails with "HTTP request failed with code 400".

Here is an example image url that doesn't show

[www.wiinnertag.com]

which redirects to here,

[www.wiinnertag.com]


Any suggestions other than disabling embedded images plugin? (Just upgraded to the latest version of this module and phorum btw.)
Re: Module: Embed Images
April 11, 2011 01:49AM
This is not a problem of the embed images module. The site that is sending the redirect is not following protocol here. This makes the load operation fail. The problem is that the redirect header from that site looks like:
Language: PHP
Location: ../wiinnertag_images/cached_signs/WiiCrazy.jpg

This redirect should have been:
Language: PHP
Location: http://www.wiinnertag.com/wiinnertag_images/cached_signs/WiiCrazy.jpg

or what might work too in this case (depends on the server):
Language: PHP
Location: /wiinnertag_images/cached_signs/WiiCrazy.jpg

What happens now, is that (as instructed by the Location header) a request is sent to www.winnertag.com to get the file ../wiinnertag_images/cached_signs/WiiCrazy.jpg, but the server sees the ../etc as an invalid request, resulting in a 400 error.

The way to fix this, is to inform the winnertag.com owners about their issue. They will have to fix this on their side. The location header must not contain a relative path. An absolute URI must be used instead.

The specification for this can be found in RFC2616:
Quote

14.30 Location

The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.

Location = "Location" ":" absoluteURI

An example is:

Location: http:\//www.w3.org/pub/WWW/People.html


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Embed Images
April 11, 2011 02:53PM
@Maurice : Thanks a lot for your detailed explanation, it's really appreciated. My assumption was embed images module not handling any url redirection at all which was false...

I've notified the site developer and he came up with a fix in his redirection code..

Thanks again.
Re: Module: Embed Images
April 11, 2011 03:34PM
Glad to hear they fixed it on there side.
Good luck with the mod!


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login