Post content length of bytes exceeds the limit

New Page

PHP Announcement: POST content length of 8978294 bytes exceeds limit of 8388608 bytes on line 0

Pregunta

Preguntó hace 10 years, 2 months

Modified 1 year, 2 months ago

Visto 561k times

Reportar este anuncio

Esta pregunta muestra el esfuerzo de investigación; it is useful and clear

276

Esta pregunta no muestra ningún esfuerzo de investigación; no está claro o no es util

48

Bookmark this question.

View activity on this post.

Recibo este error cuando intentiono import una WordPress into my local XAMPP desarrollo entorno:

Announcement: the POST content length of 8978294 bytes exceeds the limit of 8388608 bytes in Desconocido in line 0

Cambié el upload_max_filesizefrom 2Mto 1000M, pero eso no pareció hacer nada.

¿Ideas Algunas?

  • wordpress
  • xampp
  • php

To share

Share a link to this question

Copy link CC BY-SA 3.0

Seguir

Sigue esta pregunta para recibir notifications

requested Jul 30, 2012 at 10:18 AM

Novice User AvatarPrgrmr

novicePrgrmr novicePrgrmr

17.8k 31 31 gold badges 80 80 silver badges 103 103 bronze badges

5

  • 21

    Try increasing post_max_size to 20M

    – Dr. Dan

    Jul 30, 2012 at 10:19 AM

  • If you’re just considering a WP upload – just increase the post_max_size (all current uploads together) and possibly upload_max_filesize (for a single file)…however, if you want to hide the error if someone tries to upload too many files large (plus your limits) see stackoverflow.com/questions/21704930/…

    – jave.web

    12 Feb 2014 at 15:07

  • 5

    une note aux passants : cette erreur et ce correctif ne sont pas spécifiques à WordPress ou XAMPP. Il s’applique généralement à l’erreur PHP POST Content-Length of X octets dépasse la limite de Y

    – code_monk

    9 novembre 2014 à 17:43

  • Le doublon possible de POST Content-Length dépasse la limite

    – Shashanth

    May 11, 2018 at 5:00

  • Make sure you’re updating the correct php.ini: stackoverflow.com/a/58999601/470749

    –  Ryan

    Nov 22, 2019 at 18:09

Add a comment  | 

23 respuestas23

Ordenado por: Restablecer a predeterminado

Puntaje más alto (predeterminado) Tendencia (los votos recientes cuentan más) Fecha de modificación (más reciente primero) Fecha de creación (el más antiguo primero)

This answer is useful

422

This answer is not useful

Show activity on this post.

8388608 bytes es 8M, el límite predeterminado en PHP. Actualice su post_max_sizeen php.ini a un valor mayor.

upload_max_filesizeestablece el tamaño máximo de archivo que un usuario puede cargar mientras post_max_sizeestablece la cantidad máxima de datos que se pueden enviar a través de un POST en un formulario.

Pour autant, puede configurarlo upload_max_filesizeen 1 megabyte, lo que significa que el archivo individual plus grande qu’un usuario puede cargar es de 1 megabyte, pero podría cargar 5 de ellos a la vez si post_max_sizese configuró en 5.

Los cambios surtirán efecto después de reiniciar el servidor.

Partager

Partager un lien vers cette réponse

Copier le lien CC BY-SA 4.0

Séguir

Sigue esta respuesta para recibir notificaciones

modifié le 17 juillet 2021 à 0:09

répondu le 30 juillet 2012 à 10:20

Fluffeh user avatar

Fluffh Fluffh

32.8k 16 16 gold badges 66 66 silver badges 80 80 bronze badges

5

  • 3

    Also be sure to check the .htaccess file for the same values ​​that may have been overridden

    – jay

    Sep 29, 2013 @ 6:55 PM

  • I had a problem where I forgot to set the units ‘M’ – Megabytes, thanks a lot!

    – Pini Cheyni

    August 8, 2016 at 7:07 am

  • 4

    Without restarting Xamp it didn’t work for me. Perhaps obvious for advanced PHP development. but it was not for me.

    – eh

    October 20, 2016 at 3:47 PM

  • 3

    For nginx you may need to restart php7.2-fpm.service. Any fast CGI server.

    – pbies

    Jul 30, 2019 at 6:37 PM

  • Don’t forget to restart apache tomcat server, if you are using XAMPP for local environment

    – Paul

    August 30 at 2:11 PM

Add a comment | 

Report this ad

This answer is helpful

75

This answer is not helpful

View activity on this post.

Simply configure these files in php.ini:

upload_max_filesize = 1000M; post_max_size = 1000M;

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Seguir

Sigue esta respuesta para recibir notifications

modified on July 14, 2016 at 6:23 AM

Pang user avatar

Tightness

9 192 146 146 gold badges 85 85 silver badges 118 118 bronze badges

answered on August 4, 2014 at 2:00 PM

Altab Hossen user avatar

Altab Hossen Altab Hossen

767 5 5 silver badges 4 4 bronze badges

1

  • 1

    Nowadays the filename would most likely be .user.ini

    –yunzen

    November 13, 2018 at 10:52 am

Add a comment | 

This answer is helpful

33

This answer is not helpful

View activity on this post.

1. Primero will check the php.ini archive.

Puede encontrar el archivo php.ini desde esta ruta. C:\xampp\php ou à partir du tapis xampp .

2. Ahora ouvrir les archives php.ini et cambie lo suivant :

1. Tamaño post-maximum (cambio de 8M à 800M ).

2. cargar tamaño máximo de archivo (cambiar 2M a 2000M ).

3. Maintenant, détenez le serveur Apache et MySQL.

4. Heure de réinitialiser le serveur Apache et MySQL.

Fonctionne bien después de eso.

Disfruta de tu trabajo ahora 🙂

Partager

Partager un lien vers cette réponse

Copier le lien CC BY-SA 3.0

Séguir

Sigue esta respuesta para recibir notificaciones

modifié le 20 décembre 2017 à 12:57

answered on December 20, 2017 at 12:44 PM

Avatar of Muhammad Tahseen Ur Rehman

Muhammad Tahseen Ur Rehman Muhammad Tahseen Ur Rehman

349 3 3 silver badges 5 5 bronze badges

0

Add a comment | 

Report this ad

This answer is helpful

22

This answer is not helpful

View activity on this post.

post_max_sizeEso is an 8MB error.

Established in a valor con el que se sienta cómodo.

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Seguir

Sigue esta respuesta para recibir notifications

answered on July 30, 2012 at 10:20 am

Mihai Stancu user avatar

Mihai Stancu Mihai Stancu

15.5k 2 2 gold badges 32 32 silver badges 50 50 bronze badges

0

Add a comment | 

This answer is helpful

16

This answer is not helpful

View activity on this post.

¿Ya reinició su web server?

Esto forzará a php recargar elphp.ini

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Seguir

Sigue esta respuesta para recibir notifications

answered on July 30, 2012 at 10:22

MarcDefiant user avatar

Marc DefiantMarc Defiant

6,441 5 5 gold badges 27 27 silver badges 47 47 bronze badges

0

Add a comment | 

This answer is helpful

16

This answer is not helpful

View activity on this post.

Tendrás que cambiar el valor de

post-max-size upload-max-filesize

the cues are in php.ini

Restarting your server will help it start working. On a local test server running XAMIP, I had to stop the Apache server and restart it. It went well after that.

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

modified on March 13, 2019 at 6:40 am

Avatar of Udhav Sarvaiya

Oudhav Sarvaiya

8,687 12 12 gold badges 54 54 silver badges 61 61 bronze badges

answered on March 28, 2014 at 10:36

User avatar of Joel

Joel Joel

161 1 1 silver badge 2 2 bronze badges

0

Add a comment | 

This answer is helpful

11

This answer is not helpful

View activity on this post.

Navigate to C:\xamppp\php. Set these values ​​in php.ini:

upload_max_filesize=1000M post_max_size=0M

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

modified on April 5, 2017 at 2:44 PM

Avatar of Paul Roub

Paul Roub

36k 27 27 gold badges 80 80 silver badges 88 88 bronze badges

answered on April 5, 2017 at 2:37 PM

avatar of abdessamad wassim

abdessamad wassim abdessamad wassim

111 1 1 silver badge 4 4 ​​bronze badges

0

Add a comment | 

This answer is helpful

9

This answer is not helpful

View activity on this post.

  1. Create a new text file in the root of your wp-admin directory and name it info.php.

  2. Open info.php and add this line:

    <?php phpinfo(); ?>

  3. Save it.

  4. Accédez au nom de votre site Web (probablement localhost)/wp-admin/info.php dans n’importe quel navigateur Web.

  5. Sur la 8ème ligne, vous verrez : Configuration File (php.ini) Path , dans mon cas c’est C:\Windows, ce qui signifie qu’il se trouve sur mon lecteur C.

  6. Dans la 9ème ligne, vous verrez : Loaded Configuration File , et à côté est écrit C:\xampp\php.ini

So I found my php.ini page that is associated with my wordpress web-site.

  1. Go to that path, and find php.ini.

  2. Open it, and edit:

    Search for post_max_size=8M, and change it to post_max_size=1000M

    Search for upload_max_filesize=2M, and change it to upload_max_filesize=1000M

  3. Go back to your Admin page → Media → Add New

  4. On the bottom you will see that 2MB has changed to 1000M.

Once you have done this process then you must restart your web server or just restart your computer.

Share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

edited Dec 18, 2020 at 16:36

pbarney user avatar

barney

2,431 4 4 gold badges 33 33 silver badges 48 48 bronze badges

answered Jul 9, 2015 at 1:33 PM

Sad Dam User Avatar

Sad Dam Sad Dam

105 1 1 silver badge 2 2 bronze badges

Add a comment | 

This answer is useful

6

This answer is not useful

Show activity on this post.

  1. Find php.ini [\xampp\php]
  2. Just set them in php.ini:

upload_max_filesize = 1000M; post_max_size = 1000M;

  1. Restart Server
    • Stop Apache and MySQL
    • Restart Apache and MySQL

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on October 24, 2019 at 6:33 PM

User avatar of Enaan Farhan

Enan Farhan Enan Farhan

111 1 1 silver badge 4 4 ​​bronze badges

Add a comment | 

This answer is helpful

5

This answer is not helpful

View activity on this post.

Go to

C:\drive\xampp (where xampp is installed)

just find the php.ini file then in file search

post_max_size=XXM upload_max_size=XXM

Change with this code

post_max_size=100M upload_max_filesize=100M

Don’t forget to restart the xampp

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

answered on November 19, 2017 at 5:13 am

User avatar of Khubaib Raza

Khubaib Raza Khubaib Raza

533 6 6 silver badges 10 10 bronze badges

Add a comment | 

This answer is helpful

5

This answer is not helpful

View activity on this post.

Using wamp do the following and hopefully it will fix a problem

Make these changes in PHP Options to fix:

max_execution_time 180 memory_limit 512M or your highest available post_max_size 32M upload_max_filesize 64M

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

modified on March 13, 2019 at 6:41 AM

Avatar of Udhav Sarvaiya

Oudhav Sarvaiya

8,687 12 12 gold badges 54 54 silver badges 61 61 bronze badges

answered on April 30, 2018 at 6:17 am

Fahad Ali user avatar

Fahad Ali Fahad Ali

87 1 1 silver badge 4 4 ​​bronze badges

Add a comment | 

This answer is helpful

4

This answer is not helpful

View activity on this post.

You also need the post-max-size change.

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

answered on July 30, 2012 at 10:20 am

xdazz user avatar

xdazz xdazz

156k 36 36 gold badges 240 240 silver badges 268 268 bronze badges

Add a comment | 

This answer is helpful

4

This answer is not helpful

View activity on this post.

From the XAMPP panel, click on the ADMIN button on the Apache site. Then choose to edit php.ini and add the missing post_max_size to a value you are comfortable with.

post_max_size = 100M

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on August 6, 2018 at 5:29 PM

User avatar of sukupandachu

sukupandachu sukupandachu

41 3 3 bronze badges

Add a comment | 

This answer is helpful

3

This answer is not helpful

View activity on this post.

Go to

C:\ drive

ou ce lecteur où xampp est installé cliquez sur xampp trouver php et ouvrez-le, vous y trouverez le dossier php.ini ouvrez le fichier php.ini avec le bloc-notes et trouvez upload_max_filesize et post_max_size dans les deux “option de recherche haut et bas”, changez les deux valeurs à 1000M

Partager

Partager un lien vers cette réponse

Copier le lien CC BY-SA 3.0

Suivre

Suivez cette réponse pour recevoir des notifications

modifié le 9 août 2016 à 4:09

Serjik user avatar

Serjik

10k 7 7 insignes d’or 60 60 insignes d’argent 70 70 insignes de bronze

répondu le 8 août 2016 à 19:27

Zain user avatar

Zain Zain

31 2 2 insignes de bronze

Ajouter un commentaire | 

Cette réponse est utile

3

Cette réponse n’est pas utile

Afficher l’activité sur ce post.

I solved the same problem by changing below parameters to expected value in /etc/php/7.2/apache2/php.ini file

upload_max_filesize = 8M; post_max_size = 8M;

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on February 24, 2019 at 3:49 am

Hasitha user avatar

Hasitha Hasitha

668 8 8 silver badges 15 15 bronze badges

Add a comment | 

This answer is helpful

3

This answer is not helpful

View activity on this post.

upload_max_filesize = 8M; post_max_size = 8M;

Imagine that you have already changed the values ​​above. But what happens when the user tries to upload large files larger than 8MB?

This is what happens, PHP displays this warning!

Warning: POST content length of x bytes exceeds limit of y bytes in Unknown on line 0

you can avoid it by adding

ob_get_content(); ob_end_clean();

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on January 4, 2020 at 7:53 am

Optimaz ID user avatar

ID Optimaz ID Optimaz

767 8 8 silver badges 10 10 bronze badges

Add a comment | 

This answer is helpful

3

This answer is not helpful

View activity on this post.

You have 2 options for this error:

  1. The file you are downloading is too large, so you need to use a smaller file.
  2. Increase upload size in php.ini to

upload_max_filesize = 9M; post_max_size = 9M;

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered Jul 19, 2020 at 1:22 am

Ustas user avatar

Ustas Ustas

354 2 2 silver badges 8 8 bronze badges

1

  • 2

    I’ll spare you the downvote as I’m sure you’re trying to raise your reputation enough to have useful privileges on this site, but this answer doesn’t provide anything new or valuable that hasn’t been said and upvoted for many years previously.

    – tchimkus

    July 19, 2020 at 1:46 am

Add a comment | 

This answer is helpful

2

This answer is not helpful

View activity on this post.

Go to browser and find php.ini, then open it and change these two values:

post_max_size= 1000000000000M upload_max_filesize= 10000000000000M

If you open the php.ini file using notepad , you can find these two values ​​by clicking: cmd + f

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Suivez cette réponse pour recevoir des notifications

édité le 23 mai 2020 à 6h30

Nimantha user avatar

Nimanthe

6 620 6 6 insignes d’or 24 24 insignes d’argent 62 62 insignes de bronze

répondu le 21 juin 2018 à 17:08

User avatar of واش حنوني صافا

واش حنوني صافا واش حنوني صافا

29 2 2 insignes de bronze

Ajouter un commentaire | 

Cette réponse est utile

1

Cette réponse n’est pas utile

Afficher l’activité sur ce post.

You might not be uploading the right zip file. In my case, as a newbie to wordpress(I used to do hardcoding), I installed the zipped file that contained another zip file which is the actual theme neede to be upload. So what what need to do in this case is to unzip the file and locate the “theme_name.zip” inside.

Share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

answered Jul 3, 2013 at 12:25

Avatar of Adones Pitogo

Adones Pitogo Adones Pitogo

993 8 8 silver badges 17 17 bronze badges

Add a comment  | 

This answer is useful

1

This answer is not useful

Show activity on this post.

If changing the post_max_size settings from XAMPP folders. It did not work for you try this.

From XAMPP control panel, click config then PHP (php.ini) and edit post_max_size and upload_max_filesize to a higher number in this file instead. Stop Apache server. Start Apache server. This worked for me.

Share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

edited Aug 1, 2019 at 11:09

User avatar of Rohit.007

Rohit.007

3,375 2 2 gold badges 19 19 silver badges 32 32 bronze badges

answered Aug 1, 2019 at 9:04

Daniel Groves user avatar

Daniel Groves Daniel Groves

11 1 1 bronze badge

Add a comment  | 

This answer is useful

1

This answer is not useful

Show activity on this post.

If your objective is to import a theme into your WordPress then you can manually copy paste your theme into your wp-content->themes folder and extract it of course. I just encountered this and couldn’t locate the php.ini file for WAMP.

Share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered Feb 26, 2020 at 4:02 am

Avatar of Ismail Rashad

Ismail Rashad Ismail Rashad

13 3 3 bronze badges

Add a comment | 

This answer is helpful

1

This answer is not helpful

View activity on this post.

I solved my php7 problems on centos 7 by updating /etc/php.ini with these settings:

post_max_size=500M upload_max_filesize=500M

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

modified on October 1, 2020 at 8:39 AM

User avatar of Jim U

Jim U

3,219 1 1 gold badge 12 12 silver badges 23 23 bronze badges

answered Oct 1, 2020 at 5:46 am

LEOTECH user avatar

LEOTECH LEOTECH

11 1 1 bronze badge

Add a comment | 

This answer is helpful

0

This answer is not helpful

View activity on this post.

As Optimaz ID pointed out, the code below helped me hide the PHP error message in case the user uploads a file larger than upload_max_filesize and post_max_size defined in php.ini (which is almost impossible when a high value is set).

ob_get_content(); ob_end_clean();

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on April 24, 2021 at 7:15 PM

User avatar of Kelly O'blair

Kelly O’blair Kelly O’blair

21 3 3 bronze badges

Add a comment | 

Your answer

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid…

  • Ask for help, clarification, or respond to other responses.
  • Make statements based on opinion; back them up with references or personal experience.

To learn more, check out our tips for writing great responses.

Saved Draft

Draft rejected

Sign up or log in

Sign up with Google

Sign up using Facebook

Sign up using your email and password

Submit

Post as guest

Last name

E-mail

Required, but never displayed

Post as guest

Last name

E-mail

Required, but never displayed

Post your answer Ignore

En cliquant sur “Poster votre réponse”, vous acceptez nos conditions d’utilisation, notre politique de confidentialité et notre politique en matière de cookies

Pas la réponse que vous cherchez ? Parcourir les autres questions étiquetées

  • wordpress
  • xampp
  • php

ou posez votre propre question.

  • Le blog de débordement
  • Tendances Stack Overflow : activité du site en semaine par rapport au week-end

  • Ne laissez pas les logiciels vous voler votre temps (Ep. 491)

  • Présenté sur Meta
  • Modifications récentes du contraste des couleurs et mises à jour d’accessibilité

  • Réviseur par-dessus bord ! Ou une demande d’amélioration des conseils d’intégration pour les nouveaux…

  • Mise à jour des collectifs : membres reconnus, articles et GitLab

  • Dois-je expliquer les réponses en code des autres ?

Signaler cette annonce

Lié

2

Warning: POST Content-Length of 10467213 bytes exceeds limit of 8388608 bytes in Unknown on line 0

0

Why is my custom validation not working in laravel?

1

PHP Unable to upload large video to SQL database

0

I get the below error when I try to upload files in laravel 5.4

0

Error uploading video to my database

-3

How can I upload a larger image in PHP?

103

POST content length exceeds limit

12

How to Prevent Warning: POST Content-Length and Memory Size

9

PHP warning: POST Content-Length of n bytes exceeds limit of 3145728 bytes in Unknown on line 0

2

Warning: POST Content-Length of 90612004 bytes exceeds limit of 8388608 bytes in Unknown on line 0

See more related questions

Related

103

POST content length exceeds limit

ten

PHP warning: POST content length of 113 bytes exceeds limit of -1988100096 bytes in Unknown

1

Unable to resolve: PHP Warning: POST Content-Length of 13110857 bytes exceeds limit of 10485760 bytes in Unknown on line 0

1

PHP: POST content length warning

2

I modified the php_ini and I still get the warning PHP POST Content-Length exceeds the limit

2

Warning: POST Content-Length of 90612004 bytes exceeds limit of 8388608 bytes in Unknown on line 0

0

Using WordPress on XAMPP POST Content-Length of 26896206 bytes exceeds 200 byte limit

0

Unable to upload file to server – error is Warning: POST content length of 42669632 bytes exceeds

Network burning questions

  • Why doesn’t R use inverse transform sampling to sample from the exponential distribution?
  • How to rename a file containing spaces in terminal?
  • The recipient claims that the cashier’s check will not be cashed
  • What is it called and what causes it? Bright reflections along the contrasting edges
  • Trying to identify a Poul Anderson short story
  • Countering free-electron lidar?
  • Do wizard spell mastery spells have to be prepared as a wizard or can they be “known”?
  • Separate and rejoin a trace to reduce resistance
  • Afficher la manipulation d’identité trigonométrique longue
  • Une variété lisse peut-elle être réalisée comme l’image d’une fonction lisse ?
  • Trouvé une erreur dans un article publié sur IEEE Transactions on Industrial Informatics
  • Is there any known thing or physical object that absolutely cannot be destroyed?
  • Which academic writing style allows extensive explanatory footnotes?
  • Liu and Qiong article implication – 2016
  • Is there a reason why Clementi didn’t suggest a change of finger for repeating notes? (Sonatina Op. 36 No. 2)
  • Why did ‘scp 10.0.0.11:/home/someuser/.*’ start copying from /home as well?
  • How is expected approach time phrased in ATC communications?
  • Create a nibble shorthand
  • How do non-English speakers navigate through JFK airport?
  • Is there a way to compute the spectrum effect of a non-linear function?
  • Reasons to untrust Let’s Encrypt certificates
  • Co-worker always asks me to do small things when they aren’t my responsibility
  • Is my homebrew Hiccupera spell any good?
  • Centering a multi-column cell on top of two cells

Question feed

Subscribe to RSS

Question feed

Pour vous abonner à ce flux RSS, copiez et collez cette URL dans votre lecteur RSS.

Correction : la longueur du contenu POST de X octets dépasse la limite de X octets.

Dans ce tutoriel, nous allons vous montrer comment corriger l’avertissement PHP suivant :

Avertissement PHP : La longueur du contenu POST de 77870742 octets dépasse la limite de 8388608 octets.

Cette erreur se produira si la taille d’une requête POST est supérieure à la limite de votre directive “post_max_size”.

If you look closely at the message, you can see that the Content-Length of the POST request in this case was 77,870,742 bytes. It’s about 77.87 MB.

This is a problem, because the post_max_size directive in our php.ini file is 8,388,608 bytes (8MB).

By default, PHP’s post_max_size directive will be 8MB.

To summarize the problem in this particular case:

  • The size limit for a POST request is 8MB.
  • However, our POST request size is 77.87 MB.

As you can see, it is way over the limit. Therefore, the $_POST and $_FILES superglobal arrays will be empty.

This type of error is especially common with file uploads, as the size of an uploaded file can easily exceed the 8MB limit established in php.ini.

For example, a small video file can be 100MB or more. A form that allows the user to upload multiple files at once will also easily exceed this limit.

What is my post_max_size setting?

Here’s a quick way to determine what your current post_max_size setting is:

// Display the value of the post_max_size directive. echo ini_get(‘post_max_size’);

In the PHP code snippet above, we printed the value of the post_max_size parameter using the ini_get function .

In most cases, this will say “8M”.

How to increase your post_max_size parameter.

To increase the size limit of your POST requests, you will need to locate your php.ini file and modify the post_max_size directive .

By default, it will look like this:

post_max_size = 8M

As you can see it is currently 8MB. If we want to change this limit to 32MB we will need to change the directive to:

post_max_size = 32M

PHP also allows you to specify gigabytes using the G character  :

post_max_size = 1G

In the example above, we set the maximum POST data size to one gigabyte. Note that you can also completely disable the maximum size by setting the value to 0 like this:

post_max_size = 0

It is only functional and uses PHP version 5.2.12 or higher. Without embargo, the recommendation that no disqualification is limited to menos qu’esté 100% seguro de que sabe lo que está haciendo.

Asegúrese de guardar el archivo y recargar su servidor web después de cambiar esta directiva. De lo contrario, el valor límite anterior permanecerá en la memoria.

¿Puedo use the function ini_set for cambiar the directive post_max_size?

The post_max_size directive is not able to use PHP’s ini_set function . However, use the following code fragment without function:

// Intent to use ini_set for cambiar post_max_size echo ini_set(‘post_max_size’, ‘100M’);

This is a direct value of the Modifiable PHP_INI_PERDIR value .

Puede cambiar esta configuration in a php.ini, .htaccess, httpd.conf or .user.ini archive.

Without embargo, do not use ini_set podrá hacerlo .

This article has been published in Código , Tutoriales de PHP , Tips and tricks .


Video Post content length of bytes exceeds the limit

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…