Post by emtee » Tue Dec 12, 2017 5:05 am

I've had a working nicely (so far) install of OC 3.0.2.0 on a home server.

I've migrated it to a webhost (not GoDaddy) and have issues that I don't have on my home server:
  1. With OC in maintenance mode and logged into the admin panel as and admin user, I am logged out of the admin panel if I (in another browser tab) open the store page. Once this happens, and I either refresh the store page or go to another page within the store, e.g., a category or product page, a "maintenance mode" message appears on the store page and going back to the admin panel and refreshing, I confirm that I have been logged out of my admin user session.
  2. With OC out of maintenance mode, I can add items to the shopping cart, but when I click on the shopping cart button, a pop-up below the button says my cart is empty. ...and going back to the admin panel and refreshing the page, the admin user is logged out.
Thinking that I did some portion of the migration incorrectly, I installed a fresh/clean version of OC 3.0.2.0 and the same behavior persists on the fresh install.

My source for both the install on a home server and the new install to the webhost was from git: "git clone https://github.com/opencart/opencart.git", uploading the upload directory, following the install.txt instructions.

I have some ocmods installed on the migrated store, but none on the clean install (obviously?) but even with ocmods disabled, the behavior above persists. The only other modification on the migrated install was

I don't seem to have any errors logged either in my OC error.log file or my php error log file. I'm happy to be second-guessed through and told which logs to look at for possible errors. I did turn on php and html error logging successfully through editing the php.ini file in the webroot of my webhosted store directory.

ModSecurity has been off when testing installs on the webhost.

I suspect there is something to configure on the webhost if the install at home is all right. However, I'm not sure what this is and would like some guidance as to what to look for next. I suspect session tokening here but unsure what exactly to look for or ask my webhost about. When I check my database through phpMyAdmin, it checks OK. Just for fun, I ran a repair operation. All came back successful except for "oc_cart" and "oc_session" which from internet reading may be b/c they're in a format unsupported by the "repair" command. Same behavior on my working home server install.

Any and all help appreciated. Thanks in advance.

M.

Newbie

Posts

Joined
Tue Dec 12, 2017 4:20 am

Post by straightlight » Tue Dec 12, 2017 9:50 pm

No theory lessons required for troubleshooting. Simply post your most recent access logs from your host console's logs icon or from your root FTP domain - > access_logs folder to understand the source of the issue. Also ensure to have properly configured your .htaccess, your config.php and your admin/config.php files.

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 emtee » Wed Dec 13, 2017 12:24 am

Thanks for the fast reply and for the lead.

Here is what I think is the access log for the hosted site, some info redacted: https://pastebin.com/9gEsUfqw

Some of this looks odd to me. For example, there is a forward slash before the [webroot] directory. Would this mean that the request is looking for [webroot] starting at the root directory of my webhost's server? If so, that would be a reference problem.

The other odd thing I see is that on some lines, line 48 for example, there are four slashes between "catalog" and "products".

As for .htaccess, the problem behavior I'm seeing on the hosted site is the same, regardless of whether I have .htaccess files in the path (and paths above) or not.

Best regards,
M.

Newbie

Posts

Joined
Tue Dec 12, 2017 4:20 am

Post by straightlight » Wed Dec 13, 2017 12:46 am

The issue is with your image path containing persistent: /// in your URL. Ensure to properly configure these paths in your config.php and admin/config.php files as well as your webroot's .htaccess file especially when using SEO links.

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 emtee » Thu Dec 14, 2017 1:34 am

Thanks for your help here. I'm learning a lot pursuing the leads you gave me. Using "dynamic" config files, my config files on my home install match my hosted install config files. Still having the same issue on the hosted install, whether .htaccess file is in the store's path or not.

However, I back-tracked after becoming a little frustrated and did a clean install on the home server and hosted server, from a downloaded opencart zip file rather than from the git clone.

Using the same dynamic config files on both, I don't have the "getting logged out of the admin web panel" issue on either home or hosted install.

I have not yet moved the storage directory which is another difference in the installs.

Right now, moving the storage outside the webroot on my hosted install and installing from git rather than download zip file are the only differences between my working installs and non-working.

I will work some more on this and follow-up.

Again, I appreciate your help.

M.

Newbie

Posts

Joined
Tue Dec 12, 2017 4:20 am

Post by straightlight » Thu Dec 14, 2017 1:54 am

Thanks for reporting, so far, that the master files does solve the issue regarding the intermittent log out 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 emtee » Tue Dec 19, 2017 3:58 am

I have since moved the storage directory outside of the webroot folder on my hosted install and changed references to it within the config and admin/config files. Works great so far and again, this working install is from the oc3 downloaded zip file.

So it would seem to me that the original issue, being logged out of the admin account on a hosted install has something to do with me installing from the git clone. Bug report?

M.

Newbie

Posts

Joined
Tue Dec 12, 2017 4:20 am

Post by straightlight » Tue Dec 19, 2017 4:56 am

emtee wrote:
Tue Dec 19, 2017 3:58 am
I have since moved the storage directory outside of the webroot folder on my hosted install and changed references to it within the config and admin/config files. Works great so far and again, this working install is from the oc3 downloaded zip file.

So it would seem to me that the original issue, being logged out of the admin account on a hosted install has something to do with me installing from the git clone. Bug report?

M.
Thanks for the feedback regarding the intermittent logout sessions being caused by the storage folder inside the public_html rather than outside. Although, are you referring to the master files from Github regarding the oc3 downloaded ZIP file / git clone?

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 emtee » Tue Dec 19, 2017 5:30 am

Sorry if I wasn't clear in the last post. No, the install from zip to the hosted account was also working before with storage inside the webroot *and* still working with storage moved to outside webroot. So, my point was that I think I can say now that the only difference for me between a working hosted install and a non-working hosted install is that the working install was from the downloaded zip file and the non-working was from a git clone (git clone https://github.com/opencart/opencart.git).

M.

Newbie

Posts

Joined
Tue Dec 12, 2017 4:20 am

Post by straightlight » Tue Dec 19, 2017 5:47 am

Loud and clear. Thanks for your feedback indicating the master files solved the issues. :)

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
Who is online

Users browsing this forum: No registered users and 283 guests