Page 1 of 1

Limitation upload

Posted: 10 Jul 2013, 08:50
by Orbiumalex
Bonjour,
Actuellement nous sommes limité à des fichiers de 1Mb et nous souhaiterions augmenter cela.
Nous obtenons le message d'erreur suivant:

Code: Select all

Fatal error: 401 in ~\Mantis\core\database_api.php on line 393
Pour se faire nous avons modifié :

CONFIG_INC.PHP

Code: Select all

$g_max_file_size= 20000000; # in bytes
PHP.INI

Code: Select all

memory_limit = 512M      ; Maximum amount of memory a script may consume (128MB)

Code: Select all

upload_max_filesize = 200M

Code: Select all

post_max_size = 200M
Mais celà ne fonctionne pas bien évidement. Jusqu'à la semaine dernière tout fonctionnait parfaitement bien et depuis Mardi nous sommes limité à 1M alors que dans notre partie de DEV c'est exactement la meme configuration et nous sommes sois disant en 1M alors que nous pouvons uploader des fichiers dépassant cette taille.

Savez vous où se situe la configuration de cette limite ?
je vous remercie de votre aide.

Re: Limitation upload

Posted: 10 Jul 2013, 09:19
by atrol
Sorry, no French, but should help

- Check database setting max_allowed_packet in my.cnf
- Run admin/check.php and have a look at any warnings or errors

Re: Limitation upload

Posted: 10 Jul 2013, 10:09
by Orbiumalex
No problem, it's good too.
I don't find the my.cnf. I have the my.ini only and I checked from the internet and it's the same file. But from this file, I don't find the max_allowed_packet !

Thank you for your answer.

Re: Limitation upload

Posted: 10 Jul 2013, 11:49
by Orbiumalex
Re,
OK I found this :

From the MySQL console:

Code: Select all

MySQL> Show Variable Like 'max_allowed_packet':
+--------------------------------------------+
¦ Variable_name           ¦ Value        ¦
+-------------------------------------------+
¦ max_allowed_packet ¦ 1048576     ¦
+-------------------------------------------+
We want 2Mb in the upload and this variable works in multiple of 1024.
So I must use this command :

Code: Select all

set global max_allowed_packet=20480000;
After, why I have 0 rows affected ?

Re: Limitation upload

Posted: 10 Jul 2013, 12:28
by Orbiumalex
I found the problem. It was MySQL. I added a new variable in my.ini :

max_connections=100
max_allowed_packet = 2048000

Just add max_allowed_packet under max_connections

It's working for me.
Thank you.