Skip to main content

PHP syslog() not working

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! I would expect the configurations you've listed to work properly, as that all looks standard. I did find there could be issues with FPM related to syslog: PHP :: Bug #79342 :: Syslog broken on FPM since PHP 7.3.0 Are you using PHP-FPM for that domain? If so, can you try switching that off to see if that changes the behavior?
    0
  • danielkorte
    Hey! Thanks for your response, but no, PHP-FPM is disabled on the server. I looked into it a bit further, and it seems that my non-root user can't use syslog (I"m guessing a permissions thing). When I use the logger command with that user nothing happens, but if I use logger with the root user everything works. But PHP seems to run as the non-root user.
    0
  • cPRex Jurassic Moderator
    That's a really good point too! It looks like other users have come up with creative ways to work around that restriction, such as custom user groups, but I'm not sure if you want to try that on the machine or not:
    0
  • danielkorte
    Yeah, I"d like to avoid that. That's why I was using the /home/USERNAME/logs/ path which the non-root user should have access to. Permissions shouldn't be an issue. It seems as if the logger command isn"t communicating with rsyslog since I can't get any messages to any file/path.
    0
  • cPRex Jurassic Moderator
    I don't personally have any other ideas on my end, but you're always welcome to submit a ticket to our team and we could do some testing with your specific environment.
    0

Please sign in to leave a comment.