5

How do I get PostgreSQL and TOMCAT version using PHP functions. Please help me.

2 Answers 2

4

I have found in this link Re: Determing Postgres version and the code is

$sql = "SELECT version();";
pg_send_query($dbconnection, $sql);

And my machine returns

PostgreSQL 8.4.20 on i386-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 32-bit
Sign up to request clarification or add additional context in comments.

Comments

3

You can use pg_version to find the PostgreSQL version.

To find the Tomcat varsion you can open the file catalina.out and search for the pattern:

Apache Tomcat/<version>

A typical example is:

Apache Tomcat/6.0.13

2 Comments

Need to check using PHP functions only...Please
Apache Tomcat? It is only for java, the question is about PHP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.