Error writing database No access to course after error in image upload

Re: Error writing database No access to course after error in image upload

by Lawrence N -
Number of replies: 3

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)

[mysqld]

max_allowed_packet=32M

restart your mysql services and try again

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

 

In reply to Lawrence N

Re: Error writing database No access to course after error in image upload

by Lawrence N -

my.cnf file

[mysqld]
max_allowed_packet=32M

In reply to Lawrence N

Re: Error writing database No access to course after error in image upload

by Mike Kaufmann -

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

In reply to Mike Kaufmann

Re: Error writing database No access to course after error in image upload

by Lawrence N -

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."