Php value on .htaccess is not working..

Home Forums BulletProof Security Pro Php value on .htaccess is not working..

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #38730
    Jarde
    Participant

    Hi,

    Php value on .htaccess is not working on main domain but strangely it works on subdomain.
    Both domains use bps pro.

    This is value that I wanted to change: php_value max_input_vars 10000

    I added that line to custom code > CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE.
    into last line and saved and activated RBM. Changes work immediately on subdomain (test site where I can test plugin updates without breaking main site)

    BUT in main domain it does not work.

    I can change that value from Cpanel MultiPHP INI Editor but it cold possibly to break bps or site as it writes to .htaccess file.
    Cpanel manual indicates that both basic and editor mode write also to .htaccess file.

    So does it break something if I add that php value from Cpanel or is there a way to get that value working when editing .htaccess via bps pro ?

    Thanks

    -Jarde

    #38731
    AITpro Admin
    Keymaster

    It may be that you have to change both the cPanel phpini editor options and add the php_value htaccess code in your root htaccess file. Logically you should not have to do that since any htaccess code in htaccess files should be seen immediately by your server. Try changing your cPanel phpini editor options and let me know what happens.

    #38732
    Jarde
    Participant

    .htaccess already have that value. I changed value in Cpanel using both ways multiphp ini editor gives. Value changes but something resets it. Cpanel tells that values had been saved successfully and when I go back to that page in Cpanel I see that values have not changed.  I`m contacting server support now.

    #38733
    Jarde
    Participant

    I was able to solve it on my own as BPS notified files in quarantine and they were php.ini and user.ini.  After restoring those files php value stays what it should it.

    So this is solved.  Thanks for reply @ait_pro.

    #38734
    AITpro Admin
    Keymaster

    Good job! I guess you have a CGI server and not a DSO server then. php_value htaccess code typically only works on DSO server types.

    #38736
    Jarde
    Participant

    BUT as I wrote on my first post that php_value  command works on subdomain but not on main domain.

    They are both on same server.  This is bps pro tells about server: litespeed CGI Host Server Type.

    But it still does not explain why it worked with subdomain as subdomain is a duplicator backup of main domain.

    I guess that  php.ini and/or user.ini somehow blocked using value in  .htaccess file in main domain.. just a guess…

    but anyway I got that think done what I needed to do when did not hit php vars limit anymore.

     

    #38737
    AITpro Admin
    Keymaster

    Yeah that is odd. You got things working. So that is all that really matters. 😉

    #38738
    AITpro Admin
    Keymaster

    I think what probably happened was that when you originally checked your subdomain site the php.ini and .user.ini files had not been quarantined yet.  So the php_value htaccess code appeared to be working on your subdomain site, but actually the php.ini and .user.ini files were working since they had not been quarantined yet.  Seems logical anyway.

    #38739
    Jarde
    Participant

    I had to comment once more.

    It did not only appeared to be working on subdomain but actually worked. I tried saving data before adding  that code to .htaccess on subdomain. Then I put that code on .htaccess and WPML support page shows that value is changed. Then went to save data and it worked this time.

    And now I was able to do same data saving on main domain. I always test on testsite before making changes main domain to avoid unnecessary downtime’s.

    Also Cpanel shows max_input_vars 1000 for subdomain but WPML support page shows that value is 10000. I only changed .htaccess file on subdomain. And value is 10000 as saving data works. I need at least 9000 to save certain data. Subdomain`s php.ini and user.ini have default value 1000 for max_input_vars but .htaccess has my added value 10000.

    So main domain obeys php.ini and user.ini files values but subdomain obeys .htaccess values. Really strange….

    Both domains seem to work differently even subdomain is duplicator copy of main domain and not so old one.

    #38740
    AITpro Admin
    Keymaster

    The only other logical thing I can think of would be that your main and subdomain website’s are loading different PHP servers. Check with your web host and see what they have to say.

    #38765
    Jarde
    Participant

    Sorry for late response. Both domains  use same php version and ip addresses are same. Server support suspected that some plugin prevented value change. They were glad that problem is fixed now.

    Thanks for the replies.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.