Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-30-2009, 05:48 AM   PM User | #1
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
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?
snoodle is offline   Reply With Quote
Old 04-30-2009, 06:06 AM   PM User | #2
Len Whistler
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
Len Whistler is on a distinguished road
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
Len Whistler is offline   Reply With Quote
Old 04-30-2009, 06:15 AM   PM User | #3
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
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.
snoodle is offline   Reply With Quote
Old 04-30-2009, 06:35 AM   PM User | #4
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
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 06:47 AM..
snoodle is offline   Reply With Quote
Old 04-30-2009, 04:36 PM   PM User | #5
snoodle
Regular Coder

 
Join Date: May 2007
Location: Manteca, CA
Posts: 219
Thanks: 4
Thanked 0 Times in 0 Posts
snoodle is an unknown quantity at this point
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.
snoodle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:04 PM.


Advertisement
Log in to turn off these ads.