Support » Plugin: BulletProof Security » max_upload_size and others php value

  • Resolved giteshtrivedi

    (@giteshtrivedi)


    Hi,

    In to which file or portion of root htaccess file I need to insert this value.

    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300

    Previously these were in php.ini file. But my hosting provider disabled it. I tried to insert these value in BPS security > htaccess core > custom code >1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE

    Unfortunately my site crashed. After that I manually delete those records from root .htaccess file and site starts working. Anyone tell me where I need to insert above values?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AITpro

    (@aitpro)

    Where PHP directives can be set: https://www.php.net/manual/en/configuration.changes.modes.php

    upload_max_filesize and post_max_size > PHP_INI_PERDIR > Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini. Important Note: What is missing from the PHP directives help page is that PHP_INI_PERDIR directives can ONLY be set in htaccess files if your server API type is DSO (aka mod_php or PHP as an Apache module) and the directive code is: php_value upload_max_filesize and php_value post_max_size.

    max_execution_time > PHP_INI_ALL > Entry can be set anywhere. The easiest place to add this PHP directive is in your wp-config.php file by using the ini_set() PHP function: ini_set('max_execution_time','300');. Important Note: Any custom code that you add to your wp-config.php file needs to go above this placeholder text in your wp-config.php file: /* That’s all, stop editing! Happy blogging. */ or /* That’s all, stop editing! Happy publishing. */.

    Most likely you do not have a DSO server API type and will not be able to use the php_value directive code in an htaccess file. You can check the BPS System Info page to check which server API type you have > Example > My server API type is: Server API: litespeed CGI Host Server Type.

    Recommendation: create a new .user.ini text file on your computer, add your PHP directive code in your new .user.ini text file and upload it to your hosting account root folder. Note: It could take up to 15 minutes for your server to recognize your new .user.ini file and process the PHP directives.

    • This reply was modified 2 years, 8 months ago by AITpro.
    Plugin Author AITpro

    (@aitpro)

    Did you try creating a .user.ini file? Did it work or not?

    Plugin Author AITpro

    (@aitpro)

    Another place where you should be able to set the upload_max_filesize, post_max_size and max_execution_time directives would be somewhere in your web host control panel. If you have cPanel you can set these values under Software > Select PHP Version > Options tab link at the top of the page. If you have Plesk you can set these values under PHP configuration.

    • This reply was modified 2 years, 7 months ago by AITpro.
    • This reply was modified 2 years, 7 months ago by AITpro.
    Plugin Author AITpro

    (@aitpro)

    Assuming all questions have been answered – the thread has been resolved. If the issue/problem is not resolved or you have additional questions about this specific thread topic then you can post them at any time. We still receive email notifications when threads have been resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘max_upload_size and others php value’ is closed to new replies.