Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Posts
    20
    Plugin Contributions
    0

    Firefox Downloads don't show file name

    In both 1.25 and my upgrade to 1.35, when I right-click on a download link and click Save Link As in Firefox, the Save As dialog box that appears shows "Index.php" as the default name in the Name box. It isn't picking up the .pdf filename. However, in IE6 the link shows up correctly.

    Has anyone else experienced this and better yet, no a way to get Firefox to display the pdf file name as the default?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Firefox Downloads don't show file name

    Do you have /pub set to 777

    How large are the download files?

    Do small download files work?

    Do you have Redirect turned on in the Configuration ... Attribute Settings ...

    Are you on a unix or windows server?

    NOTE: windows servers should have this turned OFF

    If on unix, and you turn this OFF does it work?

    If so, check with your hosting site about the .htaccess and why it is not handling the .htaccess file:
    #prevent directory browsing -- for security
    IndexIgnore */*

    Options +FollowSymLinks -Indexes
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2005
    Posts
    20
    Plugin Contributions
    0

    Re: Firefox Downloads don't show file name

    I don't think I explained the problem properly. For the past year I've been able to download files on both Firefox and IE, it's only that the *name* of the file in the Save Link As box in Firefox appears as "index.php" each time. If I continue to download I get my .pdf file downloaded but saved as "index.php" IE picks up the correct name of the file automatically, not Firefox. I'm looking for a way to get Firefox to see the name in addition to its current ability to download the correct file. There is apparently a difference in the way IE and Firefox pick up a download file's file name, so I'm thinking perhaps Firefox needs the name placed in a different variable or something? More:

    Do you have /pub set to 777 YES (I_USR with read/write)

    How large are the download files? LARGE 18-95 MB

    Do small download files work? ALL DOWNLOADS WORK, JUST THE NAME IS WRONG.

    Do you have Redirect turned on in the Configuration ... Attribute Settings ... YES

    Are you on a unix or windows server? WINDOWS 2003 SERVER

    NOTE: windows servers should have this turned OFF IT'S BEEN WORKING GREAT FOR OVER A YEAR, WANT TO KEEP USING REDIRECT.

    This is the code in header_php.php that works in 1.25 and now works in 1.35 (the name problem in Firefox occurs with this code running in either version):

    // Now send the file with header() magic
    header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
    header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    header("Content-Type: Application/octet-stream");
    header("Content-disposition: attachment; filename=" . $downloads->fields['orders_products_filename']);
    $zv_filesize = filesize(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']);

    if (DOWNLOAD_BY_REDIRECT == 'true') {
    // This will work only on Unix/Linux hosts
    zen_unlink_temp_dir(DIR_FS_DOWNLOAD_PUBLIC);
    $tempdir = zen_random_name();
    umask(0000);
    mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);
    copy(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads->fields['orders_products_filename']);
    zen_redirect(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads->fields['orders_products_filename']);
    } else {
    // This will work on all systems, but will need considerable resources
    // We could also loop with fread($fp, 4096) to save memory
    header("Content-Length: " . $zv_filesize);
    readfile(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']);
    }

  4. #4
    Join Date
    Jun 2005
    Posts
    20
    Plugin Contributions
    0

    Re: Firefox Downloads don't show file name

    I should add (Windows server people might want to know this), that a year ago some one posted here a one-line "fix" to the REDIRECT that enabled it to run on Windows 2003 Server. In the modified 1.25 code shown in the previous e-mail, the line that reads

    copy(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads->fields['orders_products_filename']);

    is the only changed from the native 1.25 code whose line reads

    symlink(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads->fields['orders_products_filename']);

    Changing from symlink to copy has enabled it to work for me, other than the name issue.

 

 

Similar Threads

  1. Replies: 55
    Last Post: 31 Oct 2010, 04:09 PM
  2. Downloads don't seem to be working (v1.3.0.2)
    By julieintn in forum General Questions
    Replies: 3
    Last Post: 3 Feb 2009, 07:21 PM
  3. Categories don't show on admin, product don't show on site
    By bigjoed in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 24 Jul 2008, 08:30 PM
  4. links don't work in firefox
    By surfstu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Jun 2006, 05:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR