Post by TAC » Mon Sep 16, 2013 7:26 pm

Hi again,

As per my post here http://forum.opencart.com/viewtopic.php?f=19&t=110164
I decided to move the site and worry about the upgrade when I can. The site was in a sub folder /gift-shop but is now in the root at theambercat.co.uk I have not changed domain or server. I am running some version of 1.5 but not sure which.

I followed the instructions here http://docs.opencart.com/display/openca ... new+server and it seems to have gone ok but I am getting some errors and don't know what to do....

On the About page and on any of the product category pages I get the following:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
When I try to edit my System info in admin I get this:
Error: Unknown column 'name' in 'order clause'
Error No: 1054
SELECT * FROM customer_group ORDER BY name ASC
And to add to the confusion someone placed an order while I was moving the site and I get this error when I look at the order:
Notice: Undefined index: name in /var/www/vhosts/theambercat.co.uk/httpdocs/admin/controller/sale/order.php on line 1226
I also seem to get the Error 1054, shown above, when ever I try to edit anything in admin.
I cannot make any changes/additions to products either :(

Have I done something wrong at all?

Thanks in advance :)
Last edited by TAC on Thu Oct 24, 2013 7:54 pm, edited 1 time in total.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Tue Sep 17, 2013 12:08 pm

Okay, http://forum.opencart.com/viewtopic.php ... 64#p438269 came half an hour or so after you did that. The upper one of your three above refers to a chap named root, you are root (you can think of the server's own system administrator root as "taproot" -- deeper than you are allowed to go). The order details may be in the error log, keep that, you may be able to extract the order -- that is one of the reasons for Maintenance mode, but you can also ask the customer, just tell him that happenstance timing was wrong for the order.

You should double-check all HTTP, HTTPS, DIR addresses and paths in both config.php files for the move down to root. You should double-check .htaccess for the move of basedir from /dirname/ back down to /. Proofread those slowly, deliberately, and at least twice. The database is there; otherwise, you would be seeing zippo.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Thu Sep 19, 2013 9:51 pm

Thank you butte,

I had already checked them but did so again. I found a mistake in the admin/.htaccess but cannot see any in the config files. The only thing I notice is that define('DB_PREFIX', ''); is blank. Does that matter?

This is congig.php with db data removed:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.theambercat.co.uk/');
define('HTTP_IMAGE', 'http://www.theambercat.co.uk/image/');
define('HTTP_ADMIN', 'http://www.theambercat.co.uk/admin/');

// HTTPS
define('HTTPS_SERVER', 'http://www.theambercat.co.uk/');
define('HTTPS_IMAGE', 'http://www.theambercat.co.uk/image/');

// DIR
define('DIR_APPLICATION', '/var/www/vhosts/theambercat.co.uk/httpdocs/catalog/');
define('DIR_SYSTEM', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/');
define('DIR_DATABASE', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/database/');
define('DIR_LANGUAGE', '/var/www/vhosts/theambercat.co.uk/httpdocs/catalog/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/theambercat.co.uk/httpdocs/catalog/view/theme/');
define('DIR_CONFIG', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/theambercat.co.uk/httpdocs/image/');
define('DIR_CACHE', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/theambercat.co.uk/httpdocs/download/');
define('DIR_LOGS', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/logs/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '***');
define('DB_PASSWORD', '***');
define('DB_DATABASE', '***');
define('DB_PREFIX', '');
?>
And this is admin/config.php:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.theambercat.co.uk/admin/');
define('HTTP_CATALOG', 'http://www.theambercat.co.uk/');
define('HTTP_IMAGE', 'http://www.theambercat.co.uk/image/');

// HTTPS
define('HTTPS_SERVER', 'http://www.theambercat.co.uk/admin/');
define('HTTPS_IMAGE', 'http://www.theambercat.co.uk/image/');

// DIR
define('DIR_APPLICATION', '/var/www/vhosts/theambercat.co.uk/httpdocs/admin/');
define('DIR_SYSTEM', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/');
define('DIR_DATABASE', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/database/');
define('DIR_LANGUAGE', '/var/www/vhosts/theambercat.co.uk/httpdocs/admin/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/theambercat.co.uk/httpdocs/admin/view/template/');
define('DIR_CONFIG', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/theambercat.co.uk/httpdocs/image/');
define('DIR_CACHE', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/theambercat.co.uk/httpdocs/download/');
define('DIR_LOGS', '/var/www/vhosts/theambercat.co.uk/httpdocs/system/logs/');
define('DIR_CATALOG', '/var/www/vhosts/theambercat.co.uk/httpdocs/catalog/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '***');
define('DB_PASSWORD', '***');
define('DB_DATABASE', '***');
define('DB_PREFIX', '');
?>
I was able to action the order so that was lucky.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Thu Sep 19, 2013 11:53 pm

For SSL and HTTPS in configs see links in

http://forum.opencart.com/viewtopic.php ... 65#p437365
http://forum.opencart.com/viewtopic.php ... 86#p437186

from/to:
define('HTTPS_SERVER', 'http://www.theambercat.co.uk/admin/');
// define('HTTPS_SERVER', 'http://www.theambercat.co.uk/admin/');

from/to:
define('HTTP_CATALOG', 'http://www.theambercat.co.uk/');
define('HTTP_CATALOG', 'http://www.theambercat.co.uk/catalog/');

Prefix does matter, it governs which suite of tables will be active. Prefix will be either blank or oc_ or [somethingshort]_ -- you can look at it in phpMyAdmin to see which prefix or prefixes are in the table and set the entry to match whichever is in effect. You may have to try each of two or three (blank is one). The tables are in alphabetical order, the prefixes are easy to see. If you happen to cause the upgrade to install a new suite of tables under a new prefix, then switching prefix might be necessary.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 12:09 am

Thank you butte,

I haven't used any SSL and HTTPS as far as I know. Is that what is wrong in the config files?

I am not sure where to look in the db for the prefixes. I've attached a screenshot if that gives any clues?

Attachments

Screen Shot 2013-09-19 at 17.06.48.png

Screen Shot 2013-09-19 at 17.06.48.png (23.27 KiB) Viewed 13236 times


User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Fri Sep 20, 2013 12:21 am

// define('HTTPS_SERVER', 'http://www.theambercat.co.uk/admin/');
turns it off (// 'comments' the line, add the //).

Those tables have no prefix. The first prefix they would then have by default would be oc_ and you would have to look below the no-prefix alphabet for any of those. In the narrow left column you'll see a partial list which may not scroll, but in the wide main window you'll see in the crossbar menu on its left a button to Browse. That can be scrolled through every table that may be in there. Look downward for any oc_ tables, if they are there you will see them. If not, you won't.

That oddball table name can be looked for while you're at it.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 12:39 am

Like this?
// HTTPS
//define('HTTPS_SERVER', 'http://www.theambercat.co.uk/');
//define('HTTPS_IMAGE', 'http://www.theambercat.co.uk/image/');

I can't see the Browse button but may be looking on the wrong place? I have attached what I can see.

Attachments

Screen Shot 2013-09-19 at 17.37.53.png

Screen Shot 2013-09-19 at 17.37.53.png (96.86 KiB) Viewed 13229 times


User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Fri Sep 20, 2013 12:43 am

On this view all the tables seem visible and none have a prefix. I also cannot see one called Tables_in_sitervee in the list either.

Attachments

Screen Shot 2013-09-19 at 17.40.18.png

Screen Shot 2013-09-19 at 17.40.18.png (203.03 KiB) Viewed 13230 times


User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Fri Sep 20, 2013 12:52 am

I have done a search for Tables_in_sitervee and it returned 0 results, the whole list says 0 matches :(

Attachments

Screen Shot 2013-09-19 at 17.50.44.png

Screen Shot 2013-09-19 at 17.50.44.png (98.02 KiB) Viewed 13226 times


User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Fri Sep 20, 2013 1:54 am

Putting this:
// HTTPS
//define('HTTPS_SERVER', 'http://www.theambercat.co.uk/');
//define('HTTPS_IMAGE', 'http://www.theambercat.co.uk/image/');

gave me the error: Notice: Use of undefined constant HTTPS_SERVER - assumed 'HTTPS_SERVER' in /var/www/vhosts/theambercat.co.uk/httpdocs/index.php on line 71
so I think I got that wrong :(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Fri Sep 20, 2013 2:10 am

Whichever config.php you are editing, do you have still the last config.php files, and .htaccess file, that actually worked before you upgraded anything (other thread) or moved anything (this thread). It appears best to haul those out and change the addresses and paths for the present position on the present machine.

Good, the odd table is not a problem.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 2:16 am

I do have them, but if I delete the current ones and upload the backed up ones they will point to the old url theambercat.co.uk/gift-shop and that folder has been deleted.

I will update them by changing the urls to just theambercat.co.uk :)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Fri Sep 20, 2013 2:23 am

Done but problems still happening :(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Fri Sep 20, 2013 2:24 am

What matters in the originals right now is that the HTTP, HTTPS, DIR, and DATABASE sections worked. MINOR path changes are needed for the first three, since apparently this still sits on the same machine, but is moved within your account. The exact paths will be visible between what you can see in ftp, and whatever below your account area is spelled out in for "server" or the like in your host control panel (/home/[...]/public_html/ -- or similar) In .htaccess the store root, whether the full root / or instead the directory root /dirname/, must be set, too.

Back up the current versions of those three files as they sit -- rename them, download them into their own directory on your machine, whatever -- before sending amended files up to replace them.

Do you have a complete backup of the files and database -- made while it worked before you tried to upgrade it or to move it?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 2:56 am

Yes I have a complete backup of everything :)
Do I need to backup the the current ones still?

I really appreciate all your help.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Fri Sep 20, 2013 3:17 am

It's always good to back up everything you have before making a potentially big change (files via ftp, database via phpMyAdmin / Export). The idea here is to back up what is there (working or not), then to put in place the backup of what was (several days ago, when everything worked).

You moved it. Why? [It had worked, what was your reason for moving it? The move does affect] the pathnames that need to be edited.

While you're away, perhaps asleep . . . If you put your full backup in place twice, where it was before you moved it, and where it wound up after you moved it,
(1) then apparently the first one will be in /public_html/directoryname/ (and will have a /public_html/directoryname/admin/)
(2) and apparently the second one will be in /public_html/ (and will have a /public_html/admin/).

That is ample to separate them, they can each be addressed in your browser --
(i) domain/
(ii) domain/directoryname/.

From there you can see how their own pairs of config.php differ with position in or above root.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 7:03 pm

I will do that :)

I deleted the old directory as it appeared that the move had gone successfully....

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Fri Sep 20, 2013 8:10 pm

Ok,

Backup is now in http://www.theambercat.co.uk/gift-shop and works fine.

It is also in http://www.theambercat.co.uk/ and works fine because it uses the gift-shop pages.

Links from the blog http://www.theambercat.co.uk/gifts-for-animal-lovers/ seem to be using the http://www.theambercat.co.uk/ info pages but go to gift-shop pages for products.

This is not how I want it but at least there is a working shop again :)

I can login to the admin on http://www.theambercat.co.uk/ but it takes me to http://www.theambercat.co.uk/gift-shop and the backup page still has that massive error :(

If I click on the Backup button I get the following error:

Error: Incorrect table name ''
Error No: 1103
SELECT * FROM ``

And I wanted to use that function because I have loads of new products to add and wanted to do it via the spreadsheet rather than one by one.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by butte » Fri Sep 20, 2013 9:52 pm

Well, we are off to a good start today. Upper works, lower works, well enough to manipulate shop and to log into admin.

Blog links probably relate partly to where blog is, and perhaps to a mix of absolute and relative paths (such as [root/nine_yards]/[dirtree/file] or just [dirtree/file], for example, [where]/image/data/that.jpg or just image/data/that.jpg). There may be multiples of what just seems to be one link, each would need to be changed (for example, it may call different files that happen to appear the same where the link shows). Your .htaccess may be confusing blog; blog cannot confuse .htaccess instead. But that dual handoff relates to the other more basic problem.

In http://www.theambercat.co.uk/admin/
<base href="http://www.theambercat.co.uk/gift-shop/admin/" />
and in http://www.theambercat.co.uk/gift-shop/admin/
<base href="http://www.theambercat.co.uk/gift-shop/admin/" />
so their starting points are same.

Okay, one or the other needs to be in control if they are sharing the same database. You can give the remaining one a duplicate new database (make it, name it, adjust both config.php). You can adjust .htaccess (one shop, in either / or /gift-shop/ with the trailing /). At the moment Backup probably faces what blog faces.

Now, what was the original reason for wanting the stable store out of its own directory and in the root? Where is the blog?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by TAC » Fri Sep 20, 2013 11:32 pm

I want the store in the root so it is the first thing on the domain for SEO purposes.
The blog is now in http://www.theambercat.co.uk/gifts-for-animal-lovers/

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England
Who is online

Users browsing this forum: No registered users and 6 guests