PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, February 12, 2022

[FIXED] use two php versions(v7.2, v5.6) without create of subdomain

 February 12, 2022     codeigniter, cpanel, laravel, php, subdomain     No comments   

Issue

I have to upgrade my website in Laravel which is using PHP 7.2 and point root directory(public_html). In root(public_html) directory I have a folder "portal" which is a separate module in Codeigniter which is using PHP 5.6

Is there any way so I can apply PHP 7.2 on root folder(public_html) and PHP 5.6 in portal folder only .

like http://www.webiste.com/ work with PHP7.2

http://www.webiste.com/portal work with PHP5.6

Thank You


Solution

HERE is the exact code

Put this code in bottom of your .htaccess file in sub domain folder

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

Put this code in bottom of your .htaccess file of "public_html" folder

<IfModule mime_module>
    AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>


Answered By - Waqas
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing