SOLVED - Image Upload Is Too Big


Subject: SOLVED - Image Upload Is Too Big
I want to upload an image and add it to the message via UPLOAD IMAGE button...

I got this hint: The file you are trying to upload is too big! Max allowed size: 1024000KB

Where can I change this file size?

Thanks

Last edited by Guest on Tue 02 Sep, 2008 08:00; edited 1 time in total
Profile PM  
Inactive User
Subject: Re: Image Upload Is Too Big
upload.php

$maxsize = (1000 * 1024); :mrgreen:

Subject: Re: Image Upload Is Too Big
but this limit can't biger than the "upload_max_filesize" option in the php.ini file of the server :wink:

Profile PM  
Inactive User
Subject: Re: Image Upload Is Too Big
True,

But it appears to be not using any board settings and takes the restriction directly from the upload.php file, which it also parses into the error message.

How the message deciphers this code to such a huge value - I have no Idea. ;)

Code: [Download] [Hide] [Select]
$maxsize = (1000 * 1024);


if($file_size > $maxsize)
{
message_die(GENERAL_MESSAGE, $lang['Upload_File_Too_Big'] . ' ' . $maxsize . 'KB');
}

Subject: Re: Image upload is too big
Thanks both... hopfully I can change it.

Do you know why its limited in php.ini

Profile PM  
Inactive User
Subject: Re: Image Upload Is Too Big
Global php.ini comes with the default max of 2MB.

Quote:
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M


You can overwrite it up to a point by creating a local php.ini file with this content:

; Maximum allowed size for uploaded files.
upload_max_filesize = 8M

and upoading it to the Public Folder and CHMOD to 705 (As most recommend this setting).

Also ensure that there is a tmp folder in the root and CHMOD to either 755 or 777 as required by the server.

At most, you could probably set the file size to 8MB - maybe less. If you can't increase it, then you would need to contact your ISP.

:mricy:

Subject: Re: Image upload is too big
Lopalong wrote: [View Post]
True,

But it appears to be not using any board settings and takes the restriction directly from the upload.php file, which it also parses into the error message.

How the message deciphers this code to such a huge value - I have no Idea. ;)

Code: [Download] [Hide] [Select]
$maxsize = (1000 * 1024);


if($file_size > $maxsize)
{
message_die(GENERAL_MESSAGE, $lang['Upload_File_Too_Big'] . ' ' . $maxsize . 'KB');
}


There was an error in this... I should have fixed it... you can check in SVN... :P


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2042s (PHP: 9% SQL: 91%)
SQL queries: 14 - Debug Off - GZIP Enabled