Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot instantiate non-existent class


Guest

Recommended Posts

Been a while since I have worked in osc. A client that I had helped build a site for a good while back is now having an issue with the website. They have actually NEVER put any products in the store nor activated any products that I had originally loaded into the store. THIS IS CRAZY to me! They have pretty good traffic to their site and could benefit from the gift shop....but they are too lazy to actually make the store usable....UNTIL 1 YEAR LATER TODAY!

 

So they needed a refresher course on how to add items and manage items in the admin of osc...of course. Unfortunately, when I logged in to the admin and went to the catalog to edit a product that was deactivated I get the following error:

 

Fatal error: Cannot instantiate non-existent class: upload in /homepages/4/d332817391/htdocs/giftshop.cypressspringsprayercenter.com/osc/admin/categories.php on line 314

 

I searched the forum and Google for issues like this but no one seems to have any solid solutions posted. I had originally suspected that they may have updated either the PHP or the MySQL by mistake or maybe the web hosting service (1and1) had done so. My theory was that the osc (osCommerce 2.2-MS2) would need to be upgraded to support the newer versions of PHP and/or MySQL. However, I cannot see that either were updated. The hosting server still reads it is using PHP 4.4.9 and MySQL 5.0.92.

 

My second thought was that they had screwed something up on that particular file somehow. But when I uploaded my "old" categories.php" file to the server, nothing changed. I still get the same fatal error.

 

This seems like it should be something simple and I was shocked that I could not find a related topic on the forum anywhere. Can someone out there take a look? If you want to see the store you can view it here. I am also attaching a copy of the categories.php file. THANK YOU FOR ALL YOUR HELP...patiently waiting...

categories.php

Link to comment
Share on other sites

The class is included with this code in admin/includes/application_top.php:

// file uploading class
 require(DIR_WS_CLASSES . 'upload.php');

Check that the file has not been corrupted or replaced with the one from the catalog side.

 

2.2MS2 was obsolete more than a year ago and contains several known security vulnerabilities. It may very well have been hacked while it sat there not being used. If it was, you would be better off to junk it and replace it with 2.3.1. If you decide to keep it, you have a lot of work to do to make it safe to use. Read the Security forum for the updates that you need.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Okay. Not sure HOW it happened but the upload.php file was completely empty??? I went back to the original file and uploaded the original upload.php code to the server and everything is working properly. Anybody know what may have caused this? I suspect that they could have screwed it up somehow but it seems a little unusual. shifty.gif

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...