Author Topic: width 10 = width 2000 = Strange  (Read 9195 times)

0 Members and 1 Guest are viewing this topic.

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
width 10 = width 2000 = Strange
« on: November 19, 2002, 09:47:21 PM »
Hi all.  :D

I have a strange problem that I am too bad att php too solve myself.  :oops:
Even if I set the max width to 10px and heigt to 10px for uploaded pictures, I am still able to upload images larger than that.

My test image is a jpg that is 220height and 2000widht(!)

I have not altered the member.php and upload.php that seems to be involved in fileuploading.

Image size in KB works fine though.

Any ideas?

/ Zipper
I could not find this problem anywhere on the forum.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
width 10 = width 2000 = Strange
« Reply #1 on: November 20, 2002, 10:43:01 AM »
This restrictions only works if you  are NOT logged in as admin.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
reply
« Reply #2 on: November 20, 2002, 11:02:28 AM »
Hi there.

I am using a normal user account to test it ofcource.
Sorry for not telling that right away.  :oops:

/ Zipper

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
width 10 = width 2000 = Strange
« Reply #3 on: November 20, 2002, 11:05:49 AM »
Can i test this?

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
Sure
« Reply #4 on: November 20, 2002, 11:51:58 AM »
Sure you can.
I will send you a pm with the login info.
/ Zipper

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
width 10 = width 2000 = Strange
« Reply #5 on: November 20, 2002, 12:15:01 PM »
Uhmmm...thats strange. Try this:

Open includes/upload.php and change
Code: [Select]
$this->image_size = @getimagesize($this->upload_file);
to
Code: [Select]
$this->image_size = getimagesize($this->upload_file);
Upload an image and check it for any error messages.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
Thanks
« Reply #6 on: November 20, 2002, 01:08:23 PM »
Thank you Jan fot your interets in my problem.
I will try out the code this evening and post the result in this thread as soon as possible.

And thanks for a superb script by the way.  :lol:

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
Bad news.
« Reply #7 on: November 20, 2002, 09:30:25 PM »
I tried changing the line and my 2000px width image still got through.  :cry:

I also got the following errors on at the top of the page:

Code: [Select]
Warning: open_basedir restriction in effect. File is in wrong directory in /usr/webroot/sweclimb/gallery/includes/upload.php on line 84

Warning: getimagesize: Unable to open '/var/tmp/phplJpHYh' for reading. in /usr/webroot/sweclimb/gallery/includes/upload.php on line 84


I dont have a clue what this means, sorry.
/ Zipper

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
width 10 = width 2000 = Strange
« Reply #8 on: November 20, 2002, 10:15:35 PM »
Ok, this is a configuration of PHP. The image size check will not work, sorry.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline zipper

  • Newbie
  • *
  • Posts: 11
    • View Profile
Thanks
« Reply #9 on: November 20, 2002, 10:20:46 PM »
Ok, thanks alot for trying.
IŽll have to figure out som other way. Thanks.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
width 10 = width 2000 = Strange
« Reply #10 on: November 20, 2002, 11:31:43 PM »
Jan, is that couse PHP installed without EXIF extention support?
if so, zepper check your php.ini file and uncoment
Code: [Select]
extension=php_exif.dll
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
width 10 = width 2000 = Strange
« Reply #11 on: November 21, 2002, 12:15:09 AM »
Quote from: V@no
Jan, is that couse PHP installed without EXIF extention support?
if so, zepper check your php.ini file and uncoment
Code: [Select]
extension=php_exif.dll

FYI:

Doubtful.  http://www.php.net/manual/en/function.getimagesize.php