In my previous posts i have explained how to install oscommerce and how to configure in server. Recently one of my friend installed php 5.3 version in his system , and working on oscommerce project. When he trying to run the application he got some fatal errors. I want to discuss some of them and how rectify it.
1) Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\sportstrack\catalog\includes\classes\language.php
To overcome this error :
in language.php at line number:90 Add this line
if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
$this->language = $this->catalog_languages[$key];
$this->language = $this->catalog_languages[$key];
Mostly we forget the passwords after few days, same thing happen in this application also. I forgot the oscommerce admin password and run this application in localhost.
In oscommerce password function:
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;
}
$password = '';
for ($i=0; $i<10; $i++) {
$password .= tep_rand();
}
$salt = substr(md5($password), 0, 2);
$password = md5($salt . $plain) . ':' . $salt;
return $password;
}
So, overcome this type issue solution is :
Go to phpmyadmin ( http://localhost/phpmyadmin/)
- Select particular database ( eg: oscommerceshop)
- Select table administrator and select user and click on edit button
- Next leave the username as same and in the password section change the text as below
e421ac4e5b569e41d4105f84396fa739:92
Its denotes password is : admin
Once login with using details and later we can change your own password.