Uncaught exception thrown after moving my website to localhost My website works right on server, I took a backup from database and public_html in order to have a copy of my webstie in localhost.

I imported the database but it reported an error, some thing was wrong with content of  cache_views table, so I emptied this table and database successfully imported. I replaced public_html with the old one and configured settings.php. but it doesn't work, it reports this error :

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = &amp;#039;default&amp;#039;; Array ( [:language] =&amp;gt; fa [:source] =&amp;gt; Makes the view results available as a context for use in Panels and other applications. [:context] =&amp;gt; ) in locale() (line 684 of C:\xampp\htdocs\test\modules\locale\locale.module).


Additional:

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] =&amp;gt; 0 [:db_insert_placeholder_1] =&amp;gt; php [:db_insert_placeholder_2] =&amp;gt; %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] =&amp;gt; a:6:{s:5:&amp;quot;%type&amp;quot;;s:12:&amp;quot;PDOException&amp;quot;;s:8:&amp;quot;!message&amp;quot;;s:455:&amp;quot;SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = &amp;amp;#039;default&amp;amp;#039;; Array ( [:language] =&amp;amp;gt; fa [:source] =&amp;amp;gt; Makes the view results available as a context for use in Panels and other applications. [:context] =&amp;amp;gt; ) &amp;quot;;s:9:&amp;quot;%function&amp;quot;;s:8:&amp;quot;locale()&amp;quot;;s:5:&amp;quot;%file&amp;quot;;s:52:&amp;quot;C:\xampp\htdocs\test\modules\locale\locale.module&amp;quot;;s:5:&amp;quot;%line&amp;quot;;i:684;s:14:&amp;quot;severity_level&amp;quot;;i:3;} [:db_insert_placeholder_4] =&amp;gt; 3 [:db_insert_placeholder_5] =&amp;gt; [:db_insert_placeholder_6] =&amp;gt; h t t p://localhost:81/test/ [:db_insert_placeholder_7] =&amp;gt; [:db_insert_placeholder_8] =&amp;gt; 127.0.0.1 [:db_insert_placeholder_9] =&amp;gt; 1389935326 ) in dblog_watchdog() (line 154 of C:\xampp\htdocs\test\modules\dblog\dblog.module).
I solved the problem this way: set max_allowed_packet = 4M to the file php.ini