Jump to content
Sign in to follow this  
wdfreshour

Fatal error: Cannot redeclare class usps

Recommended Posts

After retrieving the new USPSMethods_2.9_1.zip, I un-zipped it and installed it.

 

When trying to enter the shipping modules with the site OSC Admin, I get an error as follows;

 

Fatal error: Cannot redeclare class usps in /home/content/w/d/f/..../..../..../newsite/003/includes/modules/shipping/usps.php on line 14

 

I reviewed every files for proper installation and double checked everything a number of time...

 

 

Now when restoring my older version of the USPS Modules v2.7, I get the same error....

 

How do I correct this error or can some one tell what to look for?

 

 

Thanks

 

Walt

Share this post


Link to post
Share on other sites

I am a new-be in programming in PHP.

 

Could you help me out, in what I am looking for to remove....

 

 

Just remove the class declaration from usps.php

Share this post


Link to post
Share on other sites

The problem was resolved....

 

 

There was another file in the shipping directory that was setting the USPS Class before the actually USPS Module loaded.

Share this post


Link to post
Share on other sites
The problem was resolved....

There was another file in the shipping directory that was setting the USPS Class before the actually USPS Module loaded.

 

How exactly did you fix this problem. I got the same error.

Share this post


Link to post
Share on other sites

I had encountered the same issue after uploading modifications for the new USPS international shipping options (thread http://forums.oscommerce.com/index.php?showtopic=262873).

 

I received the error after I had renamed the original USPS module to usps_bak.php and uploaded my changes in a new USPS.php file. Like you, I got the error even after I restored my original.

 

The trick: move your original usps.php file out of that directory (or, create a copy in your backup location) and install your new usps.php file...now, you'll only have 1 file declaring the usps class (it may also work by changing the extension on the original file to something other than .php, but I didn't try that).

 

Hope that helps...good luck

aiyou

Share this post


Link to post
Share on other sites

If You do have two php files with the folder.

If they do have same class definition with in then this will happen,

 

either delete file or change file extension to .phpd

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×