PHP post_max_size local value overridden by master value on Plesk / IIS?

做~自己de王妃 提交于 2019-12-05 12:49:18

As it turns out, on Windows, you can only set ini directives that are marked PHP_INI_USER per directory. Unfortunately, upload_max_filesize and post_max_size are both PHP_INI_PERDIR. From the PHP docs at http://php.net/manual/en/configuration.changes.php

The settings for the directory would be active for any script running from this directory or any subdirectory of it. The values under the key should have the name of the PHP configuration directive and the string value. PHP constants in the values are not parsed. However, only configuration values changeable in PHP_INI_USER can be set this way, PHP_INI_PERDIR values can not.

So even though Plesk has an interface to change those directives, and even though phpinfo() picks up on them, they do nothing to change the actual max upload sizes. Plesk should not allow you to change those on Windows, and phpinfo() should not report the change, but what can you do.

Check PHP's post_max_size and upload_max_filesize in php.ini and for any overrides (local php.ini or .htaccess for example)

EDIT: it should be noted that phpinfo() cannot be relied upon for determining if any override will be available during the request (aka when file uploads happen) since it will be processed during the response.

I had similar issues in Plesk. Have you edited any of the templates in Plesk? I know when it runs its cron jobs you can lose certain config edits if you didn't do them via Plesk.

But what about your .htaccess file? You can also set these limits there and that, based on your Plesk config, may the better place to make these changes.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!