<legend id='sTUCc'><style id='sTUCc'><dir id='sTUCc'><q id='sTUCc'></q></dir></style></legend>

<small id='sTUCc'></small><noframes id='sTUCc'>

        <bdo id='sTUCc'></bdo><ul id='sTUCc'></ul>

    1. <tfoot id='sTUCc'></tfoot>
        <i id='sTUCc'><tr id='sTUCc'><dt id='sTUCc'><q id='sTUCc'><span id='sTUCc'><b id='sTUCc'><form id='sTUCc'><ins id='sTUCc'></ins><ul id='sTUCc'></ul><sub id='sTUCc'></sub></form><legend id='sTUCc'></legend><bdo id='sTUCc'><pre id='sTUCc'><center id='sTUCc'></center></pre></bdo></b><th id='sTUCc'></th></span></q></dt></tr></i><div id='sTUCc'><tfoot id='sTUCc'></tfoot><dl id='sTUCc'><fieldset id='sTUCc'></fieldset></dl></div>

        Docker:PhpMyAdmin 的上传限制为 2048KiB

        时间:2023-10-11
        <legend id='XLYhz'><style id='XLYhz'><dir id='XLYhz'><q id='XLYhz'></q></dir></style></legend>
          <i id='XLYhz'><tr id='XLYhz'><dt id='XLYhz'><q id='XLYhz'><span id='XLYhz'><b id='XLYhz'><form id='XLYhz'><ins id='XLYhz'></ins><ul id='XLYhz'></ul><sub id='XLYhz'></sub></form><legend id='XLYhz'></legend><bdo id='XLYhz'><pre id='XLYhz'><center id='XLYhz'></center></pre></bdo></b><th id='XLYhz'></th></span></q></dt></tr></i><div id='XLYhz'><tfoot id='XLYhz'></tfoot><dl id='XLYhz'><fieldset id='XLYhz'></fieldset></dl></div>

          • <tfoot id='XLYhz'></tfoot>
          • <small id='XLYhz'></small><noframes id='XLYhz'>

                <bdo id='XLYhz'></bdo><ul id='XLYhz'></ul>
                    <tbody id='XLYhz'></tbody>
                • 本文介绍了Docker:PhpMyAdmin 的上传限制为 2048KiB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个看起来像这样的 docker-compose.yml:

                  i have a docker-compose.yml that looks like this:

                  webserver:
                    build: ./_docker/php
                    ports:
                      - 80:80
                    links:
                      - mysql
                    volumes_from:
                      - app
                  
                  mysql:
                    image: mysql:5.7
                    environment:
                      MYSQL_DATABASE: "${DB_NAME}"
                      MYSQL_USER: "${DB_USER}"
                      MYSQL_ROOT_PASSWORD: "${DB_ROOT_PW}"
                      MYSQL_PASSWORD: "${DB_PW}"
                    volumes:
                      - ./_docker/data/db:/docker-entrypoint-initdb.d
                    volumes_from:
                      - data
                  
                  data:
                    image: mysql:5.7
                    volumes:
                      - /var/lib/mysql
                    command: "true"
                  
                  phpmyadmin:
                    image: phpmyadmin/phpmyadmin
                    ports:
                      - 8080:80
                    links:
                      - mysql
                    environment:
                      PMA_HOST: mysql
                  
                  app:
                    image: tianon/true
                    volumes:
                      - .:/var/www/public_html
                  

                  Dockerfile 看起来像这样:

                  Dockerfile looks like this:

                  FROM php:7.0-apache
                  #php:7.2.2-apache
                  #php:5.6.33-apache
                  
                  COPY php.ini /usr/local/etc/php/
                  
                  COPY 000-default.conf /etc/apache2/sites-available/
                  
                  RUN a2enmod rewrite
                  RUN a2enmod expires
                  RUN a2enmod headers
                  
                  RUN apt-get update
                  RUN apt-get install -y zlib1g-dev libxml2-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12.0 imagemagick
                  RUN docker-php-ext-install mysqli zip soap
                  RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
                  RUN docker-php-ext-install gd
                  
                  # Install opcache
                  RUN docker-php-ext-install opcache
                  

                  和这样的 php ini:

                  and the php ini like this:

                  max_input_vars = 1500
                  max_execution_time = 300
                  post_max_size=50M
                  upload_max_filesize=50M
                  

                  当我启动容器时,我的网络服务器位于 http://localhost.

                  when i start the container i have my webserver located on http://localhost.

                  我在里面放了一个带有 phpinfo();index.php,它显示 php.ini 可以工作.

                  i put an index.php with a phpinfo(); inside it and it shows, that the php.ini works.

                  当我打开 http://localhost:8080 并登录到 PMA 时,它显示我的上传限制设置为 2048KiB.

                  When i open http://localhost:8080 and login to PMA it shows me that my upload limit i set to 2048KiB.

                  在哪里可以更改?

                  提前致谢!

                  推荐答案

                  像这样在 docker 中使用 UPLOAD_LIMIT env.这是来自我的 docker-compose.yml.UPLOAD_LIMIT 的默认值为 2048K,即 2048KiB.将值设置为 300M 将增加到 300MiB.

                  Use like this UPLOAD_LIMIT env in docker. This is from my docker-compose.yml. Default value for UPLOAD_LIMIT is 2048K which is 2048KiB. Setting value to 300M increases it to 300MiB.

                  参考:https://github.com/phpmyadmin/docker#environment-variables-总结

                   phpmyadmin:
                      image: phpmyadmin/phpmyadmin
                      container_name: 'php7.3-phpmyadmin'
                      restart: 'always'
                      links:
                        - mysql
                      environment:
                        PMA_HOST: mysql
                        PMA_PORT: 3306
                        UPLOAD_LIMIT: 300M
                      ports:
                        - '8082:80'
                      volumes:
                        - /sessions
                  

                  这篇关于Docker:PhpMyAdmin 的上传限制为 2048KiB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在某个域上安装phpmyadmin后内部服务器错误(HTTP Error 500) 下一篇:如何在 phpmyadmin 中导出不包含 id 列(AUTO_INCREMENT 列)

                  相关文章

                    <bdo id='TvMNH'></bdo><ul id='TvMNH'></ul>
                  <i id='TvMNH'><tr id='TvMNH'><dt id='TvMNH'><q id='TvMNH'><span id='TvMNH'><b id='TvMNH'><form id='TvMNH'><ins id='TvMNH'></ins><ul id='TvMNH'></ul><sub id='TvMNH'></sub></form><legend id='TvMNH'></legend><bdo id='TvMNH'><pre id='TvMNH'><center id='TvMNH'></center></pre></bdo></b><th id='TvMNH'></th></span></q></dt></tr></i><div id='TvMNH'><tfoot id='TvMNH'></tfoot><dl id='TvMNH'><fieldset id='TvMNH'></fieldset></dl></div>

                • <small id='TvMNH'></small><noframes id='TvMNH'>

                  1. <legend id='TvMNH'><style id='TvMNH'><dir id='TvMNH'><q id='TvMNH'></q></dir></style></legend>

                    1. <tfoot id='TvMNH'></tfoot>