Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/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:
    56
    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:
    929
    Likes Received:
    15
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Sindre

    Sindre Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    56
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice