Limitation upload

MantisBT forum for users who prefer to ask and answer questions in French.

Moderators: Developer, Contributor

Post Reply
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Limitation upload

Post 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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Limitation upload

Post 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
Please use Search before posting and read the Manual
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Limitation upload

Post 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.
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Limitation upload

Post 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 ?
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Limitation upload

Post 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.
Post Reply