Image copying issues

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 10
Joined: Thu Jun 03, 2004 6:41 am
Location: Toronto, Canada

Thu Jun 03, 2004 6:52 am

Hi Guys,

Just found this forum and joined up...

Question: Is there a limit to the size of an image that can be loaded into mysql with PHP? I know, I know, but its not my decision to do this. The powers that be are rather close minded about this.

I have heard there is a 64k limit to a single variable and obviously a 64K variable can't hold a 1.5M image, can it?

The goal of this little task is copy certain rows of data from a remote host DB to a local system (and eventually to re-sync the host db).
Please let me know your thoughts...


Cat, the other other white meat

User avatar
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Sun Jun 06, 2004 11:05 am

as far as I know the var size is limited by your server/os

User avatar
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Mon Jun 07, 2004 10:20 am

To my knowledge, there's no limit to the size of a single variable in PHP. There is, however, a limit to how much memory a single instance of a running script can use, which is set in PHP.ini. I think the default is 8MB. See "Resource Limits" on this page.

Concerning MySQL, the amount of data you put in a column depends upon the column type. The largest column type in MySQL is LONGBLOB/LONGTEXT, and it can hold up to 2^32 bytes, or about 4.3GB (yes, gigabytes).

So, unless you're storing really big images, you shouldn't have any trouble.

Post Reply