Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is oscommerce corrupt?


rangermouse

Recommended Posts

Hi everyone,

If your installation of osCommerce is running fine, can you please tell me if line 1135 to line 1145 in the file "c:/...catalog/includes/functions/general.php"

look like this:

 

// Parse and secure the cPath parameter values

function tep_parse_category_path($cPath) {

// make sure the category IDs are integers

$cPath_array = array_map('tep_string_to_int', explode('_', $cPath));

 

// make sure no duplicate category IDs exist which could lock the server in a loop

$tmp_array = array();

$n = sizeof($cPath_array);

for ($i=0; $i<$n; $i++) {

if (!in_array($cPath_array[$i], $tmp_array)) {

$tmp_array[] = $cPath_array[$i];

 

 

????

 

I think there's one character missing or something. Where can I download oscommerce 2.2 the latest - from somewhere a mirror site and not www.oscommerce.com? I think the file is corrupt.

 

I'm having an "array_map" error in this file at that line, and that's the only place "array_map" is called.

Link to comment
Share on other sites

This post corrects the mistake above.

 

I meant the file "c:/...catalog/admin/includes/functions/general.php"

I meant line 1288 to line 1300, which follows:

 

 

 

////

// Parse and secure the cPath parameter values

function tep_parse_category_path($cPath) {

// make sure the category IDs are integers

$cPath_array = array_map('tep_string_to_int', explode('_', $cPath));

 

// make sure no duplicate category IDs exist which could lock the server in a loop

$tmp_array = array();

$n = sizeof($cPath_array);

for ($i=0; $i<$n; $i++) {

if (!in_array($cPath_array[$i], $tmp_array)) {

$tmp_array[] = $cPath_array[$i];

 

 

This is the file where the error message is being reported from, and not the previous file I mentioned in this post thread. There are 2 general.php files.

Link to comment
Share on other sites

The download of osC on this site isn't corrupt as far as I know. I've been using (what I believe is) the same downlaoded version for over a month now. The section you mentioned is identical in my file and working perfectly.

 

////
// Parse and secure the cPath parameter values
 function tep_parse_category_path($cPath) {
// make sure the category IDs are integers
   $cPath_array = array_map('tep_string_to_int', explode('_', $cPath));

// make sure no duplicate category IDs exist which could lock the server in a loop
   $tmp_array = array();
   $n = sizeof($cPath_array);
   for ($i=0; $i<$n; $i++) {
     if (!in_array($cPath_array[$i], $tmp_array)) {
       $tmp_array[] = $cPath_array[$i];

Link to comment
Share on other sites

Acheron,

Thanks for your post. When I click on the little yellow folder, I get that error msg.

"Array_map....undefined function....etc"

 

Was your file from the admin directory too?

 

I downloaded my copy of osCommerce from www.oscommerce.com. Is there a mirror site? The frustrating part is I've worked hard to get everything working as it should - and only one piece of the puzzle remains.

 

I need a beer. Help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...