General help

 
 
Picture of Lawrence Ng
Re: Error writing database No access to course after error in image upload
 

max_allowed_packet is set in mysql config (my.cnf), NOT ON php side (ie. php.ini)

log into your sql database and check your max allowed packet size:

sql> SHOW VARIABLES LIKE 'max_allowed_packet';

In your my.cnf file, increase the size of max_allowed_packet to say 32MB (or greater than waht your database's settings are)

<span class="pun">[</span><span class="pln">mysqld</span><span class="pun">]</span>

<span class="pln">max_allowed_packet</span><span class="pun">=32</span><span class="lit">M</span>

restart your mysql services and try again

PS. You don't really need 32M ... 16M should be fine too..

 

 
Average of ratings: -
Picture of Lawrence Ng
Re: Error writing database No access to course after error in image upload
 

my.cnf file

[mysqld]
max_allowed_packet=32M

 
Average of ratings: -
Picture of Mike Kaufmann
Re: Error writing database No access to course after error in image upload
 

That was it.  Thank yuio very much for setting me in the right direction.  

 
Average of ratings: -
Picture of Lawrence Ng
Re: Error writing database No access to course after error in image upload
 

No problem Mike.

You also may want to tweak another parameter if you are using a lot of form fields.

Increase the max_input_vars in php.ini

This PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars

Increase it to somethin large like:

max_input_vars=19980

By doing this, it will prevent you from getting the error:

"Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars."

 

 

 

 

 
Average of ratings: -