Jump to content

CC Security Suite and IP adresses


jhvanee

Recommended Posts

Trialing the cubecart security suite plugin and experiencing the same issue as the op.  Plugin is not allowing me to put in ip address anywhere.  I am also getting copious amounts of system error logs (about 6-10 every min).  I have installed the standard version, but had to disable plugin to stop my error log overflowing.  It is a great idea, but not curently working for me in standard version.

Today, 14:08

File: [ccss.class.php] Line: [24] "SELECT * FROM `cc_CubeCart_ccss_ip_addresses` ;" - Table 'knickXXX_cube3XXX.cc_CubeCart_ccss_ip_addresses' doesn't exist

 

 
  
   
   
   
   
   
   
Link to comment
Share on other sites

From looking at the code, the table will only get created if the module is enabled from the module's settings page. That is, if the settings are entered, but the module is not enabled on this page, then the table will not get created. If the module is later enabled via the checkbox at the "Manage Plugins" listing, the table is still not created.

Please try:

1. Viewing the CCSS module's settings page.
2. Uncheck the module's 'Status' checkbox.
3. Save.
4. Return to the module's settings page (if not already remained on this page).
5. Check the module's 'Status' checkbox.
6. Save.

Link to comment
Share on other sites

Hi Dirty Butter and bsmithers, thanks for the quick response.  @Dirty Butter

Have you checked to see if the CubeCart_ccss_ip_addresses table actually exists? If I'm reading your error message correctly, you have a prefix on your database. Maybe the plugin needs to be tweaked to handle that.

No, the table doesn't exist

@bsmithers

From looking at the code, the table will only get created if the module is enabled from the module's settings page. That is, if the settings are entered, but the module is not enabled on this page, then the table will not get created. If the module is later enabled via the checkbox at the "Manage Plugins" listing, the table is still not created.

Please try:

1. Viewing the CCSS module's settings page.
2. Uncheck the module's 'Status' checkbox.
3. Save.
4. Return to the module's settings page (if not already remained on this page).
5. Check the module's 'Status' checkbox.
6. Save.

Did as you suggested.  Made no difference.  In the minute it took me to do this I received 8 errors.  The one mentioned below,

Trialing the cubecart security suite plugin and experiencing the same issue as the op.  Plugin is not allowing me to put in ip address anywhere.  I am also getting copious amounts of system error logs (about 6-10 every min).  I have installed the standard version, but had to disable plugin to stop my error log overflowing.  It is a great idea, but not currently working for me in standard version.

 
Today, 14:08

File: [ccss.class.php] Line: [24] "SELECT * FROM `cc_CubeCart_ccss_ip_addresses` ;" - Table 'knickXXX_cube3XXX.cc_CubeCart_ccss_ip_addresses' doesn't exist

 

 
  
   
   
   
   
   
   

but also this:

File: [database.class.php] Line: [484] "ALTER TABLE `cc_cc_CubeCart_ccss_ip_addresses` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `ip_address` (`ip_address`), ADD KEY `trusted` (`trusted`) " - Multiple primary key defined

and this:

File: [database.class.php] Line: [484] "ALTER TABLE `cc_CubeCart_ccss_integrity` ADD PRIMARY KEY (`id`) " - Multiple primary key defined

 

 

 

   

 

oh.. and this error too:  (same as earlier one, but different line no).

File: [ccss.class.php] Line: [40] "SELECT * FROM `cc_CubeCart_ccss_ip_addresses` ;" - Table 'knickXXX_cube3XXX.cc_CubeCart_ccss_ip_addresses' doesn't exist

Link to comment
Share on other sites

If you have access to your host's cpanel, goto phpMyAdmin and look at your cubecart tables. Do they look like CubeCart_nameoftable or is there something in front, like the cc_ on ozzydizzy's cc_CubeCart_ccss_integrity table error message in the thread here?

I don't use a prefix - didn't even know such a thing could exist when I started using CubeCart. But if by chance you didn't create your original database, but someone else did it, they might have used a prefix. I am not saying that's what the problem is, just trying to narrow down why this plugin works for some and not for others.

Link to comment
Share on other sites

@Dirty Butter... I downloaded cubecart onto my cpanel through softaculous, and that put the prefix in automatically.  I am sure others have done the same.  I am not sure if that is the problem, but just putting it out there.

Link to comment
Share on other sites

  • 5 months later...

I had another look at my problem, and I think I solved mine. This is what I did.  

  1.  I enabled the module on the module page.

2.  Clicked on the tab that has now appeared on the left hand side of admin ( very last tab under "advanced", it was never there before, so something has changed) and looked under "trusted ip Addresses",.

3. Tried to enter my own trusted ip address in there.  No go... would not save.

4.  Went into my cpanel and phpmyAdmin.

5. selected cubecart database

6 Checked to see if the table CubeCart_ccss_ip_addresses existed  ( it did not)

7 . Created new table WITH the prefix that all my other tables had ( in my case cc)

8. went back to cubecart admin and under security suite "trusted ip addresses" tab I  was  finally able to enter my trusted ip address and save as it was supposed to.

Voila.  all looks good, no more errors in admin log, and the module now appears to be working

 

Hope this works for someone else too.

 

Have a great day.

 

Link to comment
Share on other sites

Please make this edit and try again -- for those who still have problems:

In the module's file /admin/index.inc.php, find near line 8 the variable $create_table. That statement will be about 22 lines long. (Do not think to apply the following to line 6 -- ignore line 6.)

Everywhere you see:
".$GLOBALS['config']->get('config', 'dbprefix')."
including the first and last quote marks

Delete that.

But not in line 6!

Sending this string to parseSchema() automatically adds the table prefix if one exists. The table prefix must not be included in $create_table.

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.

×
×
  • Create New...