Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Temporarily disable log_errors in php.ini

Temporarily disable log_errors in php.ini

Scheduled Pinned Locked Moved LAMP
5 Posts 2 Posters 765 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • micmcM Offline
      micmcM Offline
      micmc
      wrote on last edited by girish
      #1

      I absolutely need to disable errors log in PHP for a little while, otherwise my document root becomes fill with and increasing by the second errors.log file.

      log_errors = On is enabled by default in the hard coded php.ini of LAMP.

      I've tried to add log_errors = Off to the php.ini file in the root dir of LAMP, thinking it would override the what's set in the php.ini system file, and then restarted the app, but it's not working.
      PHP keeps creating an increasing errors log file in the document root.

      Ignorance is not an excuse anymore!
      https://AutomateKit.com

      girishG 1 Reply Last reply
      0
      • micmcM micmc

        I absolutely need to disable errors log in PHP for a little while, otherwise my document root becomes fill with and increasing by the second errors.log file.

        log_errors = On is enabled by default in the hard coded php.ini of LAMP.

        I've tried to add log_errors = Off to the php.ini file in the root dir of LAMP, thinking it would override the what's set in the php.ini system file, and then restarted the app, but it's not working.
        PHP keeps creating an increasing errors log file in the document root.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @micmc the default value of log_errors per https://www.php.net/manual/en/errorfunc.configuration.php is "0". This is not changed in the package. I suspect maybe the app is overwriting this value and this is also why your custom ini changes have no effect.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #3

          Mm, the default is different in the package indeed. Some sites say the default value has changed in php 8.0. Maybe upstream docs are not correct.

          image.png

          I put this in php.ini and restarted the app:

          log_errors = Off
          

          Now, it's fine:
          image.png

          micmcM 1 Reply Last reply
          2
          • girishG girish

            Mm, the default is different in the package indeed. Some sites say the default value has changed in php 8.0. Maybe upstream docs are not correct.

            image.png

            I put this in php.ini and restarted the app:

            log_errors = Off
            

            Now, it's fine:
            image.png

            micmcM Offline
            micmcM Offline
            micmc
            wrote on last edited by
            #4

            @girish said in Temporarily disable log_errors in php.ini:

            Mm, the default is different in the package indeed. Some sites say the default value has changed in php 8.0. Maybe upstream docs are not correct.

            I put this in php.ini and restarted the app:

            log_errors = Off
            

            Yeah, I went to check the server's hard coded php.ini that's why I said it was On by default.

            Now, I've checked with a phpinfo.php file and I can see that the log_errors are now off indeed, but the reason I thought it was not is because the app still writes errors.log in the documentroot.

            So, what the reason can that possibly be, you think the app itself would write errors.log even though PHP log-errors if Off?

            Ignorance is not an excuse anymore!
            https://AutomateKit.com

            girishG 1 Reply Last reply
            0
            • micmcM micmc

              @girish said in Temporarily disable log_errors in php.ini:

              Mm, the default is different in the package indeed. Some sites say the default value has changed in php 8.0. Maybe upstream docs are not correct.

              I put this in php.ini and restarted the app:

              log_errors = Off
              

              Yeah, I went to check the server's hard coded php.ini that's why I said it was On by default.

              Now, I've checked with a phpinfo.php file and I can see that the log_errors are now off indeed, but the reason I thought it was not is because the app still writes errors.log in the documentroot.

              So, what the reason can that possibly be, you think the app itself would write errors.log even though PHP log-errors if Off?

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @micmc yeah, most likely it's the app. Maybe just grep through the code for errors.log ?

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search