Все ленты — последние статьи

Ошибка Warning: POST Content-Length of bytes exceeds the limit of bytes in Unknown on line 0

 Часто встречаемая ошибка решаема изменением php.ini , встречается при импортивании БД в phpMyAdmin, вся проблема в ограничениях загрузки файлов.

upload_max_filesize = 1000M ;1GB
post_max_size = 1000M

Вырезка из статьи проблемы…

 

 

I get similar errors in my error_log in php when users are uploading their files

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

In my php.ini (created custom ini file in public_html) would this solve this problem, how much would I have to set it to around 1GB? I am going to change my settings to this in php.ini, will it solve the problem?

upload_max_filesize = 1000M ;1GB post_max_size = 1000M

What would I set the 'memory_limit' limit to.

Also would this be correct in my script to check file uploaded size is <1GB

if($_FILES["uploadedfile"]["size"]<1000000)
2  
Are you sure you are editing the correct php.ini? –  Pekka 웃 Jun 8 '11 at 14:01
    
Are you editing the correct php.ini (there are several)? Is something else resetting the settings? (e.g. any calls to php_ini_set?) –  Piskvor Jun 8 '11 at 14:01
    
I created a custom php.ini file in public_html –  daza166 Jun 8 '11 at 14:02
    
@daza: you can't just drop a php.ini anywhere you want.PHP only checks certain locations, and "current directory" isn't one of them. You can use 'php_value' directives in your httpd.conf and/or an .htaccess file to set in a particular directory. But otherwise you'll have to change it in the main .ini file. Use php_info() to see what your "local" settings are, and which .ini files are being used. –  Marc B Jun 8 '11 at 14:10
1  
make an info.php with copy it to public_html and call it in your browser. Then check if upload_max_filesize has the right value. –  DanielB Jun 8 '11 at 14:11
show 2 more comments

4 Answers

up vote 14 down vote accepted

8388608 bytes is 8M, the default limit in PHP. Those changes to php.ini should indeed solve the problem (make sure your restart your Apache server after making them).

Memory limit shouldn't need to be changed here.

add comment

I suggest that you should change to "post_max_size" from 8M to 32M in php.ini

add comment

you just setting at php.ini

then set :

upload_max_filesize = 1000M; post_max_size = 1000M;

then restart your xampp.. Check the image

image : http://i.stack.imgur.com/0PZJM.jpg

add comment

In Some cases, you need to increase the maximum execution time.

max_execution_time=30

I made it

max_execution_time=600000

then I was happy.

share|improve this answer