Try running the following at the commvà line.
Bạn đang xem: Cách cài đặt nhiều phiên bản php với nginx trên ubuntu
quý khách hàng sẽ xem: How to lớn kiểm tra php version 2 methods explained
To just get the version information:
php -vOr lớn get a lot of info:
php -iIt should give you all information you need about the php install.
An answer was accepted, but another option on RPM systems (RHEL, Centos, Fedora, etc.) is khổng lồ use the following:
rpm -q phpAnd while I"m at it, the general method for using RPM to find info on a package for any rpm-installed program or file is similar lớn this (for awk):
Find the full path to lớn the file if not known, such as for an executable in $PATH:
type -path awk
Find the name, including version, of the package containing the file:
rpm -qf /usr/bin/awk
If desired, query for info from that package:
rpm -qi gawk
It"s a bit trickier for packages installed & used by Apađậy since they may not be on $PATH, but you can start with something like:
rpm -qa | egrep -i "php|awk"Share Improve this answer Follow answered Sep 14 "09 at 15:58 NVRAMNVRAM 79877 silver badges20trăng tròn bronze badges Add a bình luận | 3Use
more /etc/php.iniThis will show you:Apabịt VersionPHP. VersionsPHPhường. FunctionsVarious options regarding PHPhường Share Improve sầu this answer Follow edited Sep 24 "12 at 11:21 slhchồng 198k6060 gold badges533533 silver badges539539 bronze badges answered Sep 24 "12 at 10:13 PankajPankaj 3111 bronze badge Add a bình luận |
Thanks for contributing an answer lớn Super User!Please be sure to lớn answer the question. Provide details and tóm tắt your research!
But avoid …Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.Draft savedDraft discarded
Sign up or log inSign up using Google Sign up using Facebook Sign up using E-Mail & Password Submit
Post as a guestName Thư điện tử Required, but never shown
Post as a guestName E-Mail
Required, but never shownPost Your Answer Discard
Not the answer you're looking for? Browse other questions tagged linux centos php or ask your own question.The Overflow Blog Featured on Meta Linked5Checking what PHP version I'm running on Debian? Related 5 Checking what PHP version I'm running on Debian? 7 PHP version for super user is fcgi instead of cli 0 phpbrew install php version 2 Running ruby script through php as www-data 1 MAC php version not updating 0 PHPhường cli is not running after reboot 0 Can't update the PHPhường 5.3 to lớn higher version on CentOS 6.1 0 What is the stable version for PHP 5.5.9? Hot Network Questions more hot questions
Question feed Subscribe lớn RSS Question feed To subscribe lớn this RSS feed, copy và paste this URL into lớn your RSS reader.