How do I get PostgreSQL and TOMCAT version using PHP functions. Please help me.
2 Answers
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
Comments
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
SKV SKV
Need to check using PHP functions only...Please
tres.14159
Apache Tomcat? It is only for java, the question is about PHP.