Sign in to follow this  

Como mudar a versão do PHP no .htaccess



Description



Criei esse tutorial pois estava com um problema recentemente no cPanel

Para mudar você deve criar ou editar o arquivo .htaccess

<IfModule mime_module>
  AddHandler application/x-httpd-php56 .php .php5 .phtml
</IfModule>

Para trocar para o PHP 4.4:

AddHandler application/x-httpd-php4 .php


Para trocar para o PHP 5.0:

AddHandler application/x-httpd-php5 .php


Para trocar para o PHP 5.1:

AddHandler application/x-httpd-php51 .php


Para trocar para o PHP 5.2:

AddHandler application/x-httpd-php52 .php


Para trocar para o PHP 5.3:

AddHandler application/x-httpd-php53 .php


Para trocar para o PHP 5.4:

AddHandler application/x-httpd-php54 .php


Para trocar para o PHP 5.5:

AddHandler application/x-httpd-php55 .php


Para trocar para o PHP 5.6:

AddHandler application/x-httpd-php56 .php


Para trocar para o PHP 7:

AddHandler application/x-httpd-php7 .php


Para trocar para o PHP 7.1:

AddHandler application/x-httpd-php71 .php

 

  • Curtir (+1) 2


Recommended Comments

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a Comment

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.