The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mod Securty errors with cron jobs

Discussion in 'General Discussion' started by Artform, Nov 6, 2012.

  1. Artform

    Artform Registered

    Joined:
    Nov 6, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It appears my modsec table does not exist. I've tried changing the modsec password and flushing mysql privileges for the modsec user, but I still receive the same error message every hour.

    Code:
    /etc/cron.hourly/modsecparse.pl:
    
    DBD::mysql::st execute failed: Table 'modsec.modsec' doesn't exist at /etc/cron.hourly/modsecparse.pl line 123, <$al_fh> line 29.
    It appears 2 options are available:
    1. Delete the /etc/cron.hourly/modsecparse.pl
    2. Recreate the modsec table within modsec database

    At the moment, #1 is the easiest option since I haven't found the SQL code for the table. I've tried reinstalling modsec using the EasyApache script and it didn't work. Anyone have a solution to this?

    - - - Updated - - -

    Quick follow-up, I found the follow SQL code for the modsec table. To apply it, log into WHM and select phpMyAdmin from the MySQL menu.

    Code:
    CREATE TABLE `modsec` (
    `id` int(11) NOT NULL auto_increment,
    `ip` varchar(15) default NULL,
    `date` date default NULL,
    `time` time default NULL,
    `handler` varchar(254) default NULL,
    `get` text,
    `host` varchar(254) default NULL,
    `mod_security_message` text,
    `mod_security_action` text,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
    
    I've applied this and am waiting to see if it works.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Curious as to why this was needed to be done manually like that. If you still have problems with this you might consider opening a ticket to cPanel Support.
     
Loading...

Share This Page