Solved

Godaddy Hosted Account Setting max allowed packet setting

Posted on 2010-09-13
8
1,702 Views
Last Modified: 2012-05-10
Hello I have a client that needs to change the "max allowed packet" settings on his godaddy account. He has a PHP program that is currently set at 32M but it needs to be 96MB. In phpmyadmin I can see its set to this "max allowed packet 33,554,432" However not being a linux guru we have no idea where to change this setting, if its a database setting of a php setting. I have found the php.ini file but it does not reference it. We have been trying to fix this for days and its outside of Godaddys support realm. Any help would greatly be appreciated. He do not currently have ssh access but have ftp.

(I know this is also in the Exchange category, I cant figure out how to remove it since the new layout of this website.)
0
Comment
Question by:borgmember
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 3

Expert Comment

by:proadmin
ID: 33669133
Hello friend. Your right many times the php.ini file doesn't have the setting so it reverts to 'default', however you can over-ride this by manually putting the setting into the ini file.

Here's what to do:

Add this line to php.ini:

max_allowed_packet=96M

Reset web service or reboot. You can always create a info.php file that states:

<?php phpinfo(); ?>

If you run that it should show you all of your settings to make sure it took. Best of luck!
0
 
LVL 35

Expert Comment

by:torimar
ID: 33669202
It's a MySQL setting.

You may try to (temporarily) increase the packet size by issuing this SQL statement inside phpMyAdmin:
SET GLOBAL max_allowed_packet=100663296;

In order to make the setting permanent (i.e. survive a restart of the MySQL daemon or the server) you would have to modify the MySQL config file - which you cannot do via FTP; you'd need direct root access to the server running the database.

You could also try to modify the value inside the respective PHP files of the PHP application by adding:

function max_packet_init(){
  //Set the value to 96 MB.
  db_query('SET SESSION max_allowed_packet=96*1024*1024');
}

However, for shared hosting, also mind this note: http://forums.devshed.com/showpost.php?p=1061285&postcount=2
0
 
LVL 25

Expert Comment

by:madunix
ID: 33669607
see  mysql sample configuration (/etc/my.cnf) file

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet = 16M
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
# old_passwords=1
# old-passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 33671357
The advice here is exactly right:
http://forums.devshed.com/showpost.php?p=1061285&postcount=2

You do not want or need large binary columns in a data base.  Consider what will happen to performance when some novice programmer writes this line of code:

SELECT * FROM...

There are many alternatives to GoDaddy, and almost all of them have better tech support.  This question should have been answered on the first call immediately.  I use and recommend ChiHost.  Other good ones include DreamHost, HostGator, and Liquid Web.  I do not recommend GoDaddy or SiteGround because of the REPEATED HORRID tech support experiences I have had with those companies.

Good luck with the project (and upgrade the code to store the BLOBs on the file systems instead of the data base), ~Ray
0
 

Author Closing Comment

by:borgmember
ID: 33963812
See post.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33966971
Thanks for the points -- good luck with your project, ~Ray
0
 
LVL 35

Expert Comment

by:torimar
ID: 33967275
borgmember,

in your question you asked how to increase the 'max_allowed_packet' size, because "it needs to be 96MB".
In my comment ID:33669202 I told you how this could be done; I also added a link to a resource which warns about proceeding this way and suggests an alternative.

You now chose a solution which comments the link I posted as being "exactly right", and then talks you out of the issue instead of solving it. Whereas I understand that the indubitable expertise and integrity of the expert giving that advice makes it tempting, if not imperative, to follow it, I must express my disappointment about the fact that my efforts at taking your original intentions seriously were not even deemed worth the credit of an assist.

0
 

Author Comment

by:borgmember
ID: 33988214
Hello,

Nothing personal on this. I have been so busy this slipped under the radar, and when I noticed it was still opened I used my memory to quickly close it up. I do remember he couldnt make it work, but its been too long. Thanks for your help!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question