SOLVED - Image Upload Is Too Big »  Show posts from    to     

Icy Phoenix


Old Support Topics - SOLVED - Image Upload Is Too Big



TheSteffen [ Sat 23 Aug, 2008 04:22 ]
Post 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


Lopalong [ Sat 23 Aug, 2008 06:41 ]
Post subject: Re: Image Upload Is Too Big
upload.php

$maxsize = (1000 * 1024);


New Player [ Sat 23 Aug, 2008 09:49 ]
Post 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


Lopalong [ Sat 23 Aug, 2008 12:59 ]
Post 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: [Hide] [Select]
$maxsize = (1000 * 1024);


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


TheSteffen [ Sat 23 Aug, 2008 18:25 ]
Post subject: Re: Image upload is too big
Thanks both... hopfully I can change it.

Do you know why its limited in php.ini


Lopalong [ Sun 24 Aug, 2008 01:39 ]
Post 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.



Mighty Gorgon [ Fri 29 Aug, 2008 22:24 ]
Post 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: [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...




Powered by Icy Phoenix