$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>upload_max_filesize in .user.ini Not Reflected in Media Upload|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

upload_max_filesize in .user.ini Not Reflected in Media Upload

matteradmin14PV0评论

I would like to know why Media Upload does not detect the upload_max_filesize that had been set in .user.ini file as shown below.

max_execution_time = 10000
memory_limit = 512M
upload_max_filesize = 20M
post_max_size = 20M

This is the phpinfo.php.

.png


This is the error message after uploading a 10MB PDF file.

.png


I do not want to apply these settings in php.ini because there are still multiple projects are running inside the server. That is why I prefer to set all the setting in user.ini.

Any kind soul please help me edit the image link.
Much appreciate.

I would like to know why Media Upload does not detect the upload_max_filesize that had been set in .user.ini file as shown below.

max_execution_time = 10000
memory_limit = 512M
upload_max_filesize = 20M
post_max_size = 20M

This is the phpinfo.php.

https://i.sstatic/2RHbj.png


This is the error message after uploading a 10MB PDF file.

https://i.sstatic/kIdxq.png


I do not want to apply these settings in php.ini because there are still multiple projects are running inside the server. That is why I prefer to set all the setting in user.ini.

Any kind soul please help me edit the image link.
Much appreciate.

Share Improve this question asked Apr 22, 2016 at 4:29 Wee Hong KOHWee Hong KOH 1171 gold badge2 silver badges5 bronze badges 4
  • Is your user.ini file in your wp-admin folder? – Tim Malone Commented Apr 22, 2016 at 5:50
  • Hi @TimMalone, nope. It allocates at root directory. – Wee Hong KOH Commented Apr 22, 2016 at 6:33
  • Try to place the following two lines into .htaccess file: php_value post_max_size 10M and php_value upload_max_filesize 10M – Max Yudin Commented Apr 22, 2016 at 7:09
  • @Kane Uploads are handled in the wp-admin directory, so try placing it in there. I've had success with placing php.ini files in there on shared hosts. – Tim Malone Commented Apr 22, 2016 at 7:16
Add a comment  | 

1 Answer 1

Reset to default 2

Thanks to @Tim Malone,

@Kane Uploads are handled in the wp-admin directory, so try placing it in there. I've had success with placing php.ini files in there on shared hosts. – Tim Malone 1 hour ago

Just place .user.ini to /wp-admin to overwrite the setting.

Post a comment

comment list (0)

  1. No comments so far