Hi guys,
I have a mysql database, in which I want to store some files as longblobs. I'm using PEAR to connect to the DB. So far so good... until the files get over 16MB; the server takes ages to do the query and finally breaks without actually performing it.
I'm reading in the file to a variable in memory and outputting that variable in the SQL statement, e.g.
"INSERT INTO table VALUES('$fileContents');"
What's weird (and what makes me think it's not a max_allowed_packet problem) is that if I use MySQL's LOAD_FILE() function it works fine:
"INSERT INTO table VALUES(LOAD_FILE('$pathToFile'));"
Any ideas?
David