PHP 7 – .htaccess Custom Code

Home Forums BulletProof Security Pro PHP 7 – .htaccess Custom Code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27738
    Sebastian Schertel
    Participant

    Hey there!
    Since PHP7 is out in the open I’d like to use it. I’m running a DSO server configuration and right now in my BPS Custom Code Top PHP/PHP.INI Handler/Cache Code I have:

    AddHandler php55-cgi .php
    php_value post_max_size 32M
    php_value upload_max_filesize 32M
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value max_input_time 300
    php_value session.gc_maxlifetime 86400

    I read in my hostings FAQ that the “AddHandler php70-cgi .php” overwrites the settings in my server backend (where 5.5 is set as active). So I’d change the numbers in the first line from 55 to 70 Alright.

    Now I asked my host if I should also change the IfModule mod_php5.c to IfModule mod_php7.c to which they replied I should not use IfModule for that in my .htaccess file. Now I’m here, confused. Are they right and I should get rid of the IfModule.. etc..?

    Additionally:
    Strange thing also occured: if I only add the AddHandler php70-cgi .php, remove the IfModule part and activated my newly created htaccess file my site goes down with a 500 error. Any idea what to do or would I need to nag the hosting company because it’s an error on their side?

    Thank you very much – as always.

    #27739
    AITpro Admin
    Keymaster

    Your host would need to tell you the exact htaccess php handler code to use on their/your server since the code is unique/specific to each host/server.  Based on what they told you, this is the PHP7 handler code to use on your particular server:  AddHandler php70-cgi .php.  As far as whether or not IfModule code is allowed to be used on your particular server, that is something that only your host would be able to tell you since anything related to php.ini and php handlers is unique/specific to each web host.

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