Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts

    getimagesize problem

    getimagesize() seems to work fine on my local server for just about any image size, however, on my host's server, if the dimenstions exceed a certain limit (not sure what that is), getimagesize returns nothing.

    anybody know why?

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    How are the file permissions? I'm running XAMPP and Ubuntu and sometimes I have to change the file permissions that I move to the htdocs folder, never had to do that on Windows and XAMPP.
    Leonard Whistler

  • #3
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    nah, the permissions are fine. it's definitely the file size (bytes and/or dimensions) that are causing getimagesize() to fail. i've set the upload and post max values in php.ini so i'm able to upload large files just fine, but once they're uploaded i scale them down and shove them in other folders (and kill the original). why this works locally on any size file, but not on my host... hmmmmmmmmmmmmmmmmmmmmm.

  • #4
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    this is weird. size (bytes) seems to have nothing to do with it. a 1100x900 won't work, but a 640 x 480 will work UNLESS it's created with FastStone's paint pgm. I'm not blaming FastStone, but there appears to be some quirkiness about what getimagesize() can handle (but only on my HostMonster server, not my machine.

    btw, imagesx() and imagesy() don't seem to work at all.
    Last edited by snoodle; 04-30-2009 at 07:47 AM.

  • #5
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Holy Moly! The problem was...

    My machine is Windows. My host's server is Unix. The problem had to do with a filename upper/lowercase issue, which of course, Windows doesn't care about.

    It's always the simplest thing that gets you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •