Image Uploading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Image Uploading

Post by iknownothing »

Hey guys,
I'm just wondering if their are any "stock" parameters for image upload eg. max 1mb, max 1000 x 1000 size, no parameters have been set, yet some images wont upload.
.Stealth
Forum Commoner
Posts: 57
Joined: Wed Jan 10, 2007 12:15 pm
Location: Manchester, England

Re: Image Uploading

Post by .Stealth »

iknownothing wrote:Hey guys,
I'm just wondering if their are any "stock" parameters for image upload eg. max 1mb, max 1000 x 1000 size, no parameters have been set, yet some images wont upload.
not sure if theres a max dimension.
but if your on a shared server, there can be restrictions to how much can be uploaded at once.
if you have your own server then you can change the max upload in the php.ini file
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Limiting the byte size is no real problem, but it's not possible to limit the pixel dimensions prior to your script being run.

http://php.net/features.file-upload
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

In my experience the default max upload filesize is 8M on most shared servers, while it's only 2M by default in a fresh php.ini
Post Reply