Jump to content

[Resolved] 'name' is not allowed as key


zombiesbyte
 Share

Recommended Posts

Hi Al

The problem is when I tried going down this route it wasn't working. I originally thought perhaps my config wasn't using the my.ini but after further investigation this workaround won't work on InnoDB table types apparently.

Quote

Exception: If you are using InnoDB tables and you are trying to avoid these data transfer problems, you should set lower_case_table_names to 1 on all platforms to force names to be converted to lowercase.

 

Update: FYI: I won't be able to modify the hosting environment settings for MySQL engine

Link to comment
Share on other sites

Hi Al

The other problem I've got is that I maintain various other projects on my XAMPP and having multiple environments is starting to sound like a nightmare.

Can you think of any issues with the plan I proposed about the code change on my copy of CC?

Link to comment
Share on other sites

I was just about to post this when I noticed your reply:

I can confirm that the renaming of "CubeCart_" to "cubecart_" on anything that addresses the database seems to (so far) resolve all issues.

I'm interested in finding out if there was anything particular that you'd be concerned with other than upgrades (my copy of CC isn't so straight forward anyway due to small changes made at core to help produce features I wanted/needed).

I wonder if it would be worth noting a change request for future editions of CC to lowercase the table names.

Regardless, looks like I'm up and running fingers crossed :happydance:

 

Link to comment
Share on other sites

5 minutes ago, zombiesbyte said:

I wonder if it would be worth noting a change request for future editions of CC to lowercase the table names.

Sadly due to all the 3rd party addons that have coded around the current naming convention I don't think this can be done. 

Another thing I just noticed is that your database has "latin1_general_ci" encoding. It should be really "utf8_unicode_ci".

I just had a look at your database on 1and1.com and see the table names are lowercase again!? The shop seems to be working. 

"_ci" at the end of the database encoding means "case insensitive". With this in mind the table name cases shouldn't matter with any encoding ending with "_ci" at the end.

Link to comment
Share on other sites

Table name case came to mind, but the use of the file "conchecker.php" showed that the table names were being coded with correct table name lettercase and it worked.

So, I dropped that line of pursuit.

 

Oh! There it is:

echo "Lets get the column names from ###_cubecart_config table<br>\n";
print_r(mysqli_fetch_all($mysqli->query('SHOW COLUMNS FROM `###_cubecart_config`')));


echo "Lets get the first 3 rows of data from ###_cubecart_config table<br>\n";
print_r(mysqli_fetch_all($mysqli->query('SELECT * FROM `###_cubecart_config` LIMIT 3')));

Using lower-case table names.

Link to comment
Share on other sites

5 hours ago, zombiesbyte said:

I wonder if it would be worth noting a change request for future editions of CC to lowercase the table names.

This is only an issue for an extremely small number of people moving a database from a Windows based database server and as Windows isn't actually officially supported, this is not a way forward !

5 hours ago, Al Brookbanks said:

I just had a look at your database on 1and1.com and see the table names are lowercase again!? The shop seems to be working.

1and1 use external database servers that run on Windows even when the hosting server is Linux !

Ian

Link to comment
Share on other sites

Thanks to the final comment contributions,

Al. Regarding your check on the DB encoding my official PHPMyAdmin shows the correct encoding as utf8_general_ci so I'm not sure if this was a problem with the phpmyadmin I setup temporary. Regardless I know to use utf8_general_ci :) It's a shame that this looks to be insensitive to data only and not table names.

bsmither. Yeah, everything worked as all I saw locally and live was the table names in lowercase. I had no idea that there was any reference to "###_CubeCart_..." and as specified by MySQL naming standards these should always be labelled lower-case for cross platform support/compatibility.

havenswift-hosting. By extremely small number of people I presume you still understand that that would equate to many hundreds of thousands if not millions in the whole scheme of things. WAMP and XAMPP (the two most popular virtual server suites) are not maintained for small numbers of users otherwise it would be pointless.

I know little about 1&1's hidden setup but I imagine everything is controlled in a VM style fashion. Regardless of the underlying OS platform the environment they serve from is still Linux otherwise I would not have had these problems. DB shows that it is sitting on Server version: 5.5.50-0+deb7u2-log - (Debian).

Maybe there's something I've got wrong with this but regardless the issue is resolved.

I would like nothing more than to say that everything should be geared to a single platform type using one browser brand and have one email client but unfortunately we live in a multi-level world full of various brands, devices and platforms.

I can't see any issues with what I've done other than any future updates (or plugins/extensions) needing to be re-calibrated back to lowercase db table naming. This is something I accept I need to do but for the general user it may not be appropriate but people who just want to build using CC's admin panel offering only would probably have installed it on their environment using the installer. My version is obviously FTP'ed across and the database exported which is where it had caused the issue.

It's all cool, I'm up and running and I think there's a good deal of information to be utilised in the future for anyone following this thread in hopes of a resolution. I know Al had mentioned this happens every once in a while but I had not come across any information to point me in the direction of database table casing.

Thanks for everyone's time on this, I appreciate the help.

I'm still extremely impressed with CC's coding standards, style and community spirit.

Kind regards

James

 

Link to comment
Share on other sites

Thanks James. Over the years it's always been a constant battle getting CubeCart 100% compatible with a billion and one different hosting configurations. More often than not having a Windows server caused the majority of problems. This is why we push for Linux over it.

We don't test CubeCart on windows WAMP or WIMP (IIS) setups.

Link to comment
Share on other sites

9 hours ago, zombiesbyte said:

havenswift-hosting. By extremely small number of people I presume you still understand that that would equate to many hundreds of thousands if not millions in the whole scheme of things. WAMP and XAMPP (the two most popular virtual server suites) are not maintained for small numbers of users otherwise it would be pointless.

I know little about 1&1's hidden setup but I imagine everything is controlled in a VM style fashion.

That is not what I was saying at all !  @Al Brookbanks also confirmed that Window's environments are not officially supported and the small number of people I was referring to, were the handful that do what you are doing and use WAMP / XAMPP to develop or run CubeCart (Not those just using those technologies lol).  Making a change to core CubeCart that would affect every single user and third party plugin for one or two users is not logical.

I dont believe 1and1 use a VM setup, it is usually as simple as the separate database servers they use, regardless of whether your website is hosted on Linux or Windows or whatever, are Windows servers !  It is a known issue we have had multiple times when migrating CubeCart customers from 1and1.

Regardless of what technology you choose to use to develop, it is great to have another developer involved with CubeCart so welcome !

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...