响应式文件管理器内存限制错误

时间:2017-08-15 13:13:09

标签: php file-upload responsive-filemanager

我在使用响应文件管理器上传大文件时遇到问题,显示内存限制错误不足。

我尝试在php.ini中更改限制

上传限制为100MB 发布最大尺寸为100MB 脚本内存限制为300MB 最长执行时间为300

我也改变了config.php的限制

'MaxSizeUpload'=> 100

但仍然是同样的错误。

现在甚至很少有100 kb没有上传。

可能是什么问题?

编辑1:

我使用响应式文件管理器中的默认upload.php来上传我的文件

在第157行检查内存错误

默认upload.php

我的config.php

<?php
if (session_id() == '') session_start();

mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
date_default_timezone_set('Asia/Kolkata');


define('USE_ACCESS_KEYS', false); // TRUE or FALSE

define('DEBUG_ERROR_MESSAGE', true); // TRUE or FALSE

$config = array(

    'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && ! in_array(strtolower($_SERVER['HTTPS']), array( 'off', 'no' ))) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'],

    'upload_dir' => '/photos/original/',

    'current_path' => '../photos/original/',

    'thumbs_base_path' => '../cache/',

    'ftp_host'         => false,
    'ftp_user'         => "user",
    'ftp_pass'         => "pass",
    'ftp_base_folder'  => "base_folder",
    'ftp_base_url'     => "http://site to ftp root",

    'ftp_thumbs_dir' => '/thumbs/',
    'ftp_ssl' => false,
    'ftp_port' => 21,

    'access_keys' => array(),

    'MaxSizeTotal' => false,

    'MaxSizeUpload' => 100,

    'fileFolderPermission' => 0755,

    'default_language' => "en_EN",

    'icon_theme' => "ico",

    'show_total_size'                       => false,

    'show_folder_size'                      => false,

    'show_sorting_bar'                      => true,

    'show_filter_buttons'                   => true,

    'show_language_selection'               => false,

    'transliteration'                       => false,

    'convert_spaces'                        => false,

    'replace_with'                          => "_",
    'lower_case'                            => false,
    'add_time_to_img'                       => false,

    'lazy_loading_file_number_threshold'    => 0,
    'image_max_width'                         => 0,
    'image_max_height'                        => 0,
    'image_max_mode'                          => 'auto',

    'image_resizing'                          => false,
    'image_resizing_width'                    => 0,
    'image_resizing_height'                   => 0,
    'image_resizing_mode'                     => 'auto', 
    'image_resizing_override'                 => false,

    'image_watermark'                          => false,

    'image_watermark_position'                 => 'br',

    'image_watermark_padding'                 => 0,

    'default_view'                            => 0,

    'ellipsis_title_after_first_row'          => true,

    'delete_files'                            => true,
    'create_folders'                          => false,
    'delete_folders'                          => false,
    'upload_files'                            => true,
    'rename_files'                            => true,
    'rename_folders'                          => false,
    'duplicate_files'                         => false,
    'copy_cut_files'                          => true, // for copy/cut files
    'copy_cut_dirs'                           => false, // for copy/cut directories
    'chmod_files'                             => false, // change file permissions
    'chmod_dirs'                              => false, // change folder permissions
    'preview_text_files'                      => false, // eg.: txt, log etc.
    'edit_text_files'                         => false, // eg.: txt, log etc.
    'create_text_files'                       => false, // only create files with exts. defined in $editable_text_file_exts

    'previewable_text_file_exts'              => array( "bsh", "c","css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml","xsl" ),
    'previewable_text_file_exts_no_prettify'  => array( 'txt', 'log' ),

    'editable_text_file_exts'                 => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js' ),

    'googledoc_enabled'                       => true,
    'googledoc_file_exts'                     => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' ),
    'viewerjs_enabled'                        => true,
    'viewerjs_file_exts'                      => array( 'pdf', 'odt', 'odp', 'ods' ),
    'copy_cut_max_size'                       => 100,

    'copy_cut_max_count'                      => 200,

    'ext_img'                                 => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg' ), //Images
    'ext_file'                                => array(), //Files
    'ext_video'                               => array(), //Video
    'ext_music'                               => array(), //Audio
    'ext_misc'                                => array(), //Archives

    'aviary_active'                           => false,
    'aviary_apiKey'                           => "2444282ef4344e3dacdedc7a78f8877d",
    'aviary_language'                         => "en",
    'aviary_theme'                            => "light",
    'aviary_tools'                            => "all",
    'aviary_maxSize'                          => "1400",

    'file_number_limit_js'                    => 500,

    'hidden_folders'                          => array(),

    'hidden_files'                            => array( 'config.php' ),
    'url_upload'                             => false,

    'java_upload'                             => false,
    'JAVAMaxSizeUpload'                       => 200, //Gb

    'fixed_image_creation'                    => false, 
    'fixed_path_from_filemanager'             => array( '../images/thumbs2/', '../test1/' ), 
    'fixed_image_creation_name_to_prepend'    => array( 'thumb_', 'test_' ), 
    'fixed_image_creation_to_append'          => array( '', '' ),
    'fixed_image_creation_width'              => array( 300, 400 ), 
    'fixed_image_creation_height'             => array( 200, '' ),

    'fixed_image_creation_option'             => array( 'auto', 'auto' ), 

    'relative_image_creation'                 => true, 
    'relative_path_from_current_pos'          => array( '../hd', '../fullhd','../thumbs' ), 
    'relative_image_creation_name_to_prepend' => array( '', '' , ''), 
    'relative_image_creation_name_to_append'  => array( '', '',''),
    'relative_image_creation_width'           => array( 1280, 1920 , 200),
    'relative_image_creation_height'          => array( 720, 1080, 200 ),

    'relative_image_creation_option'          => array( 'auto', 'auto', 'auto' ),


    'remember_text_filter'                    => false,

);

return array_merge(
    $config,
    array(
        'MaxSizeUpload' => ((int)(ini_get('post_max_size')) < $config['MaxSizeUpload'])
            ? (int)(ini_get('post_max_size')) : $config['MaxSizeUpload'],
        'ext'=> array_merge(
            $config['ext_img'],
            $config['ext_file'],
            $config['ext_misc'],
            $config['ext_video'],
            $config['ext_music']
        ),

        'aviary_defaults_config' => array(
            'apiKey'     => $config['aviary_apiKey'],
            'language'   => $config['aviary_language'],
            'theme'      => $config['aviary_theme'],
            'tools'      => $config['aviary_tools'],
            'maxSize'    => $config['aviary_maxSize']
        ),
    )
);
?>

error screenshot

1 个答案:

答案 0 :(得分:0)

如果您使用的是NGINX,则应检查已配置的最大帖子实体大小。在我的默认配置中,它小于PHP发布文件的限制。