How to check PHP Version and how to upgrade latest one ?

Started by Dipak Bhoi, December 19, 2013, 06:00:46 AM

Previous topic - Next topic

Dipak Bhoi

Hello guys,

I would like to request the latest version of PHP be installed on my domain before that I want to check my current php version,
so how I can get this ?

To check current php version you will have to add a file phpinfo.php or whatever_name.php into public_html directory.

Quoteusername/public_html]#vi phpinfo.php

Add the following line in your file and save it.
Quote<?php phpinfo(); ?>

:wq
Now change the ownership of this file root to username. e.g my username is dipawe.
Quotepublic_html]#chown dipawe:dipawe phpinfo.php

Now you can check it with the link --> http://yourdomain.com/phpinfo.php.

To upgrade php version you will have to add a single line into .htaccess file and save it. You can add this line at top of file.
Quotepublic_html]#vi .htaccess

AddType application/x-httpd-php53 php

:wq

Now you can check it with the link --> http://yourdomain.com/phpinfo.php.

MilesWeb - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India
Grab a Free SSL for your website.  WordPress Optimized Solution.