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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Unsolved php.ini how to set post max size?

    Lychee
    3
    10
    773
    Loading More Posts
    • 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.
    • T
      teamcrw last edited by

      Hi,

      did anyone manage to set post max size and/or upload max size etc. in the php.ini?

      I did this via the file browser in Cloudron like this:

      ; Add custom PHP configuration in this file
      ; Settings here are merged with the package's built-in php.ini
      post_max_size = 100000M
      upload_max_size = 100000M
      upload_max_filesize = 100000M

      But i still get the upload error "php post max size limit is too small".

      I'm probably editing the wrong php.ini ? I'm editing the one that i see in the file browser in cloudron in the lychee settings /lychee/php.ini

      Thanks in advance i will appreciate any help

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @teamcrw last edited by

        @teamcrw there was a bug in the package. I have pushed an update now. Can you update and check?

        T 1 Reply Last reply Reply Quote 0
        • T
          teamcrw @girish last edited by

          @girish

          updated, restartet the app, set php.ini as in my previous comment, uploaded a 1GB .mp4 file and got an "unknown error from server".

          Here's the log:

          2021-10-21 10:32:54 -- notice -- App\Metadata\Extractor::extract -- 126 -- Falling back to native adapter.
          2021-10-21 10:32:54 -- error -- App\Metadata\Extractor::extract -- 121 -- Unable to probe /app/code/public/uploads/big/cb19f836c2830ff88ff45694565da65b.mp4
          2021-10-21 10:30:13 -- notice -- App\Metadata\Extractor::extract -- 126 -- Falling back to native adapter.

          murgero girish 2 Replies Last reply Reply Quote 0
          • murgero
            murgero App Dev @teamcrw last edited by

            @teamcrw You should also increase script execution time if you are upload large files like that.

            --
            https://urgero.org
            ~ Professional Nerd. Freelance Programmer. ~
            Matrix: @murgero:urgero.org

            T 1 Reply Last reply Reply Quote 0
            • T
              teamcrw @murgero last edited by

              @murgero

              i changed max_execution_time = 200 to max_execution_time = 200000, this didn't help.

              I also changed memory_limit = 256M to memory_limit = 2048M (i have enough RAM left on the server to do this). This didn't help either.

              murgero 1 Reply Last reply Reply Quote 0
              • murgero
                murgero App Dev @teamcrw last edited by

                @teamcrw Did you change the app's resources as well (will need to be 4GB since cloudron splits RAM 50/50 with swap)

                --
                https://urgero.org
                ~ Professional Nerd. Freelance Programmer. ~
                Matrix: @murgero:urgero.org

                T 1 Reply Last reply Reply Quote 0
                • T
                  teamcrw @murgero last edited by teamcrw

                  @murgero

                  I already had the app ressources set to 2GB, i have now set it to 4GB, didn't change anything.

                  1 Reply Last reply Reply Quote 0
                  • girish
                    girish Staff @teamcrw last edited by girish

                    @teamcrw Do you think you can try with a new install? Maybe there is some update issue, I can check after you can verify the below.

                    This is what I did

                    • Installed a new package
                    • Setup user and checked the Diag view.

                    8e9097af-e0d1-4073-87c0-fd2a55e3f862-image.png

                    • Then, I go to File Manager and edit the /app/data/php.ini like below:
                    ; Add custom PHP configuration in this file
                    ; Settings here are merged with the package's built-in php.ini
                    
                    
                    post_max_size = 100000M
                    upload_max_size = 100000M
                    upload_max_filesize = 100000M
                    
                    • Restart the app

                    • Check the diag view again:
                      5eed9f25-3732-4f2d-86a2-f0dae08a3920-image.png

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      teamcrw @girish last edited by teamcrw

                      @girish

                      First, thank you for your time and for helping me out.

                      So, i did a fresh install of lychee, and did exactly the same as you.
                      In Diag View it shows the same as yours, see:

                      Screenshot from 2021-10-22 11-51-56.png

                      But i still get this error:

                      Screenshot from 2021-10-22 11-55-57.png

                      UPDATE: I also tried different browsers. Same error.

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @teamcrw last edited by

                        @teamcrw I think the issue is not related the php settings. When the settings are low, it says so in the UI like below:

                        da9bd484-a37c-49d0-9c60-ea76a692d250-image.png

                        I am wondering if the issue is max_execution_time per https://lycheeorg.github.io/docs/faq.html#i-cant-upload-large-photos . The default value is set to 200, so that's under 3 minutes (can set it to 0 also to disable). Can you set it to much larger value and try? How long does your upload of 1GB take?

                        You can also set APP_DEBUG=true in the env file and then restart the app. Check for errors in the browser and also Show Logs in the lychee UI after upload fails.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB