How to change php version in htaccess in server

0 votes
Suppose I'm using php 5.3 on my local machine. On  webserver we have php 4.8. Our server is a shared server. So I want to change the php version on our server via .htaccess file. Is it possible to do it? If yes how to do it?
Nov 4, 2020 in PHP by kartik
• 37,520 points
2,939 views

1 answer to this question.

0 votes

Hello,

To switch to PHP 4.4:

AddHandler application/x-httpd-php4 .php

To switch to PHP 5.0:

AddHandler application/x-httpd-php5 .php

To switch to PHP 5.1:

AddHandler application/x-httpd-php51 .php

To switch to PHP x:

AddHandler application/x-httpd-phpx .php

answered Nov 4, 2020 by Niroj
• 82,840 points

Related Questions In PHP

0 votes
0 answers

how to change to english number to nepali number in php

I want to change the English numerals ...READ MORE

May 28, 2022 in PHP by Kichu
• 19,040 points
620 views
0 votes
1 answer

How to merge two arrays while keeping keys instead of reindexing in php?

Hello, Considering that you have $replaced = array('1' => ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,840 points
3,050 views
0 votes
1 answer

How to get the client IP address in PHP ?

Hello, Here is a code sample of a good ...READ MORE

answered Apr 8, 2020 in PHP by Niroj
• 82,840 points
7,009 views
0 votes
1 answer

How to implement a callback in PHP?

Hello, Implementation of a callback is done like ...READ MORE

answered Apr 15, 2020 in PHP by Niroj
• 82,840 points
1,035 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,085 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
3,017 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,951 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
44,893 views
0 votes
1 answer

How to change the session timeout in PHP?

Hello @kartik, Put $_SESSION['login_time'] = time(); into the previous authentication ...READ MORE

answered Sep 15, 2020 in PHP by Niroj
• 82,840 points
4,424 views
0 votes
1 answer

How to escape strings in SQL Server using PHP?

Hello @kartik, addslashes() isn't fully adequate, but PHP's mssql ...READ MORE

answered Oct 6, 2020 in PHP by Niroj
• 82,840 points
5,011 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP