Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Massachusetts
    Posts
    156
    Plugin Contributions
    0

    Default Error on duplicate photo upload

    Running a new install of version 1.3.8 on LAMP (php 5.2.9, mysql 5.0.81community) and seeing the errors below when I try to upload a duplicate image. Permissions to the images folder are 777. Here are my error messages.

    Warning: move_uploaded_file(/home/reseller/public_html/zencart/images/categories/baseballjersey1.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/reseller/public_html/zencart/admin/includes/classes/upload.php on line 112

    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpZRfcGU' to '/home/reseller/public_html/zencart/images/categories/baseballjersey1.gif' in /home/reseller/public_html/zencart/admin/includes/classes/upload.php on line 112

    Warning: Cannot modify header information - headers already sent by (output started at /home/reseller/public_html/zencart/admin/includes/classes/upload.php:112) in /home/reseller/public_html/zencart/admin/includes/functions/general.php on line 21

    The error happens when I try to upload an image that has previously been uploaded. IMHO this should just give a warning that the image has already been uploaded and ask if it is the one that should be used. Hope to see this error trapped in a future release.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Error on duplicate photo upload

    The error is a result of how your webserver's filesystem is configured with respect to permissions, and that's outside the control of Zen Cart.

    However, a quick way to suppress the "Warning" messages is to make a tiny edit as shown below. The error will be shown as a messageStack alert across the top of the page instead, simply indicating that the upload failed.

    /includes/classes/upload.php
    around line 136, add the @ as shown:
    Code:
        if (@move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) {
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Option for customer to upload photo......
    By yourpartybanners.com in forum General Questions
    Replies: 4
    Last Post: 23 Oct 2009, 03:00 PM
  2. Upload a photo with progress bar?
    By joybrealey in forum General Questions
    Replies: 0
    Last Post: 22 Feb 2009, 11:12 PM
  3. Customer Photo Upload
    By liljami95 in forum General Questions
    Replies: 3
    Last Post: 26 Jul 2008, 07:11 PM
  4. Product Photo Upload Receiving Error
    By divaboutiques in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 May 2007, 05:51 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