Jump to content


Photo

Changing max_allowed_packet on a shared server


  • Please log in to reply
3 replies to this topic

#1 ryuuseigun

ryuuseigun
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 01 May 2006 - 07:32 AM

Hi, I was wondering whether there was a way to change the max_packet_size on a shared server? I'm running Apache 1.3.31 (Unix), PHP 4.3.11 and MySQL 4.0.16, but cannot access the my.cnf file. If any more details are needed, please let me know; I'm very much a newbie with this. Any help will be much appreciated.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 01 May 2006 - 04:07 PM

I don't think so -- but in general, you shouldn't need to change this size, which is usually set rather conservatively. If this has to do with storing binary data, then there are other, more desirable workarounds. Please clarify.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 ryuuseigun

ryuuseigun
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 01 May 2006 - 04:22 PM

[!--quoteo(post=370300:date=May 2 2006, 02:07 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ May 2 2006, 02:07 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I don't think so -- but in general, you shouldn't need to change this size, which is usually set rather conservatively. If this has to do with storing binary data, then there are other, more desirable workarounds. Please clarify.
[/quote]

Yes, I'm trying to store binary data in the database, namely files whose individual file sizes are greater than the max_allowed_packet. Currently, storing smaller files has been no problem at all. It seemed like there should be better ways to get around the problem, but I had no idea where to begin looking, so the tutorials/forum threads I did find were all related to increasing max_allowed_packet.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 May 2006 - 06:27 PM

I can't seem to locate the tutorial, but basically, you simply break up your binary data into reasonably-sized chunks, and then put it back together on the way out.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users