Help - Search - Members - Calendar
Full Version: mysql has 'gone away'
The Planet Forums > Control Panels > Plesk
richy
hi, funny problem, trying to upload mp3s (legal of course) into a mysql database via php. on trying to do so after uploading it states 'mysql has gone away' ???? it will allow other file types to upload. i upped the filesize limit from 2 to 4 mb. i increased the timeout. disabled safe mode, none of it made a diff. only mp3s. always this error. scanned thru all the conf and ini files i could find and not a mention of mp3 apart form the audio mime type.
any clues? also no mention i could find in the mysql documentation site search.
Danimal
You might read about it here:

http://www.mysql.com/doc/G/o/Gone_away.html

One thing I can think of: if you are stuffing the raw data of the MP3 file into a MySQL field, make sure it is a binary field (like blob).

I know that MySQL can handle large binary files. I've got a PHP/MySQL app to keep track of all my ebooks, which are in compressed DOC format (PalmDOC, not MicroSloth DOC). It works just fine with multiple-meg files.

One other tip I learned the hard way: if you are going to write code to search for MP3s from your database, have a separate reference table for just the blob data. Then, your searches & listings will only hit the table that contains the simple data (artist, year, genre, title, etc.). I originally had the ebook data in the same table as the author, series, title, etc., and when I tried to build a page that showed the ebooks, it took _forever_. Once I moved the ebook binary data to a separate reference table, everything worked lickity-split.

-Danimal cool.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.