php syslog() not being logged
Good morning.
I have been trying to get the wordpress plugin WP fail2ban to work, how ever the wordpress logins are not being entered into the system logs that I can see.
I even did a simple php file that just called the syslog() function and wasn't able to find any evidence of it being in the logs.
Script echo's the strings like it should, but SYSLOGTEST does not show up in any logs. I'm not getting any errors in the php error logs. Hoping some one here has any idea as to how to fix it. The output from the command given in the guide to an effect thread: /etc/redhat-release:CentOS Linux Release 7.3.1611 (Core) /usr/local/cpanel/version:11.60.0.28 /var/cpanel/envtype:xen pv CPANEL=release Server Version: Apache/2.4/23 (cPanel) Server Built: Dec. 13 2016 13:28:05 ea-php-cli Copyright 2016 cPanel, Inc PHP 5.6.29 (cli) (built: Dec 13 2016 13:49:19) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies mysql ver 14.14 Distrib 5.6.34, for linux (x86_64) using EditLine wrapper things I have tried: edit /etc/rsyslogd.conf -> change $OmitLocalLogging from on to off edit /etc/rsyslog.d/listen.conf: Default setting for $SystemLogSocketName is /run/systemd/journal/syslog. When I changed it to /dev/log, the logger command successfully entered my test message into the /var/log/messages log - but the php calls to syslog() (and even error_log) still didn't do any thing. under the default setting of /run/systemd/journal/syslog - the logger command doesn't do any thing. Setj
";
syslog(LOG_ERR, "SYSLOGTEST");
echo "Done with test";
?>
Script echo's the strings like it should, but SYSLOGTEST does not show up in any logs. I'm not getting any errors in the php error logs. Hoping some one here has any idea as to how to fix it. The output from the command given in the guide to an effect thread: /etc/redhat-release:CentOS Linux Release 7.3.1611 (Core) /usr/local/cpanel/version:11.60.0.28 /var/cpanel/envtype:xen pv CPANEL=release Server Version: Apache/2.4/23 (cPanel) Server Built: Dec. 13 2016 13:28:05 ea-php-cli Copyright 2016 cPanel, Inc PHP 5.6.29 (cli) (built: Dec 13 2016 13:49:19) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies mysql ver 14.14 Distrib 5.6.34, for linux (x86_64) using EditLine wrapper things I have tried: edit /etc/rsyslogd.conf -> change $OmitLocalLogging from on to off edit /etc/rsyslog.d/listen.conf: Default setting for $SystemLogSocketName is /run/systemd/journal/syslog. When I changed it to /dev/log, the logger command successfully entered my test message into the /var/log/messages log - but the php calls to syslog() (and even error_log) still didn't do any thing. under the default setting of /run/systemd/journal/syslog - the logger command doesn't do any thing. Setj
-
Hello, There's a third-party URL here that references this WordPress plugin's use with CentOS/RHEL 7.x: Wordpress Fail2Ban with CentOS 7 / EL7 - Xreflow While the installation steps are different, you may find some of the configuration details helpful. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment