Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create account problem


grizzly

Recommended Posts

Create new account , enter all details click continue and get the following error:

 

Fatal error: Call to undefined function: tep_rand() in /usr/local/psa/home/vhosts/comicsnstuff.co.uk/httpdocs/comicstore/catalog/includes/functions/password_funcs.php on line 50

 

 

Anybody got any idea what this is.

 

Thanks.

Link to comment
Share on other sites

Create new account , enter all details click continue and get the following error:

 

Fatal error: Call to undefined function: tep_rand() in /usr/local/psa/home/vhosts/comicsnstuff.co.uk/httpdocs/comicstore/catalog/includes/functions/password_funcs.php on line 50

 

 

Anybody got any idea what this is.

 

Thanks.

 

Tep_rand is the last function in the file catalogincludesfunctionsgeneral.php, I would check and make sure that it is there and complete. (Should be around 1140 lines or so in the newer snapshots.)

 

btw...it's a random number generator (Just in case you didn't know)

 

Aodhan

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...

try adding this to the last of /catalog/includes/functions/general.php

////

// 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];

     }

   }



   return $tmp_array;

 }



////

// Return a random value

 function tep_rand($min = null, $max = null) {

   static $seeded;



   if (!isset($seeded)) {

     mt_srand((double)microtime()*1000000);

     $seeded = true;

   }



   if (isset($min) && isset($max)) {

     if ($min >= $max) {

       return $min;

     } else {

       return mt_rand($min, $max);

     }

   } else {

     return mt_rand();

   }

 }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...