unable to change PHP version in htaccess file

Home Forums BulletProof Security Pro unable to change PHP version in htaccess file

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45296
    Giorgio
    Participant

    I need to change the PHP version for one domain in my hosting .

    the hosting have php 8.2 , and for one website I need 7.4

    I need to do it in the htaccess file

    I´ve tried adding the following line  at the beginning of the root htaccess file in PBS

    AddHandler application/x-httpd-php74 .php

    But it won´t work, the website gets 8.2 from the main hosting environment

    I also tried with the following
    <FilesMatch “\.(php4|php5|php3|php2|php|phtml)$”>
    SetHandler application/x-lsphp74
    </FilesMatch>

    But the website won´t work anymore

    Any suggestion?

    #45297
    AITpro Admin
    Keymaster

    Most web hosts no longer use php handler htaccess code.  You might be able to change php handler code per domain/website in your web host control panel, but cPanel now seems to only allow you to change your php server version for your entire hosting account. If your web host does still allow php handler htaccess code then you would need to use the exact specific php handler htaccess code for your web host. Check your web host’s help docs for the exact php handler htaccess code that your web host uses. You would add your web host’s specific php handler htaccess code in this BPS Root Custom Code text box:  1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE. After adding your php handler htaccess code click the Save Root Custom Code button and activate Root folder BulletProof Mode again.

    #45298
    AITpro Admin
    Keymaster
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.