Post by silentmedia » Mon Apr 18, 2016 5:10 pm

Hello,

I am using Opencart 2.2.0.0 with SSL setup on account and /admin pages. Extension installed is vQmod with SEO Mega Kit Plus.

The site is in a subfolder (/oc22). It works just fine in front end and /admin login.

If I move site to a new subfolder on same domain/server it still works. But, if I move site to root on same domain/server, the front end works but when I access /admin all formatting is lost.

I have changed config, admin/config and .htaccesss files, by replacing '/oc22' with '/'

Below are files as I changed for moving site to root folder. Any ideas please ???



.htaccess

Code: Select all

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteRule ^image-smp/(.*) index.php?route=product/smp_image&name=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

/oc22/config.php

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.forest-av.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'https://www.forest-av.co.uk/');

// DIR
define('DIR_APPLICATION', '/home/ukmvdrfw/public_html/catalog/');
define('DIR_SYSTEM', '/home/ukmvdrfw/public_html/system/');
define('DIR_IMAGE', '/home/ukmvdrfw/public_html/image/');
define('DIR_LANGUAGE', '/home/ukmvdrfw/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/ukmvdrfw/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/ukmvdrfw/public_html/system/config/');
define('DIR_CACHE', '/home/ukmvdrfw/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/ukmvdrfw/public_html/system/storage/download/');
define('DIR_LOGS', '/home/ukmvdrfw/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/ukmvdrfw/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/ukmvdrfw/public_html/system/storage/upload/');

/oc22/admin/config.php

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.forest-av.co.uk/admin/');
define('HTTP_CATALOG', 'http://www.forest-av.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'https://www.forest-av.co.uk/admin/');
define('HTTPS_CATALOG', 'https://www.forest-av.co.uk/');

// DIR
define('DIR_APPLICATION', '/home/ukmvdrfw/public_html/admin/');
define('DIR_SYSTEM', '/home/ukmvdrfw/public_html/system/');
define('DIR_IMAGE', '/home/ukmvdrfw/public_html/image/');
define('DIR_LANGUAGE', '/home/ukmvdrfw/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/ukmvdrfw/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/ukmvdrfw/public_html/system/config/');
define('DIR_CACHE', '/home/ukmvdrfw/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/ukmvdrfw/public_html/system/storage/download/');
define('DIR_LOGS', '/home/ukmvdrfw/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/ukmvdrfw/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/ukmvdrfw/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/ukmvdrfw/public_html/catalog/');

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by oc-extensions » Mon Apr 18, 2016 7:06 pm

Hi,

Checked http://www.forest-av.co.uk/admin/ and seems ok

You have problems after login?

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by silentmedia » Mon Apr 18, 2016 7:56 pm

oc-extensions wrote:Hi,

Checked http://www.forest-av.co.uk/admin/ and seems ok

You have problems after login?

The site that I want to move to root is currently in subfolder...

http://www.forest-av.co.uk/oc22/admin/

After login it works just fine. But if I move the site and any config as detailed before the formatting is lost AFTER I login. I can see the admin dashboard but its as if there is no css file. But this all works fine in sub-folder.

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by silentmedia » Mon Apr 18, 2016 8:37 pm

Update.

I have taken a copy of site in subfolder www.forest-av.co.uk/oc22 and moved it to the root of another domain on same server (shared hosting) www.clearance-direct.co.uk, and it all works fine.

But moving the site from subfolder www.forest-av.co.uk/oc22 to root www.forest-av.co.uk on same domain causes the loss of formatting problems after /admin login.

So I guess I am making settings correctly. So the problem must be with the root folder of this particular domain. But I have no idea what. I removed ALL files from root when copying the files from sub-folder.

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by oc-extensions » Mon Apr 18, 2016 8:42 pm

Hi,

Can you move it to see exactly where is your problem?

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by silentmedia » Mon Apr 18, 2016 9:25 pm

oc-extensions wrote:Hi,

Can you move it to see exactly where is your problem?
That's a problem as there is already a site in root folder (v1.5.6.4) which is Live. If I move it and replace with the one from folder I will loose sales. So I can only test at night.

Basically, why would opencart /admin work in a sub folder and not in root?

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by Randem » Tue Apr 19, 2016 12:05 pm

Hi silentmedia,

The best way to alleviate issues with a move is to do a clean install in the new location then point the configurations to a copy of your database. This is best done with VQMOD, for all you need to do is to install VQMOD and then place all your VQMOD XML files in the new location and you should be up and running with all the changes in place.

However if you use other methods for code changes other than VQMOD you may have headaches...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by sarthakinfotech » Tue Apr 19, 2016 12:37 pm

hi,
yes i agree with randem ,
if you continue to face such issues . it is best to do clean installations with already available database.

Good Day,
Jagruti
opencart tips and tricks ,
opencart blogs , opencart extensions/themes , custom development.


User avatar
Active Member

Posts

Joined
Tue Aug 05, 2014 1:12 am
Location - india

Post by silentmedia » Tue Apr 19, 2016 6:24 pm

Thank you Randem, sarthakinfotech

As there is already a live site (oc1.5.6.4) where I want the new site (oc2.2) to go, I will backup and take down live site after midnight and make a fresh install as you suggest. I will update here with results.

With regards to this problem and also oc2.2. Could I ask your opinions as to if I am doing the right thing by moving from oc1.5.6.4 to oc2.2? I seem to only read bad things on web about oc2.x - not sure if the problems are mostly sorted. It looks good to me.

Thanks again for you support.

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by Randem » Tue Apr 19, 2016 6:47 pm

I would not go to v2.2.0.0, it is not production ready yet. Move to v2.1.0.x and apply the fixes and you will have a pretty stable system. You never mentioned you were attempting to upgrade, that comes with its own set of issues.

Use this information to upgrade and fix your site to make it stable

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by silentmedia » Tue Apr 19, 2016 7:36 pm

Randem wrote:I would not go to v2.2.0.0, it is not production ready yet. Move to v2.1.0.x and apply the fixes and you will have a pretty stable system. You never mentioned you were attempting to upgrade, that comes with its own set of issues.
Thanks Randem,

I won't be doing any kind of direct upgrade. I will install fresh copy of OC2 and then import all my old data (products/orders) using an Import/Export extension which I tested and works fine.

Fingers crossed for later!

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by silentmedia » Wed Apr 20, 2016 8:53 am

Hi,

Update...

I removed all files from public_html/ folder and made a fresh install of OC 2.2 without any changes, just straight out of the box... Same issue!

Front end works fine, but back end /admin looses all formatting. I have asked host (Rochen) to have a look but no guarantee of a solution... Any ideas?

If I put OC 1.5.6.4 back in root it seems to work ok on /admin but on last re-install of it, it did look as it also had lost a bit of formatting from menu.

So issue with /admin loosing formatting even on a fresh install, no moving, not extensions etc...

??? ??? ???

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by Randem » Wed Apr 20, 2016 10:06 am

That will happen if you are addressing your cart in two different ways, I.E.

http://www.yourdomain.com and http://yourdomain.com
HTTPS the same way or
using HTTP and HTTPS
if you install one way and use the other...

It just won't work this way. you have to focus on only one way of addressing your site and have your .htaccess enforce it. Any other way and you will have issues...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by silentmedia » Wed Apr 20, 2016 11:51 am

Hi Randem,

Thanks for the fast reply. I did check all the variations of HTTP, www etc etc. and I stuck to one format throughout.

But after spending the whole night on this (it's 4am) it turns out the there is a problem with the folder name 'admin'. There was not problem with installations in sub-folders with name 'admin' but this specific one. When I renamed folder to 'admin1234' everything started working in admin, formatting was fine.

So the problem was not even with the folder but... the folder name, and in that location.

What could possibly cause that?

I also saw that as I was moving installations of opencart from folder to folder, I seem to have corrupted images. I just used cPanel file-manager copy/move commands but I get the errors as below in opencart error log...

2016-04-20 3:33:04 - PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: PNG file corrupted by ASCII conversion in /home/ukmvdrfw/public_html/oc22/vqmod/vqcache/vq2-catalog_model_tool_image.php on line 248

2016-04-20 3:33:04 - PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: PNG file corrupted by ASCII conversion in /home/ukmvdrfw/public_html/oc22/system/library/image.php on line 14

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by Randem » Wed Apr 20, 2016 2:31 pm

Yes, NEVER move binary files in ASCII. I try not to move in ASCII at all... As far as the admin folder, not a clue. OpenCart has an admin folder or are you saying the folder you installed OpenCart in was names admin? If so that may cause issues...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by silentmedia » Wed Apr 20, 2016 6:39 pm

Randem wrote:Yes, NEVER move binary files in ASCII. I try not to move in ASCII at all... As far as the admin folder, not a clue. OpenCart has an admin folder or are you saying the folder you installed OpenCart in was names admin? If so that may cause issues...
No, opencart is installed in /. It's the /admin folder which just seems to cause the loss of css after login. If I rename /admin to /admin1234 (and update configs) the css is fine after login.

Re. Binary move; I was just moving files through cPanels File Manager.

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm

Post by silentmedia » Fri Apr 22, 2016 6:06 am

Update

Ok, so after days of having the problem I have found the mystery problem! CACHE!

My site was serving up cached files from 1.5.6.4 instead of 2.2. This is why everything worked when I renamed /admin folder.

Hope this helps anyone else having same problem.

Now I just need to know how to clear the Cached files! Using LiteSpeed Server. The option offered by host was to disable the aching altogether by adding line below to .htaccess file - which worked. But killed my GTMetrix score.

RewriteRule . - [E=noabort:1, E=no-gzip:1]


Any ideas??

Newbie

Posts

Joined
Sun Aug 14, 2011 6:56 pm
Who is online

Users browsing this forum: Amazon [Bot] and 27 guests