在openshift php应用程序中减少upload_max_filesize

I just updated upload_max_filesize to 2M and post_max_size to 4M in php.ini at /var/lib/openshift/xxx---app-id---xxx/php/configuration/etc/php.ini in my scalable PHP app and restarted the cartridge:

  $ rhc cartridge restart php -a "myapp"

And then the app

  $ rhc app restart -a "myapp"

But unfortunately, the upload size still remains the default 200 MB.

Please tell me where else to modify and what else to do to reduce maximum file upload size because 200 MB size is too large and dangerous to be public in my app.

Have you tried adding these into your .htaccess?

php_value upload_max_filesize 2M
php_value post_max_size 4M