By lollo90
Hello, I’m very very new to web development and computing world and I’ve got a very basic question. I need to create a web app which supports login with Facebook. In order to do that, I need to use php. Although, Facebook api need php5.4+ How do I know which version of php is supported from my server? Besides, If it’s not 5.4+ how do I update it?
Thanks a lot for your support.
Greets,
Giacomo
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
RE: “How do I know which PHP version I’m using?”
When logged in to the server
php -v
will show you the PHP version information
Here’s a quick cheat sheet that shows the base versions of PHP offered in some major distros:
| Distro | PHP Version |
|---|---|
| Ubuntu 12.04 | 5.3.10 |
| Ubuntu 14.04 | 5.5.9 |
| Ubuntu 16.04 | 7.0 |
| CentOS 6 | 5.3.3 |
| CentOS 7 | 5.4.16 |
| Debian 7 | 5.4.45 |
| Debian 8 | 5.6.20 |
If you need a more recent version, there are a number of third party repositories that offer them. For instance, these articles will walk you through upgrading to PHP 7 on Ubuntu 14.04 and CentOS 7:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.