Image exceeds the size limit 1024

Hi,

When I try to upload images using flash uploader or basic uploader I get the error "image exceeds the size limit 1024"

I have provided 7 MB as the maximum size of the image to upload it. But I am getting this error even if I am uploading images of 2 or 2.5 MB.

Please help me in resolving this issue

  • Hi,

    I checked the link that you have provided and found that I can also change the code in .htaccess file.

    This is the code that's there in my .htaccess file, should I change this.

    <IfModule mod_php5.c>
    # limit the maximum memory consumed by the php script to 64 MB
    php_value memory_limit 64M
    # register_globals is deprecated as of PHP 5.3.0 - disable it for security reasons.
    php_value register_globals 0
    # post_max_size is the maximum size of ALL the data that is POST'ed to php at a time (8 MB)
    php_value post_max_size 8388608
    # upload_max_filesize is the maximum size of a single uploaded file (5 MB)
    php_value upload_max_filesize 5242880
    # on development servers, set to 1 to display errors. Set to 0 on production servers.
    php_value display_errors 0
    </IfModule>

  • is this your current htaccess ?

    if yes, is it being read properly ?

    if you look in the "server info" in the tidypics settings as the admin user, does it show a 5mb upload limit like stated in the htaccess?

    Brad

  • i did mine on php.ini because i am using shared hosting...

     

    brad

  • Hi,

    In the settings of my tidypics

    Maximum image size in megabytes (MB):7MB

    Server information is as stated below

    PHP Version 5.3.24  
    GD Enabled Elgg requires the GD extension to be loaded
    imagick Enabled  
    exec() Enabled Required for ImageMagick command line
    Memory Available to PHP 64MB Change memory_limit to increase
    Memory Used to Load This Page 9.16 MB This is approximately the minimum per page
    Max File Upload Size 32MB Max size of an uploaded photo file
    Max Post Size 33MB Max post size = sum of photos + html form
    Max Input Time 60s Time script waits for upload to finish
    Max Execution Time 30 s Max time a script will run
    GD imagejpeg Enabled  
    GD imagepng Enabled  
    GD imagegif Enabled  
    EXIF Enabled  
    Cookie only sessions Enabled Cookie only sessions may affect the Flash uploader

    I can see that as suggested by you the file size in the settings and .htaccess is not the same. Should I change this in settings as I feel that 7MB is very huge and 5MB will be sufficient.

    Previous to changing 5 MB to 7MB I had got the same error as mentioned above and hence I changed it to 7MB but still the error exists

  • I dont think changing anything in tidypics setting with have an impact..

    For somereason tidypics seems to think you have a 1024 (1mb) limit for "Max File Upload Size"

    Elgg thinks you have a 32Mb limit

    Your htaccess seems to state 5mb (but i feel that is not being read either because of location or permissions or something.

    Make sure to also "Server Information" in the "Admin" dashboard under "Statistics" -> "Server Info" make sure its the same...

    The best strategy in my mind is to make sure you know where PHP is reading the "Max File Upload Size" variable from and that it is the same as what is being shown in the "Server Information". Then match the Tidypics config to that. 5mb is fine, except for more modern DSLR camera's which are creating larger files.

    B

     

  • Hi,

    But my server info is completly different.

    PHP version : 5.3.24
    PHP ini file location : /home/content/33/11326133/html/php5.ini
    PHP Log : Web server's error log
    Memory available : 67,108,864
    Memory used : 2,542,456
    POST maximum size : 34,603,008
    Upload maximum size : 33,554,432  
  • Change the php variables mentioned earlier.

    Make sure this one:

    php_value post_max_size

    Is set to 28 M

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • If the values for example of post_max_size, memory_limit and upload_max_filesize in .htaccess of Elgg is different from the values shown on the Tidypics server info tab or on the output of phpinfo() your server is configured in a way that ignores the php variable settings in any .htaccess file. This can for example be the case when suexec runs on your server. In this case the only way to modify the values of php variables is by changing them in php.ini. Ask your webhoster support.

    The image filesize limit on the Tidypics settings page is meant to limit the image size to lower values than set for example in .htaccess or php.ini. This way you could upload for example videos or any other larger files using the files plugin or other plugins but still limit the size of images to be uploaded using Tidypics to smaller sizes.

  • @rjcalifornia , should I change the "php_value post_max_size 8388608" in .htaccess to "php_value post_max_size 28M"