Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OsCommerce deletes all!!


RJMS

Recommended Posts

When i delete 1 subcategory all is fine, when i delete 2 subcatagories it (oscommerce) decides to just delete all in my store, including all images stored in the html folder.

 

First warning i get is:

Warning: set_time_limit(): Cannot set time limit in safe mode in

/home/virtual/site6/fst/var/www/html/webwinkel/admin/includes/functions/general.php on line 733

Warning: Cannot modify header information - headers already sent by (output started at

/home/virtual/sitex/fst/var/www/html/webwinkel/admin/includes/functions/general.php:733) in

/home/virtual/sitex/fst/var/www/html/webwinkel/admin/includes/functions/general.php on line 18

 

Second warning i get is:

Warning: reset(): Passed variable is not an array or object in

/home/virtual/sitex/fst/var/www/html/webwinkel/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in

/home/virtual/sitex/fst/var/www/html/webwinkel/admin/includes/classes/object_info.php on line 18

 

Safe mode is turned off

 

PHP version + Zend:

PHP 4.3.2 (cgi), Copyright ? 1997-2003 The PHP Group

Zend Engine v1.3.0, Copyright ? 1998-2003 Zend Technologies

 

I have root access to this machine so can edit anything!!

 

Server is a RHEL3ES

kernel built: Linux 2.4.21-27.ELsmp i686 i686 i386 GNU/Linux

 

OsCommerce is a clean install.

Please help as this is a live shop !!

Link to comment
Share on other sites

could be a session problem. Try specifying mysql for the dbase store sessions in both

catalog\admin\includes\configure.php

catalog\includes\configure.php

 

like this:

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

Thing is, I have to use the back button because i get these errors, seeing the thread you posted GET REAL, you mean I have to make a backup then use the back button to right after it get the backup i just made ?

 

This is unbelievable, it's a known bug and no solution for it.

 

 

Just "not use the back button" is no solution.

 

By The Way, I've implemented the piece of code to it and magically it gives a parse error, guess what, i had to use the back button and BANG all categories gone again.

 

Any comments on a fix would be highly appreciated.

 

Ren?

 

could be a session problem. Try specifying mysql for the dbase store sessions in both

catalog\admin\includes\configure.php

catalog\includes\configure.php

 

like this:

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

 

I've set it like that, i tried, after i still get the error and all categories gone. (also from my mysql dbase)

Link to comment
Share on other sites

Ya the back button the session doesnt matter

 

Ill chock that up to a IE bug on how the back button works :angry:

 

 

I think it happens because of the multi post for delete confirmitaion.

 

//category 100

//category->delete 100

//category->delete->confirmation 100

//back

//category->delete (int)""

 

//since 100 doesnt exist anymore $category_id = 0

Link to comment
Share on other sites

Thing is, I have to use the back button because i get these errors, seeing the thread you posted GET REAL, you mean I have to make a backup then use the back button to right after it get the backup i just made ?

 

This is unbelievable, it's a known bug and no solution for it.

 

 

Just "not use the back button" is no solution.

 

By The Way, I've implemented the piece of code to it and magically it gives a parse error, guess what, i had to use the back button and BANG all categories gone again.

 

Do you know that osCommerce is a FREE program and that all of the

Contributions are at your own risk? Geez, people created this program

without any compensation and I am very grateful to have it.

 

If you are looking for a bug-free program, then you can probably

buy one. Or, you can fix the bugs yourself.

Link to comment
Share on other sites

Ya the back button the session doesnt matter

Ill chock that up to a IE bug on how the back button works

 

Ok, then check for the category if it is already present. Like:

 

  function tep_is_category($category_id) {
$category_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$category_id . "'");
return (tep_db_num_rows($category_query))?true:false;
 }

 

Then on admin\categories.php

	  case 'delete_category_confirm':
	if (isset($HTTP_POST_VARS['categories_id'])) {
	  $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

// check if category is present
	if( !$category_id || !tep_is_category($category_id) ) {
		tep_redirect(tep_href_link(FILENAME_CATEGORIES));
		break;
	}

// other code here

 

So it will redirect to categories.php without parameters when a category is not found.

Link to comment
Share on other sites

  • 3 weeks later...
Do you know that osCommerce is a FREE program and that all of the

Contributions are at your own risk? Geez, people created this program

without any compensation and I am very grateful to have it.

 

If you are looking for a bug-free program, then you can probably

buy one. Or, you can fix the bugs yourself.

 

 

Ok, so its free and its full of errors.. gee thanks. Here is a free chair, go ahead and sit on it and if its a broken piece of junk and you fall on your butt... its your fault?? I've already had to fix about 10 "bugs" in this piece of junk and I'm starting to get annoyed with the lack of craftsmanship.. have some pride in your work, yes even if its free.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...