Tag Archive for 'php'

Enable PHP5 when PHP4 is default

The following tutorial will show how to enable PHP5 on your site, when Apache has PHP4 as default. I normally do everything through SSH, so here are the steps.

root@thelinuxnoob.com [/]# cd home/thelinux/public_html/
root@thelinuxnoob.com [~/public_html]# nano .htaccess
Add the following line to the .htaccess: AddType application/x-httpd-php5 .php
ctrl + x
ctrl + y
enter
root@thelinuxnoob.com [~/public_html]# cat .htaccess | grep php5
AddType application/x-httpd-php5 .php
root@thelinuxnoob.com [~/public_html]# chmod 644 .htaccess
root@thelinuxnoob.com [~/public_html]# chown thelinux.thelinux .htaccess
root@thelinuxnoob.com [~/public_html]#

Via FTP

Open favorite text editor
AddType application/x-httpd-php5 .php
Save as “.htaccess”
Upload through FTP client

That’s my quick tutorial of the day, tune in next time for more tutorials :)