Jump to content
Sign in to follow this  
peterp

new website failing

Recommended Posts

Hi All,

I have a rather desparate issue that has just happened as I was trying to make a site go live. I am presented with a Message that says

Notice: `name` is not allowed as a key in 'CubeCart_config' table! in /home/vinylpeter/public_html/classes/db/database.class.php on line 888

When I look at the cubecart_config table its very first field is called 'name' , have I done something wrong in my setup or what I'm at my wits end with this the client is supposed to go live tomorrow and therefore this has become a super problem.

Any suggestions as to what I can do will be very very much appreciated

Thakyou,

Best Regards,

Peterp

Hi All,

I have done some investigation and this is fine when cubecart is used on a localhost however when it is exported to a hosted site it seems to not like the column named 'name' in the table cubecart_config.

I don't know whether this helps or not All I know is it works locally OK

Best Regards,

Peterp

Share this post


Link to post
Share on other sites

I've just taken a look at mine, there are 2 columns, name and array.

 

While we try and figure out what's going on, in the root of your store, create a new file called  ini-custom.inc.php and populate it with the follwing php code.

<?php
# Custom initialization commands
# Filename: ini-custom.inc.php
# File location: main CubeCart folder

ini_set('memory_limit', '256M');
ini_set('max_execution_time', '60');
ini_set('error_log', 'error_log');
ini_set('log_errors', 'on');

?>

 

This will create an error log file in the root of your store, which you can then analyse, to see if it sheds any more light.

Also found this.

 

 

also check closely global/includes/global.inc.php

 

<?php
$glob['adminFile'] = 'name of admin file goes here.php';
$glob['adminFolder'] = 'name of admin folder goes here';
$glob['cache'] = 'file';
$glob['dbdatabase'] = 'name of database goes here';
$glob['dbhost'] = 'localhost';
$glob['dbpassword'] = 'db password here';
$glob['dbprefix'] = '';
$glob['dbusername'] = 'db user goes here';
$glob['installed'] = '1';
?>

sorry, ..... that should be ...........includes/global.inc.php

Share this post


Link to post
Share on other sites

Hi Keat,

Thanks for your help unfortunately I cannot try your suggestions as I have had to put the original online store back into service, however I will be trying them tomorrow when it is more opportune to bring the old online store down.

I have checked the includes/global.inc.php and it seems ok

I have noticed that the tables includes/global.inc.php was read only where as in other versions this table was not read only, don't know whether is makes a difference or not just an observation.

Thanks again

Peterp

Share this post


Link to post
Share on other sites

I'm not sure that there would be any reason to write to it once it's been written, so I can't see that being an issue.

Share this post


Link to post
Share on other sites

You would get a different error message if CubeCart was not able to open communications to the database server. Such as not having the mysql or mysqli functions to use, or the database server not being where the globals.inc.php file says it is.

Also with not having the correct name of the database to use.

You might get a different error message if the database server has not given permission for the user/pass to access the name of the database.

The error you did get has been seen when making queries to the database has been denied for some reason. Sometimes when the database server has been overloaded.

So, in your hosting account's control panel (Cpanel?), make sure you have the correct database URL (probably not 'localhost') and your user/pass is correct.

You say you have an existing store online? Check the globals.inc.php file for that store.

Share this post


Link to post
Share on other sites

Hi Brian,

I have checked with the hosting company and the correct host url for the database is 'localhost'. I have checked my other online store globals.inc.php and they are the same except for the database and the users/pwd. I have checked with the hosting company and the database server is not overloaded. I have checked my other users cpanel and there doesn't seem to be any differences except for the home paths which I would expect as they are 2 different companies.

I was wondering whether the way I have created this site has anything to do with my problem, The steps I have taken are:-

I first created the cubecart site on a local machine using localhost as the host ver 6.1.3

All changes and updating of the database occurred on the local version of cubecart all plugins and extensions were applied.

I then FTP the cubecart directory from the PC to the hosting home directory (home/vinylpeter/public_html).

I then used PHPadmin to import the backup taken earlier into the remote hosting (localhost) server.

I have pointed the named servers to the correct host and this has been verified that the site is looking at the right servers.

That's about all I have done, I'm starting to think that maybe I have to recreate the whole store again using the remote site in the beginning, or would an upgrade to the latest ver help?

Hope you can help

Best Regards

Peterp

Share this post


Link to post
Share on other sites

I've done exactly the same thing. So I think there is nothing wrong with the steps you took.

Unfortunately, getting the Config from the database is the very first thing that Cubecart does. So, if CubeCart is not getting the config, much of everything afterwards is going to be chaotic. That means we won't be able to set CubeCart's debug mode in admin (might be able to force it, however), but still no idea if that would help.

However, being at the start of CubeCart's wake-up processes, we can conclude that this is systemic to the environment (or the global.inc.php settings being used) and not some bug in CC613's codebase.

Also unfortunately, I have yet to hear of a host (unless it is a VPS) wanting to enable the database server's general and error logging.

Create a file in CubeCart's main folder.

Name: phpinfo.php
Contents:
<?php
phpinfo();
?>

Have the browser request this script and verify that either mysql or mysqli are enabled.

Share this post


Link to post
Share on other sites

Hi Brian,

I have attached the phpinfo for mysql and mysqli and I think there all enable what do you think.

mysql.docx

Share this post


Link to post
Share on other sites

I see that the mysql and mysqli extensions are configured to use a "socket". This is not the same as using "tcp/ip" (where you have a URL or IP address).

Many times localhost works with a socket, but the "loopback" of 127.0.0.1 implies "tcp/ip".

So, we need to figure out how to code the globals.inc.php setting for using a "socket".

Or, have the hosting people figure out how to get PHP to talk to the database server using "tcp/ip".

Read this:

https://github.com/cubecart/v6/commit/16aa1bf65a43396bca961a955776d8259cdf4317

Scan the green area in global.inc.php looking for the $glob['dbsocket'] line. For the value, use what you see in the PHPINFO table.

Edited by bsmither

Share this post


Link to post
Share on other sites

Hi Brian,

The hosting people haven't figured out how to get the PHP to talk to the database server, they are saying that it is something cubecart is doing as their hosting parameters all check out to be working fine. So I guess it's up to us to find a way to configure globals.inc.php "dbhost" value for using a socket. How is this done and can it be done easily

This begs the question why haven't I had this problem before, as I use the same hosting company for all of my cubecart installation and never had a problem like this before.

Thanks so much for your help with this issue it is extremely appreciated

Best Regards,

Peterp
           

Share this post


Link to post
Share on other sites

Please re-read my post above as new stuff was added since you last read it.

In PHPINFO from any of the other Cubecart installations (in admin, PHP Info), compare the MySQL and MySQLi tables to determine if there is any difference.

I noticed that there is no default_port. So we may need to add that.

In globals.inc.php, add this statement:

$glob['dbport'] = "3306";

 

Share this post


Link to post
Share on other sites

Hi Brian,

Well I have compared the MYSQL and MYSQLI tables with one that is working perfectly and they seem to be the same (see attached comparison of working cubecart installation). I have added the statement $glob['dbport'] = "3306";  to globals.inc.php, I have attached the full globals.inc.php from the problem cubecart install.

I decided to experiment by typing in the full url for the admin page which was 'vinylrulesmusic.com.au/admin_9NSk7V.php' (which in its self seems a bit strange from previous admin logons) and I was able to get to the correct login screen however when I typed in my login and password it comes back with invalid username/password.

The same message does appear above the login screen so this probably does help at all had to do something.

I'm fast approaching the decision to scrub this install and reinstall and start all over again and hope this fixes the problem.

Your thoughts once again very much appreciated and any solutions.

Best Regards,

Peterp

Vinyl rules Music Glob.docx

Accessoreyes phpinfo.docx

Share this post


Link to post
Share on other sites

Hi peterp, Did you ever find a solution to the Notice: `name` is not allowed as a key in 'CubeCart_config' table! error? I have the same problem, CubeCart worked fine on my local machine but not after uploading to hosting account. There seem to be a lot of complaints about this but no real solution so far. Thanks!

Share this post


Link to post
Share on other sites

Hi Marksolo,

                Unfortunately I honestly cannot remember whether I did get a solution however the site in question is working fine at this moment, the only thing I can suggest I did was a complete reinstall using the latest version and then the problem disappeared, but this is a complete guess. If you have tried all of the suggestions then I don't know what you should do next sorry

 

Best regards,

Peterp

Share this post


Link to post
Share on other sites

Getting the config from the database is the very first thing CubeCart fetches. So I would first make sure the user/pass to the hosting server's database is correct.

In /includes/global.inc.php, verify that the 'dbhost', 'dbdatabase', 'dbusername', and 'dbpassword' are correct for the hosting database.

Then, make sure that the case may be that the hosting database may or may not have a prefix as part of all the table names. Use an external database utility (such as phpMyAdmin which is a tool in your hosting account's control panel) to note the table names. Make sure 'dbprefix' matches exactly - or an empty string if no prefix is seen.

Share this post


Link to post
Share on other sites

Thanks for the quick reply! I did find the cause and a solution that was quite simple. It turns out that XAMPP converts all the table name beginnings of CubeCart_ to  cubecart_ and everything still works fine on my local machine. After importing the database file to my server database (cPanel ) everything choked on the lowercase table names. All I had to do was go into PhpMyAdmin, select all the tables with the checkbox and bulk rename all the prefixes to CubeCart_. Hopefully this will help someone else with same problem.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...