Comment on Tutorial - Handling BLOB in PHP and MySQL By Andi, Stig and Derick



Comment Added by : Tony Gingrich

Comment Added at : 2011-10-23 21:22:31

Comment on Tutorial : Handling BLOB in PHP and MySQL By Andi, Stig and Derick
I'm working on an intranet site/web application. We have a table for file storage (MySQL 4.1.22/InnoDB engine), with a field defined as LONGBLOB. MySQL specifies this type to be able to handle just over 4GB. While we will never be pushing this much data to a record, we do have a few instances of BLOBS up to 32MB, which is too much for the MEDIUMBLOB type.

However, I am using the mysql_query() method of inserting. This works well for data as long as 10MB, but the call hangs (no exceptions, timeouts, etc...just simply hangs as if in an infinite loop) for several hours. I have temporarily unlimited all PHP timeouts, as well as insured the max_allowed_packet on our MySQL instance is at 200MB (a little overkill, just to be sure). I even went so far as to set the net_write_timeout value to 120 seconds and the net_read_timeout to 240 seconds. Both the web and db servers are on our LAN (100Mb), so there is optimal communication between the 2 machines.

Are there any other settings I should be aware of to check? Also, is it possible that this is a limitation of the mysql_query() method, and that I need to switch up and use the mysqli interface?

I'm really at a loss here. My background comes from MS SQL, so I am still learning my way around MySQL.

Thanks in advance!


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I am getting error in setContentView(R.layout.main
View Tutorial          By: Malick at 2013-06-30 06:57:30

2. Nice site to assist learners to study without much
View Tutorial          By: Hot.g at 2009-12-01 02:36:02

3. Hi This is very fine to understanding struts flo
View Tutorial          By: Abinash at 2011-06-28 08:27:18

4. u said that const function cant change object.can
View Tutorial          By: z at 2010-05-09 12:02:17

5. I am very much thankfull to you in providing the c
View Tutorial          By: c vijaychandar at 2010-05-05 10:14:59

6. hiii frds i want to run this program can i run usi
View Tutorial          By: arun kumar ojha at 2011-07-20 00:59:10

7. Thanks a lot for this nice tutorial, it is very he
View Tutorial          By: Ted at 2014-02-07 12:50:24

8. where i can find jar files?
please tell me

View Tutorial          By: chandu at 2012-06-17 14:14:28

9. javax.microedition.media.MediaException: Malformed
View Tutorial          By: adi at 2012-04-01 11:51:17

10. I think it is the best article for freshers.thanks
View Tutorial          By: srikanth at 2010-11-01 23:27:53