Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Htaccess Code To Switch To Other Php Version, Htaccess Code To Switch To php 5.6
Web Design Seo
post Jun 13 2012, 08:21 AM
Post #1


Web Design Seo
****

Group: Root Admin
Posts: 4,332
Joined: 29-April 09
From: Sofia
Member No.: 1



Here is example of Htaccess Code To Switch To php 5.3. Many old cms and old functionalities dont work well with latest versions of php 5.5 and 5.6, so, if you have problems, you can use this to switch to php 5.3.

Enter as first line in your .htaccess in public_html this:

Код
AddHandler x-httpd-php53 php


Or try (for php 5.3) with:
Код
AddHandler application/x-httpd-php53 .php


Or try (for php 5.5) with:
Код
AddHandler application/x-httpd-php55 .php


For php 5.6:
Код
AddHandler x-httpd-php56 .php

Or:
Код
AddHandler application/x-httpd-php56 .php


In this way your website will work with php 5.3 or 5.6 instead of installed on your server version of (php 5.3 or other). This code work on most servers, but not on all. Just test this htaccess code on your server and with your php version to see. You can try to switch to other than 5.3 php version also smile.gif

For php 7.4:
Код
AddHandler x-httpd-php56 .php


Or:
Код
AddHandler application/x-httpd-php74 .php


For LiteSpeed servers:
Код
AddType application/x-httpd-alt-php74 .php .php7 .phtml



--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post
Web Design Seo
post Aug 17 2020, 08:58 AM
Post #2


Web Design Seo
****

Group: Root Admin
Posts: 4,332
Joined: 29-April 09
From: Sofia
Member No.: 1



To change PHP version only for some folder of your hosting account:

1. Download this zip archive. Unzip archive and upload files htaccess.txt and info.php to some folder of your server: /public_html/some_folder/

2. After this rename file "htaccess.txt" to file with name: ".htaccess"

3. Now open url: http:/mysite.com/some_folder/info.php - and you must see php version for this folder.


--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts Pinned: Htaccess Rules For Google Pagespeed Insights In 2021
The best rules for Htaccess for Apache servers
1 Web Design Seo 300,512 18th March 2021 - 02:07 PM
Last post by: Web Design Seo
No new Pinned: Htaccess Code To Speed Up Joomla
example code for Htaccess for Joomla, Wordpress and other CMS
8 Web Design Seo 61,741 17th February 2021 - 11:43 AM
Last post by: Web Design Seo
No New Posts Php And Display Issues
1 -suzankara- 16,002 23rd June 2015 - 08:54 AM
Last post by: Web Design Seo
No New Posts Pinned: Php Development Of Seo Tools
Web Development of Seo tool
1 Web Design Seo 23,124 26th October 2012 - 02:23 PM
Last post by: Web Design Seo
No New Posts Pinned: Php Development Of News Aggregators
Web Development of Rss Feed Aggregators
0 Web Design Seo 17,757 19th December 2011 - 01:58 PM
Last post by: Web Design Seo
No New Posts Php Code To Retrieve Title In Joomla 1.7
useful guide
0 Web Design Seo 10,925 16th November 2011 - 11:26 AM
Last post by: Web Design Seo


 



RSS Lo-Fi Version Time is now: 1st June 2026 - 09:27 PM