Thread: usps.php error

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default usps.php error

    I am running 1.3.7

    I installed the new usps.php file to correct the shipping problems and now I get the following error:

    Fatal error: Cannot redeclare class usps in /home/skycandl/public_html/includes/modules/shipping/usps.php on line 13

    This is the code:
    PHP Code:
    <?php
    /**
     * @package shippingMethod
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0
     * @version $Id: usps.php 6474 2007-11-18 15:59:32Z ajeh $
     */
    /**
     * USPS Shipping Module class
     *
     */
    class usps extends base {
      
    /**
       * Declare shipping module alias code
       *
       * @var string
       */
      
    var $code;
    I've tried changing class usps extends base { to class usps { but that didn't fix anything. I had uninstalled the module before installing the new file and I deleted the old file before uploading the new one.

    Any help would be greatly appreciated.

    Thank you,
    Last edited by GERob; 20 Nov 2007 at 08:24 PM.

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: usps.php error

    you must totally rename the OLD usps.php file to something like usps.phpOLD

    thisway the system dosnt try to readi it since these files auto load
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: usps.php error

    Quote Originally Posted by Merlinpa1969 View Post
    you must totally rename the OLD usps.php file to something like usps.phpOLD

    thisway the system dosnt try to readi it since these files auto load

    I didn't rename the old file, I deleted it completely then uploaded the new file.

    Permissions on the file are 0644

  4. #4
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: usps.php error

    Additional information:

    I'm also missing the right hand column on the admin/modules/shipping that has the options to install/edit/remove.

    It's present on all other pages.

  5. #5
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: usps.php error

    do you have a copy of the usps .php in an over rides folder?
    Zen cart PCI compliant Hosting

  6. #6
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: usps.php error

    Quote Originally Posted by Merlinpa1969 View Post
    do you have a copy of the usps .php in an over rides folder?
    No, the only usps.php files on my server are:
    includes/modules/shipping/usps.php
    includes/language/english/modules/shipping/usps.php

    And the only one I changed was the first one.

  7. #7
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: usps.php error

    What did you use to upload the files? Perhaps they were corrupted during the upload?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  8. #8
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: usps.php error

    I've re-uploaded three times with three different programs, the builtin one in cPanel, CyberDuck and in place editing.

    All have the same error.

  9. #9
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: usps.php error

    Fatal error: Cannot redeclare class usps in /home/skycandl/public_html/includes/modules/shipping/usps.php on line 13

    tells me that its declaring the class somewhere ELSE first,

    try renaming the file you uploaded to includes/modules/shipping/usps.php to usps.phpOLD

    see if you can still see the module

    Humor me on this one
    Zen cart PCI compliant Hosting

  10. #10
    Join Date
    Dec 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: usps.php error

    Renamed file to usps.phpOLD

    The error goes away.... and the right hand column comes back, but there is no option for usps shipping to choose.

    I've even tried replacing the original file back and I still get the error.

    Oh, and I've not made any custom changes to the site other than graphics.

    I agree it seems like it's declaring it else where, I just don't know where?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 PHP Fatal error Call-time pass-by-reference - tpl_yahootreemenu.php
    By RubenZ in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 6 Feb 2015, 05:24 PM
  2. v151 New usps module says "ERROR missing saveusps.php"
    By linniedarling in forum Addon Shipping Modules
    Replies: 2
    Last Post: 23 Mar 2014, 02:33 PM
  3. Debug: USPS.php PHP Warning: Invalid argument supplied for foreach()
    By divinelighting in forum Addon Shipping Modules
    Replies: 2
    Last Post: 11 Jun 2011, 03:17 AM
  4. Replies: 3
    Last Post: 13 Mar 2009, 05:20 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