Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Image copying issues

images php coding issues or problems here.

Moderators: macek, egami, gesf

Image copying issues

Postby lostboy » 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...

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

Postby Redcircle » Sun Jun 06, 2004 11:05 am

as far as I know the var size is limited by your server/os
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby swirlee » 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.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron