So, I recently had a special case where my client was using older version of php in his godaddy hosting and didn’t want to upgrade. But for the current project I needed to enable php 5.4. I couldn’t use godaddy control panel to change/upgrade php version because that would change the php version for whole account. So I needed to find a better solution that only allow to change php version for the current project folder and all folder beneath.
This might sound complicated but you need to add just a piece of code to your .htaccess file to do it.
This is how:
- Go to the root of your project folder.
- Download `.htaccess` file from root folder if there is any or just create a file on your computer.
- Add this piece of code `AddHandler x-httpd-php5-4 .php`
- Save the file.
- Upload it to your project folder.
And you are done 🙂