Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strange Problem With Tep_encrypt_password Function


jeniferm

Recommended Posts

Posted

I have a very strange issue... I've been working to get our store configured and running and things were going smoothly until earlier today when my storefront when blank on me. No error messages display on screen and no error messages appear in my log files.

 

So, I started inserting echo "got here" in various places in order to walk through an find where it's failing. I've tracked it to the tep_encrypt_password function in the catalog/includes/functions/password_funcs.php page. I have this:

 

 

echo "GOT HERE in password_funcs.php page";

// This function makes a new password from a plaintext password. 
 function tep_encrypt_password($plain) {
$password = '';

for ($i=0; $i<10; $i++) {
  $password .= tep_rand();
}

$salt = substr(md5($password), 0, 2);

$password = md5($salt . $plain) . ':' . $salt;

return $password;
 }
echo "GOT HERE 2 in password_funcs.php page";
exit;

 

When I run the page, I see that first echo statement, but I don't see the second. Even if I remove the first statement and leave the second along with that exit at the end, I never see the second statement echo to the screen.

 

So, what in the world would be keeping that function from loading? It's not being called, it's just being declared.

 

I'm at a loss,

 

Jenifer

Posted

Put these lines in your catalog/.htaccess file and get more details about the error.

 

php_flag display_errors on
php_value error_reporting 7

Posted
Put these lines in your catalog/.htaccess file and get more details about the error.

 

php_flag display_errors on
php_value error_reporting 7

 

 

Aha! There's the error. It turns out that one of the contributions installed its own version of that function in a different file and then complained because it couldn't redeclare it. All fixed.

 

Thanks!

 

Jenifer

Archived

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

×
×
  • Create New...