How to find out PHP version in Linux SSH

Posted on 2006-05-26
Medium Priority
Last Modified: 2008-02-01
How do I find out the version of PHP running on Linux via SSH?
Question by:mpaert
LVL 49

Expert Comment

ID: 16769623
you can run <?php phpinfo(); ?>

LVL 16

Accepted Solution

xDamox earned 2000 total points
ID: 16769936

In SSH type:

php --version

You should get something similar to:

PHP 5.1.4 (cli) (built: May  8 2006 08:41:41)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
LVL 16

Expert Comment

ID: 16769967
note that for XDamox solution to work, php must be in the system path, or else, you'll have to use php's absolute path /usr/lolcal/.../.../php --version

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question