Jump to content

[PrestaShopDatabaseException] after Migration


Recommended Posts

I am migrating my site to a different hosting service.

 

After the move I am running into the following error error. I have checked for the "shop_url" table, it is there. ˇhen I deleted the table and reuploaded a fresh copy from the currently operating version, same error.

 

I have the feeling it has to do with the tables in my database have the prefix "ps_"  would this make a difference? If so, how do I fix it?

Thanks in advance!

Here's the error. 

- - - - - - - - - - - - - - - - - - - - - - - - - 

Notice: Undefined index: database_prefix in /home/mysite/public_html/config/bootstrap.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/config/bootstrap.php:106) in /home/mysite/public_html/classes/exception/PrestaShopException.php on line 41

[PrestaShopDatabaseException]

Table 'mysite_presta.shop_url' doesn't exist
 

SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
                    FROM shop_url su
                    LEFT JOIN shop s ON (s.id_shop = su.id_shop)
                    WHERE (su.domain = '162.241.177.228' OR su.domain_ssl = '162.241.177.228')
                        AND s.active = 1
                        AND s.deleted = 0
                    ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC

at line 746 in file classes/db/Db.php

 

741.         if ($webservice_call && $errno) {
742.             $dbg = debug_backtrace();
743.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
744.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
745.             if ($sql) {
746.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
747.             }
748. 
749.             throw new PrestaShopDatabaseException($this->getMsgError());
750.         }
751.     }
  • DbCore->displayError - [line 378 - classes/db/Db.php] - [1 Arguments]
    Argument [0]
    SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
                        FROM shop_url su
                        LEFT JOIN shop s ON (s.id_shop = su.id_shop)
                        WHERE (su.domain = '162.241.177.228' OR su.domain_ssl = '162.241.177.228')
                            AND s.active = 1
                            AND s.deleted = 0
                        ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC
    
  • DbCore->query - [line 597 - classes/db/Db.php] - [1 Arguments]
    Argument [0]
    SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
                        FROM shop_url su
                        LEFT JOIN shop s ON (s.id_shop = su.id_shop)
                        WHERE (su.domain = '162.241.177.228' OR su.domain_ssl = '162.241.177.228')
                            AND s.active = 1
                            AND s.deleted = 0
                        ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC
    
  • DbCore->executeS - [line 344 - classes/shop/Shop.php] - [1 Arguments]
    Argument [0]
    SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
                        FROM shop_url su
                        LEFT JOIN shop s ON (s.id_shop = su.id_shop)
                        WHERE (su.domain = '162.241.177.228' OR su.domain_ssl = '162.241.177.228')
                            AND s.active = 1
                            AND s.deleted = 0
                        ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC
    
  • ShopCore::initialize - [line 119 - config/config.inc.php]
    114. 
    115. $context = Context::getContext();
    116. 
    117. /* Initialize the current Shop */
    118. try {
    119.     $context->shop = Shop::initialize();
    120. } catch (PrestaShopException $e) {
    121.     $e->displayMessage();
    122. }
    123. define('_THEME_NAME_', $context->shop->theme->getName());
    124. define('_PARENT_THEME_NAME_', $context->shop->theme->get('parent') ?: '');
    
  • require - [line 27 - index.php] - [1 Arguments]
    Argument [0]
    /home/mysite/public_html/config/config.inc.php
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...