FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Error with images after upgrade to 3.0.5
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Error with images after upgrade to 3.0.5 [message #183302] Sun, 20 October 2013 12:36 Go to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
Afer upgrade to 3.0.5, from 3.0.0. all images are not shown anymore.The same error happend if a attach new images.

I made a example:
http://gesuender-abnehmen.com/index.php/m/546008/0bf5d04ddf69cc57dc4f8e7613 d232e7/#msg_546008

What I can do. It may an encoding problem ?

Thx
Re: Error with images after upgrade to 3.0.5 [message #183304 is a reply to message #183302] Sun, 20 October 2013 13:17 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Possibly an error/warning in 'getfile.php.t'. Check your web server's log files for errors.

To show that it's working here:
index.php?t=getfile&id=6275&private=0
Aw: Re: Error with images after upgrade to 3.0.5 [message #183305 is a reply to message #183304] Sun, 20 October 2013 13:20 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
I check it. Now in logs is nothing.
By the way. I can save the attachment but the contents seems to be changed.
Aw: Re: Error with images after upgrade to 3.0.5 [message #183315 is a reply to message #183305] Sun, 20 October 2013 16:01 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
What i can confirm also is that new attached files are stored on the file system correct. So the problem occurs on download
Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183316 is a reply to message #183315] Sun, 20 October 2013 16:13 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
In that case the problem must be in 'getfile.php'. Invalid headers maybe?
Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183317 is a reply to message #183316] Sun, 20 October 2013 16:22 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
this is a hint, the header for a gif fikle looks
Date: Sun, 20 Oct 2013 16:20:20 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.4-14+deb7u4
P3P: CP="ALL CUR OUR IND UNI ONL INT CNT STA"
Cache-Control: no-store, private, must-revalidate, proxy-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0
Expires: Mon, 21 Jan 1980 06:01:01 GMT
Pragma: no-cache
Last-Modified: Sun, 20 Oct 2013 12:17:59 GMT
Content-Disposition: filename="2-8-2008.gif"
Content-Length: 45752
Connection: close
Content-Type: image/gif

200 OK

Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183328 is a reply to message #183317] Sun, 20 October 2013 18:56 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
this test script works on the server:

<?php

    $file ='/var/www/FUDforum/files/29948.atch';

  header('Content-Description: File Transfer');
    header('Cache-Control: public');

header("Content-type: image/gif");
    header("Content-Transfer-Encoding: binary");
    header('Content-Disposition: attachment; filename='. basename($file));
    header('Content-Length: '.filesize($file));
    ob_clean(); #THIS!
    flush();
    readfile($file);


?>


Any hints or proposals what or where can debug ?

Thx

[Updated on: Sun, 20 October 2013 18:56]

Report message to a moderator

Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183335 is a reply to message #183328] Sun, 20 October 2013 19:05 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Not sure I understand. Is the solution to add ob_clean()?
Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183337 is a reply to message #183335] Sun, 20 October 2013 19:23 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
Sorry, for confusion. I don't know. The script is more or less a copy from the net. I made this only to ensure that there is no misconfiguration in my server
The " #THIS!" was not from me.
Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183338 is a reply to message #183337] Sun, 20 October 2013 19:27 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
BUT COOL !!!!!
this was the solution !!!!!
It works

I change it the getfile.php. What is the source where i should add it ?
Re: Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183339 is a reply to message #183338] Sun, 20 October 2013 19:38 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Just post a patch, I'll commit it to the repository.
Aw: Re: Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183341 is a reply to message #183339] Sun, 20 October 2013 19:46 Go to previous messageGo to next message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
I not familar with patch ( I must read in it:))
but you see the change at the end of getfile.php


header("Content-Transfer-Encoding: binary\n");
<------>header('Connection: close');

<------>attach_inc_dl_count($id, $r[3]);

<------>// Disconnect DB to prevent long opens while data is transferred.
<------>db_close();

  ob_clean(); #THIS!
    flush();


<------>// Spool file to browser.
<------>readfile($r[2]);

Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183342 is a reply to message #183341] Sun, 20 October 2013 19:59 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Can you please try replace your two lines with
@ob_end_flush();

Just to verify it has the same effect before I commit it?
Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183394 is a reply to message #183342] Tue, 22 October 2013 07:15 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Patch committed at http://sourceforge.net/p/fudforum/code/5712/
Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Error with images after upgrade to 3.0.5 [message #183398 is a reply to message #183394] Tue, 22 October 2013 11:00 Go to previous message
Kabir is currently offline  Kabir   Germany
Messages: 29
Registered: September 2004
Karma: 0
Junior Member
Sorry, for the delay now I checked @ob_end_flush() also, but it not works for me. But simply ob_clean() works also without flush();
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Locking Forums in 3.0.5 makes perms 000
Next Topic: [3.0.5] bug with cyrillic subject from usenet
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 22 02:31:44 GMT 2024

Total time taken to generate the page: 0.04041 seconds