We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42086
    • 3 Posts
    Greetings!
    I'm very fresh to php and modx in general. I was given a task to redirect all error logs that Modx writes from Mysqldb to a text file.
    I work with Modx Evolution.

    I've searched several similiar topics here but didn't find the right answer.



    [ed. note: alk1986 last edited this post 13 years, 11 months ago.]
      • 34926
      • 87 Posts
      This isn't really a MODx question as it depends on your server environment and PHP configuration. Although MODx does add errors to the database it doesn't affect PHP's default logging behaviour.

      If you have log_errors set to "On" in your php.ini file errors will still be directed to whatever error_log is set as.

      On a per website basis you can check out error_log which can be set within the frontend/manager index.php files or through the web server itself (see http://php.net/manual/en/configuration.changes.php).

      Sorry if that isn't helpful, a lot of guess work involved there!
        • 22303 MODX Staff
        • 10,725 Posts
        You could also add it to your config.inc.php file so it is applied everywhere you use MODX.
          • 42086
          • 3 Posts
          Greets again! First of all, thanx for your support.

          But it seems that you've got me wrong.

          I have Modx Evo and a Mysql server running. When a users lands to a website he gets Mysql:too many connections error instead of the landing page. ModX tries to write mysql error log to that particular db and we get a loop. Only curable by restarting apache. I also should note that it is a floating bug.

          My question is: how can i solve the problem of redirecting that mysql error log to a text file to know what causes the problem? Is there any modx evo specified tools to do that?