Jump to content

Fatal error: Call to undefined method Db::getInstance()


Recommended Posts

Hi all,

 

I am new to prestashop and I have encountered an error just after installing.

 

By configuring and installing presta had caused no problem and successfully finished.

 

After trying to reach to main page and admin site, I get a blank page.

 

After searching on the net a bit, I found what caused it. It is because of Turkish language.

 

There are two approaches which work by the way but I am not sure which is preferrable and must be done.

 

That is why I need your help on it.

 

I share both solution and please let me know which is needed to be done.

 

Error is:

Fatal error: Call to undefined method Db::getInstance() in /****/******/public_html/classes/shop/ShopUrl.php on line 165

One solution is:

From config/config.inc.php file

Change the following line
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY'));


With this line
$locale = 'tr_tr';

Another solution is:

Change the line
setlocale(LC_CTYPE, $locale.'.UTF-8', $locale.'.utf8');

as
//setlocale(LC_CTYPE, $locale.'.UTF-8', $locale.'.utf8');
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...