Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: on Product creation


Guest

Recommended Posts

Posted

Fatal error: Cannot instantiate non-existent class: upload in /var/www/html/admin/categories.php on line 492

 

i am getting this when ever i try and update or add a new product.

anyone have any idea ?

 

running on linux RH9.0 with all current patches for Apache, and php

Posted
Fatal error: Cannot instantiate non-existent class: upload in /var/www/html/admin/categories.php on line 492

 

i am getting this when ever i try and update or add a new product.

anyone have any idea ?

 

running on linux RH9.0 with all current patches for Apache, and php

 

I am getting this same error only it's on line 524 of categories.php around this code :

 

// copy image only if modified

if ($products_image = new upload('products_image', DIR_FS_CATALOG_IMAGES)) {

$products_image_name = $products_image->filename;

} else {

$products_image_name = $HTTP_POST_VARS['products_previous_image'];

}

 

// copy medium image only if modified

if ( ($products_mediumimage != 'none') && ($products_mediumimage != '') ) {

$mimage_location = DIR_FS_CATALOG_IMAGES . $products_mediumimage_name;

if (file_exists($mimage_location)) @unlink($mimage_location);

copy($products_mediumimage, $mimage_location);

} else {

$products_mediumimage_name = $HTTP_POST_VARS['products_previous_mimage'];

}

 

// copy big image only if modified

if ( ($products_largeimage != 'none') && ($products_largeimage != '') ) {

$largeimage_location = DIR_FS_CATALOG_IMAGES . $products_largeimage_name;

if (file_exists($largeimage_location)) @unlink($largeimage_location);

copy($products_largeimage, $largeimage_location);

} else {

$products_largeimage_name = $HTTP_POST_VARS['products_previous_largeimage'];

}

 

My suspicion is the call to the upload method. This is a modified categories.php that came from the small, medium, large image contribution so it is modified. Unfortunately my PHP skills are non existent so I am not having much luck figuring out what's causing it an fixing it.

Posted

the only contributions i have installed are, header tags, admin login, and all prods. i realy dont think any of thoes should change anything to give that kind of error.

 

i am getting more then just that error but they are all about the same thing, different lines in catagories.php and what not..

  • 1 month later...
Posted

Im looking on the boards for a fix also:

Im getting a [ Fatal error: Cannot instantiate non-existent class: upload] line 483

 

I installed contribution Category Descriptions MS2 1.4

 

2 days working on it and still no clue.

 

 

the code is:

// copy image only if modified

$categories_image = new upload('categories_image');

$categories_image->set_destination(DIR_FS_CATALOG_IMAGES);

if ($categories_image->parse() && $categories_image->save()) {

$categories_image_name = $categories_image->filename;

} else {

$categories_image_name = $HTTP_POST_VARS['categories_previous_image'];

}

No man can tell the God what to do.

Archived

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

×
×
  • Create New...