Author Topic: Canīt read file header / Kann Dateiheader nicht lesen  (Read 14082 times)

0 Members and 1 Guest are viewing this topic.

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Canīt read file header / Kann Dateiheader nicht lesen
« on: March 31, 2005, 10:19:11 PM »
Hi,

I have a problem with downloading the images. When I save them everything is ok, but when I want to open it directly it does not work and I get the error message "canīt read file header". There was a thread about it in the old forum, but I cant find anything about it.

http://www.wallpaperarea.com/wallpaper/details.php?image_id=143&sessionid=e31062f0fea69f17f887d711ebab8ef5

Any solution ?????

----------------------------------

Have a nice Day

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #1 on: March 31, 2005, 10:35:53 PM »
are u sure it wasnt "Can't read file .header" ? if so, thats something wrong with your host...perhaps they have antilieech feature?


P.S. and I think I'm not quet understand your question either...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #2 on: April 05, 2005, 10:25:25 AM »
Hi V@no

You did not understand the question ???? Iīll try it again :|

When I want to download an image from my website my browser gives me two options, either to download it to my computer or to opten it directly.

- When I  download the image to my computer first and open it, it works perfectly - e.g. with I.E. or a program like Irfan View or Photoshop.

- When I try to open it directly it does not work - I tried photoshop, irfanview and also I.E as a standard-opening-program for jpg-files.  It seems as if the image is downloading but then I get an Error Message.

This happens only when I use Internet Explorer, with Firefox there is no problem. When I try to open an image directly e.g. from your website it works without a problem, also with I.E. ..... :cry:


----------------------------------

Have a nice Day

Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
For support requests please donīt forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #4 on: April 06, 2005, 05:20:10 AM »
that's IE issue, when its cache getting full it does not keep new downloaded files, and removes them as soon as its downloaded (unless u save them). Try clean up your cache files and increase IE cache size (not recomended)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #5 on: April 06, 2005, 10:40:57 AM »
@V@no, no that wasnīt it  :(. And again it says: Can't read file header, Unknown image format........
----------------------------------

Have a nice Day

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #6 on: April 07, 2005, 06:51:05 PM »
@V@no

can you (or anyone else) directly open the image with your IE (link in my first posting) ? 
----------------------------------

Have a nice Day

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #7 on: April 08, 2005, 12:45:22 AM »
tell u what. First check if its the same issue with a fresh 4images. If it works fine, then there is something wrong with your download.php (or whatever), perhaps after changing it to allow download different image sizes...If it still doesnt want open image, then we'll go from there.


P.S. for me it opens a .gif file with a wierd name ,,_C`M]ZVJ1LR4,ZBH1AVV[1].gif :
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #8 on: April 08, 2005, 05:20:12 PM »
Hi v@no,

I tried it with a fresh version, with a new database and also on two different servers from two different providers and it does same thing from the beginning without modifying it in any way. That means that it is no problem of any mod. It has to be a general problem and I am sure that there was a solution for it in the old forum because I had the same problem earlier when I tested 4images and I found a solution for it here.

I thought about another thing but I dont know if this works. Is it possible to change the script in a way, that when I click on a download-button the jpg-file opens in a new browser window so that the user can directly load it to his desktop (as it is on many wallpaper-sites)???

What I mean is:
-click on 1024x768 Button = _1024.jpg opens in new browser window
-click on 1152x864 Button = _1152.jpg opens in new browser window
and so on....

...... :?: :?: :?:



----------------------------------

Have a nice Day

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #9 on: April 09, 2005, 01:00:46 AM »
what u discribed is simply redirect directly to the image file...not a good idea, but its possible....
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #10 on: April 09, 2005, 01:59:50 AM »
Tja, but it seems as if there is no other solution..... :(

And why is this no good idea ?
How can I do "simply" redirect to the image file ?
----------------------------------

Have a nice Day

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #11 on: April 09, 2005, 02:02:57 AM »
Tja, but it seems as if there is no other solution..... :(

And why is this no good idea ?
How can I do "simply" redirect to the image file ?

because of possibility hotlinking to your images.

u could try change in download.php:
Code: [Select]
  if (get_user_os() == "MAC") {
    header("Content-Type: application/x-unknown\n");
header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
  }
  elseif (get_browser_info() == "MSIE") {
    $disposition = (!eregi("\.zip$", $file['file_name']) && $action != "zip" && $action != "lightbox") ? 'attachment' : 'inline';
    header("Content-Disposition: $disposition; filename=\"".$file['file_name']."\"\n");
    header("Content-Type: application/x-ms-download\n");
  }
  elseif (get_browser_info() == "OPERA") {
    header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
    header("Content-Type: application/octetstream\n");
  }
  else {
    header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
    header("Content-Type: application/octet-stream\n");
  }
  header("Content-Length: ".$file['file_size']."\n\n");
  echo $file['file_data'];
to this:
Code: [Select]
  if (($ext = strtolower(substr(strrchr($file['file_name'],"."), 1))) != "zip")
  {
    header("Location: ".$file['file_path']);
  }
  else
  {
    if (get_user_os() == "MAC") {
      header("Content-Type: application/x-unknown\n");
      header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
    }
    elseif (get_browser_info() == "MSIE") {
      $disposition = (!eregi("\.zip$", $file['file_name']) && $action != "zip" && $action != "lightbox") ? 'attachment' : 'inline';
      header("Content-Disposition: $disposition; filename=\"".$file['file_name']."\"\n");
      header("Content-Type: application/x-ms-download\n");
    }
    elseif (get_browser_info() == "OPERA") {
      header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
      header("Content-Type: application/octetstream\n");
    }
    else {
      header("Content-Disposition: attachment; filename=\"".$file['file_name']."\"\n");
      header("Content-Type: application/octet-stream\n");
    }
    header("Content-Length: ".$file['file_size']."\n\n");
    echo $file['file_data'];
  }
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #12 on: April 09, 2005, 11:30:12 AM »
@v@no

thanks a lot.
It is not the solution that I wanted but it is ok and for the users very comfortable.
I will see if I cannot stop the hotlinking with a .htaccess file.  :twisted:



----------------------------------

Have a nice Day

Offline Phenoh

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #13 on: November 10, 2005, 03:20:14 AM »
Hello
I have the same Problem. Is there really no way to change this behavior of the download.php? While downloading any file
with "open" the Fileheader seems to be destroyed. So all the associated Programs are saying.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Canīt read file header / Kann Dateiheader nicht lesen
« Reply #14 on: November 10, 2005, 05:18:08 AM »
Its not problem with 4images, its IE browser's bug.

This discussion is related to your issue. Try to follow it:
http://www.4homepages.de/forum/index.php?topic=6997.msg50233#msg50233
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)