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.

/etc/cron.hourly/modsecparse.pl - You have an error in your SQL syntax

Discussion in 'Security' started by Sindre, Nov 15, 2013.

  1. Sindre

    Sindre Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    On a new server I have set up I get these emails:


    Code:
    Subject: Cron <root@server> run-parts /etc/cron.hourly
    /etc/cron.hourly/modsecparse.pl:
    
    DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'get, host, mod_security_message, mod_security_action) VALUES('111.111.111.111', '2' at line 1 at /etc/cron.hourly/modsecparse.pl line 123, <$al_fh> line 15.

    Mod security was installed through EasyApache. I have replaced MySQL with Percona 5.6.

    Does anyone have any suggestion as to what can be the problem?

    Thanks,
    Sindre
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    modesc cron stores its logs in a Mysql database, since you have removed Mysql in favour of percona you will need to either stop/delete the cron or edit it to accomodate percona.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    670
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will need to remove this cron job or modify it so it's compatible with your custom Percona installation. Note that Mod_Security itself should still function normally.

    Thank you.
     
  4. Sindre

    Sindre Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Ok, but do you know what in the cron script that needs to be modified? As far as I know, Percona should be compatible with standard SQL queries, so it must be something else. The error says there is an error in the syntax. I check the script but couldn't find anything special. Also, I have moved the MySQL data dir to a different partition if that makes a difference.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    670
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page