Post by andrewhayes » Tue Aug 06, 2019 3:19 am

Hello,

I have moved my OpenCart store to a different host (by restoring CPanel backups - home directory, MySQL database, email forwarders), changed my config.php accordingly, and everything seemed to work normally on the front-end. However, I am experiencing some major issues that affect crucial parts of the store.

First off, whenever I try to log in to the admin panel I receive the following message (as a javascript 'alert' popup):

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
Followed by the raw HTML code of the admin login page:

Code: Select all

<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="UTF-8" />
<title>Administration</title>
<base href="https://[MY STORE URL]/admin/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
... etc
When I am trying to move around between different sections of the admin control panel I am constatly getting logged out, and receive the same error upon logging back in.

Moreover, user login and checkout are also broken. I can add products to the shopping cart as a guest and proceed to the checkout page, everything appears to be working, however when I put in registration details and press the checkout button, nothing happens (it is supposed to be redirecting to PayPal, as it does on my old host). I am using Journal 2 as my theme, which uses javascript to handle such buttons, so it shows no errors at all.

When I log in to my user account (as a customer) it only works for one page. If I move anywhere else on the website my account is getting logged out.

Based on the fact that I am unable to stay logged in my presumption is that the aforementioned issues have something to do with cookies.

Is there any way to resolve this?

I use OpenCart 2.3.0.2, and MariaDB 10.2.25-MariaDB-cll-lve - MariaDB Server (it differs from the initial host, which shows MySQL 5.6.45-cll-lve - MySQL Community Server (GPL)).

Newbie

Posts

Joined
Tue Aug 06, 2019 2:58 am

Post by wrick0 » Wed Aug 07, 2019 9:04 pm

Are you sure the path defines in the config files are correct and pointing to the right folders?

Did you clear your cache files from ?

/storage/cache/
/storage/cache/lightning/ (if u use lightning cache)
/root/vqmod/vqcache/

renamed
/root/vqmod/checked.cache
/root/vqmod/mods.cache

Importing a cpanel backup into your new server isnt the correct way to move your site to another server.
Best way is to do it all manually (i know it takes alot of time)

Moving OpenCart to a new server
OpenCart can be easily migrated to a new web server. The steps are listed below:

##
Copy all the OpenCart files from your existing web server to the new web server.
Export the OpenCart database and import it into the new server.
Edit config.php and admin/config.php. These files contain the filesystem paths to OpenCart folders, URLs to OpenCart frontend and admin, and database access details. The paths and database details will most likely need to be updated, and the URLs will need to be changed only if the OpenCart store's domain has changed.

Active Member

Posts

Joined
Fri Jan 18, 2019 10:00 pm
Location - 127.0.0.1 @ The Netherlands
Who is online

Users browsing this forum: No registered users and 3 guests