Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default File Upload over 10mb directs to 404 not Found

    Hello,
    I am using ZC V1.5.0, PHP version 5.4.39, database patch level 1.5.0, Linux server.

    I am having an issue with a couple customers where if they try to upload files larger than 10mb (which is rare but it does happen) that they get sent to a 404 page not found after clicking "Add to Cart". I do have my errors set for if the upload fails to display "image not uploaded" and so on. I checked with my host (1and1) and they have a 40mb limit on file uploads. I am not really sure where to go from here. Please let me know if you can help or if you need any more information from me about my site.

    Thanks,
    Justin

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: File Upload over 10mb directs to 404 not Found

    go to you ZenCart admin > tools > server/version info

    Close to the top you should see - "PHP File Uploads: On Max Size: 2M"

    See what you find - I bet not 40M - ask them if you can use a custom php.ini file and if so change this value in it
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: File Upload over 10mb directs to 404 not Found

    Are the customers actually receiving a HTTP 404 (from the server) or are the customer's browsers requests timing out (due to the upload taking too long)?

  4. #4
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default Re: File Upload over 10mb directs to 404 not Found

    Thanks for the quick replies, here is the server info from my admin page:


    Server OS: Linux 3.2.65-grsec-infong-14351 Database: MySQL 5.1.73-log
    Server Date: 05/12/2015 09:31:24 Database Date: 05/12/2015 09:31:24
    Server Up Time: HTTP Server: Apache
    PHP Version: 5.4.39 (Zend: 2.4.0) PHP Memory Limit: 120M PHP Safe Mode: Off
    PHP File Uploads: On Max Size: 40M POST Max Size: 8M
    Database Data Size: 1,130 kB Database Index Size: 603 kB

    I had not considered the timeout of the browser? If that is the issue how would I know that is the cause and is there a fix for it?

    Justin

  5. #5
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default Re: File Upload over 10mb directs to 404 not Found

    Also meant to say I have been testing myself and receiving my 404 not found zencart page when uploading large files and it is redirecting in less than a minute. Those files never successfully upload to my server either.

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: File Upload over 10mb directs to 404 not Found

    Post max size (all data sent via the POST including files) should be > upload size (max size of uploaded files).

  7. #7
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default Re: File Upload over 10mb directs to 404 not Found

    Thanks, Ya once i saw that in the server info I thought that might be limiting it. I'll talk to my host and see if I am able to increase the post max size

  8. #8
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default Re: File Upload over 10mb directs to 404 not Found

    So for now I have set my max upload file size on the zencart admin to 8mb but my question now is if i try uploading a larger file than 8mb why is it going to this 404 not found instead of an error message saying "your file is too large"?

  9. #9
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: File Upload over 10mb directs to 404 not Found

    Quote Originally Posted by PHP manual
    ...
    post_max_size integer
    Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. ...
    One must set post_max_size > upload_max_filesize. This is a PHP configuration which needs to be in place before uploads will work correctly / as expected. The POST needs space to accommodate all information sent via POST including: product id, attribute, quantity, all uploaded files in the same form, etc (all these must fit inside post_max_size).

    Fixing this is critical if you want to allow larger uploaded files via PHP.


    Note: Some HTTP(S) daemons also limit the post size (so the hosting provider may need to the configuration of these as well to ensure end users can upload larger files).

    Quote Originally Posted by Justin G
    ... I am using ZC V1.5.0, PHP version 5.4.39 ...
    Note: Zen Cart 1.5.0 is past End of Life (reached on 19 March 2013). Zen Cart 1.5.0 is not fully compatible with PHP 5.4 out-of-box.

    While this may not be the cause of the issue in the first post, I would take action on this item quickly.

    I would ask the host to temporarily downgrade to PHP 5.3. Afterwards I would start rebuilding / upgrading the store to the current version of Zen Cart. When done with the rebuild / upgrade (and deployment of the next version), have the host switch back to PHP 5.4+.

    New versions also include bugfixes, enhancements, compatibility fixes, security patches, etc. Always better to upgrade on your timetable, before things break and customers get upset.


    Note: Many here recommend only installing Zen Cart from the distribution available from zen-cart.com. While third party "repackages" and "installers" (such as softaculous) work, the Zen Cart code in third party distributions may contain modifications. And unless you know EVERY way the third party version differs from the stock version available on zen-cart.com, it will be more difficult to obtain help here on the Zen Cart forums.

    Quote Originally Posted by Justin G
    ... I do have my errors set for if the upload fails to display "image not uploaded" ...
    I am not aware of this option in a stock Zen Cart installation... When testing, a stock Zen Cart installation will just silently continue when the upload fails (w/o adding the attribute or issuing a 404).

    Where are you setting this option? Have you installed a 3rd party Zen Cart module (or modified the add to cart process)? Was the store upgraded from a previous version of Zen Cart? How does the store differ from a stock version of Zen Cart 1.5.0? What is the URL displayed in the browser window? What does FireBug (or other developer tools) show as the HTTP status / code?


    Note: I am unable to duplicate the issue in the first post under a stock installation of Zen Cart 1.5.0, 1.5.1, or 1.5.4 (Server: Linux 3.2, PHP 5.4.39, MySQL 5.5.41).
    Last edited by lhungil; 12 May 2015 at 08:27 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  10. #10
    Join Date
    May 2014
    Location
    Pittsburgh
    Posts
    10
    Plugin Contributions
    0

    Default Re: File Upload over 10mb directs to 404 not Found

    Thanks for all your help and info on my issue. If this helps to view my site and recreate the error our url is www.pogoheads.com

    So I guess I will have to contact my host to change my php.ini settings to get the correct allowances on the max sizes

    Ya I know I should upgrade, even though I am the web designer behind this site it is not my only job at my company so finding time is difficult.

    When I was referring to having my errors set for an upload fail I just meant I defined the message to be displayed "define('ERROR_FILE_TOO_BIG', 'Warning: File was too large to upload!<br />Order can be placed but please contact the site for help with upload');"

    I have only added a few modules - Paytrace payment module (which we are actually no longer using, now on authorize.net), I can't remember if UPS was included or not but that may be one I installed, and one called Customer Uploaded Files - List and Download which just created a menu in my admin area so our CSR can download images easily since most of them don't like/understand ftp clients for downloading. All the files for the last one were all installed in only my admin folder.

    V1.5.0 was the initial install of ZC and I have never upgraded from that.

    My template started with Sheffield Blue from www.picaflor-azul.com. With this as my starting point I have only had trouble with some javascript competing with the image slider on the home page. Which I removed any new javascript because of that.

    Other than those I have mainly changed the CSS and added a few pieces of html to the product pages, home page, and the checkout pages.

    The URL before the upload takes place is https://www.pogoheads.com/index.php?...roducts_id=188 (this is just one of the products but it occurs on all of them)

    After trying to add to cart with a large file in the upload I get sent to https://www.pogoheads.com/index.php?...page_not_found

    On Firebug I have two request while adding to cart: POST: Status 302 moved temporarily and GET 404 not found

    Justin

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 HTTP 404 - File not found
    By CDsDirect in forum General Questions
    Replies: 2
    Last Post: 2 May 2013, 02:02 PM
  2. File Not Found - HTTP 404
    By Seante in forum General Questions
    Replies: 6
    Last Post: 24 Oct 2008, 06:32 PM
  3. Replies: 2
    Last Post: 26 Sep 2008, 03:33 PM
  4. Anything over 10MB not downloading
    By austy25 in forum Setting Up Categories, Products, Attributes
    Replies: 29
    Last Post: 10 Nov 2007, 05:37 PM

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