Post by vi.nguyen » Wed Feb 07, 2018 11:01 pm

Hi,
I have just installed Opencart Ver 3.x on my Google Cloud hosting.

After uploading OpenCart folders to the server through FileZilla, I've successfully activated the Journal theme on my site. However, when Im trying to move the "storage" folder outside the web directory, the system keeps warning me "Syntax Error: Unexpected token < in JSON at position 0..." (the rest of the message could be seen on attached image).

Image

I've set the permission of the "config.php" file to 775, also the "modification" and "upload" folder in system/storage, but it doesn't work. Please help me deal with this problem. Thank you very much!

Vi

Newbie

Posts

Joined
Fri Dec 15, 2017 12:32 pm

Post by MrPhil » Wed Feb 07, 2018 11:07 pm

I think the problem is that instead of the expected JSON file, it's trying to parse an HTML error page. I can't quite read the message, but from what I can make out, it's trying to open a non-existent file. You'll have to dig into that -- does it have the right path, and if so, why wasn't the file created (such as directory permissions being wrong).

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by uksitebuilder » Thu Feb 08, 2018 12:28 am

Please advise your OpenCart version.

I am guessing it is 3.0.2.0 ?

If so you need to follow the instructions on the popup beneath the error message popup and move your storage directory outside of the public_html directory.

That may or may not get rid of the error message.

If it doesn't, try creating a blank text file saved as openbay.log in your system/logs folder

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by straightlight » Thu Feb 08, 2018 8:13 am

Move your system/storage folder outside of your public_html folder. Then, ensure to configure your config.php and your admin/config.php files to edit the new location for your DIR_STORAGE . In your .htaccess file, comment out or remove the entire line containing: ^system/storage . From your storage folder, ensure the permissions are recursively set to 0755.

This should rectify the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by vi.nguyen » Fri Feb 09, 2018 11:59 am

Thank you guys for being so supportive!

Yes, the exact version is 3.0.2.0. I have uninstalled the OpenCart Application on my server then re-install by Bitnami OpenCart for Google Cloud Platform (they set up everything for me on the Google Cloud server), and then I connect to the server through FileZilla.

I haven't installed any theme yet. First, after logging into the admin panel, I received a warning that "The config.php and admin/config.php need to be made writable" as usual. I followed the previous instructions on the forum: changed permission of these 2 files from 644 into 755 (not work), then into 777. Then I got back to the admin panel and received this message:

Image

Looks like the problem got even worse :( I tried creating a blank text file saved as openbay.log in system/logs folder as @uksitebuilder instructed, not worked :( I tried to set the permission of config.php files back to 644 but it didn't work either.

I couldn't figure out this problem. It seems that I have to change my hosting provider?

Newbie

Posts

Joined
Fri Dec 15, 2017 12:32 pm
Who is online

Users browsing this forum: No registered users and 4 guests