ini_set('post_max_size', '200M') did not work in php 5.4
17,872
All those you mention are configuration files. In configuration files you simply cannot run PHP code because they are not scripts. You have to use the corresponding syntax (just check other directives on the same file). Typically:
- php.ini, .user.ini →
post_max_size = "200M"
- .htaccess, httpd.conf →
php_value post_max_size 200MB
Author by
Hafiz Muhammad Kamran
I am wordpress and php developer , css, html and responsive design.
Updated on June 04, 2022Comments
-
Hafiz Muhammad Kamran almost 2 years
ini_set('post_max_size', '200M') did not work in php 5.4 i had use following method. .htaccess , user.ini , php.ini , php5.ini but it did not effect of post_max_size. it remain on 64M. it change the memory limit and execution time but did not change the post_max_size.
phpinfo(); system information PHP Version 5.4.29 System Linux gator4143.hostgator.com 3.2.54 #9 SMP Thu Feb 13 08:17:11 CST 2014 x86_64 Virtual Directory Support disabled
-
Hafiz Muhammad Kamran almost 10 yearsphp.ini in a project directory post_max_size= "2000M"; upload_max_filesize= "2000M"; memory_limit= "3000M"; max_execution_time= "2592000"; max_input_time= "2592000"; session.gc_maxlifetime= "1200";
-
Hafiz Muhammad Kamran almost 10 yearshtaccess, http.conf php_value post_max_size 2000M php_value upload_max_filesize 2000M php_value memory_limit 3000M php_value max_execution_time 2592000 php_value max_input_time 2592000 php_value session.gc_maxlifetime 1200
-
Hafiz Muhammad Kamran almost 10 yearsphp file ini_set('safe_mode ', 'Off'); ini_set('max_input_time', '2592000'); ini_set('memory_limit', '3000M'); ini_set('post_max_size', '200M'); ini_set('upload_max_filesize', '200M'); ini_set('max_execution_time', '2592000'); ini_set('max_file_uploads', '100'); ini_set('session.gc_maxlifetime', '1200');
-
Álvaro González almost 10 yearsIf you need to provide further info, please use the edit link and add it to the question itself. Code in comments is unreadable. If you're asking for some clarification about my answer, please explain your doubts, not just dump a bunch a code.
-
Hafiz Muhammad Kamran almost 10 yearsi get my point it will not exceed the limit . i am using share package. past_max_size only increase in vpn server or buy your own server.
-
Álvaro González almost 10 yearsThat's not true. post_max_size is clearly documented as PHP_INI_PERDIR since PHP/4.2.4. I'm changing it all the time.