|
Adamzon
|
 |
« on: December 30, 2006, 07:01:11 am » |
|
Hi! I got a big problem. In the config i have made the value to 100.000 bytes but members can upload pictures that are huge! 1-2-3 mb! A bug or is it me that is a bug  /adam
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #1 on: December 30, 2006, 09:24:12 am » |
|
Strange, Hmm Can you run a test for me? Open Gallery.php in your sources folder. Find function AddPicture2() Scroll down till you find $filesize = $_FILES['picture']['size'];
After it add die('FileSize: ' . $filesize);
And tell me what it what it returns when you add a single picture to a category. After you are finished with the test remove die('FileSize: ' . $filesize);
|
|
|
|
|
Logged
|
|
|
|
|
Adamzon
|
 |
« Reply #2 on: December 30, 2006, 09:29:57 am » |
|
Got a white page with the test: FileSize: 1124819
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #3 on: December 30, 2006, 09:32:46 am » |
|
Well that's good it is returning the size. Try another test in the same area die('MaxFileSize: ' . $modSettings['gallery_max_filesize']);
|
|
|
|
|
Logged
|
|
|
|
|
Adamzon
|
 |
« Reply #4 on: December 30, 2006, 09:35:22 am » |
|
i put back the org gallery.php file and god this "error".. Picture exceeds max filesize. Max Filesize is 97.66kb
"Resize Images if too large" dont work then?
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #5 on: December 30, 2006, 09:39:47 am » |
|
Well resize images. Only checks the height and width. hmmm. That might be it have to recheck the resized image size.
|
|
|
|
|
Logged
|
|
|
|
|
Adamzon
|
 |
« Reply #6 on: December 30, 2006, 09:42:45 am » |
|
No, not that i know of. I cant find a setting for this
/adam
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #7 on: December 30, 2006, 09:45:48 am » |
|
Figured it out. Gallery.php In the addpicture2 and editpicture2 functions Find $filesize = $_FILES['picture']['size']; Replace with if($image_resized == 1) { $filesize = filesize($_FILES['picture']['tmp_name']); } else { $filesize = $_FILES['picture']['size']; }
|
|
|
|
|
Logged
|
|
|
|
|
Adamzon
|
 |
« Reply #8 on: December 30, 2006, 09:55:24 am » |
|
After your hack, i still got the Picture exceeds max filesize. Max Filesize is 97.66kb "error" Put the org file here: http://alfa.glidarhoj.se/file//adam
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #9 on: December 30, 2006, 09:59:59 am » |
|
Well how big is the file that you are uploading? This is supposed to fix the max file size setting from being avoided by image resize.
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #10 on: December 30, 2006, 10:02:59 am » |
|
100000 Bytes equals = 97.65625 Kilobytes I caculate via 1024
So 100000 / 1024 = 97.65625
|
|
|
|
|
Logged
|
|
|
|
|
Adamzon
|
 |
« Reply #11 on: December 30, 2006, 11:07:05 am » |
|
So the resize function is no function at all?
I want my money back, i feel that i the product i buyed was going to have a function to resize pictures.
That was why i buyed the product from u....
|
|
|
|
|
Logged
|
|
|
|
|
SMFHacks
|
 |
« Reply #12 on: December 30, 2006, 11:10:57 am » |
|
The resize function works. I did not say it didn't work.
|
|
|
|
|
Logged
|
|
|
|
|
RWL
|
 |
« Reply #13 on: December 30, 2006, 11:13:26 am » |
|
Hey, This is a quality gallery and the support here is awesome. Be a little more patient  Regards, Wilsy.
|
|
|
|
|
Logged
|
RewindLancs.com Management 
|
|
|
|
Adamzon
|
 |
« Reply #14 on: December 30, 2006, 03:08:55 pm » |
|
ok, sorry. I´m frustrated (spells)
So, whats the problem and how do we solv it?
|
|
|
|
|
Logged
|
|
|
|
|