Hello,
I've run into a strange issue lately and was wondering if any of you skilled folks could help me to resolve it!
I am running PHP 4.3.2 and MySQL 4.0.18 on a Mac OS X 10.3.3 Server system. I am building an application that will write MIME E-mail messages into a database, but am having troubles inserting large sized data. Specifically, certain files I am trying to write will cause MySQL to spit the error "MySQL Server has gone away." Googling for this phrase shows that the common cause is when a INSERT or UPDATE is larger than max_allowed_packet, but my max_allowed_packet is set to 128M and the entry I am trying to insert is only twenty!
I've attempted numerous changes to my code to get my insert to go through with no luck. What I have noticed is that the mysql client has a separate max_allowed_packet setting which is 16MB - when I put a limit on file sizes that can be passed to the insert at 16MB, the larger files get skipped and my problems go away.
So my question is this -- does PHP have a max_allowed_packet that I must adjust in addition to MySQL's server-side setting?
I hope you can help!
Thanks in advance,
Ben