ServerInfo

Summary: Markup - Display $_SERVER Super-Global results from current Server
Version: 2022-06-10
Prerequisites: None
Status: Stable
Maintainer: Kirk Siqveland
Users: (view? / edit)
Discussion: ServerInfo-Talk?

Questions answered by this recipe

  • Can I get information about the Server running my PmWiki installation?
  • How can I use the $_SERVER Super Global?
  • Can I find the Path of pmwiki.php or my Script programmatically?
  • What information is available to me about the Server?
  • Can I get information about the Browser Viewing my Wiki?
  • Can I get both the current URL and The current Server Path?

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.

Description

Markup to Display Results from $_SERVER Super-Global

The $_SERVER Super-Global can reveal a lot of information, but often with subtle differences.
I got tired of trial and error, so I made an easy way to see what each variation gives as a result on the current server.
Simply install the recipe,
then make a page -- say /Site/ServerInfo, and
add the Markup to display a table with a host of information including the results you will get from Markup when querying the $_SERVER Super-Global.

Installation

Download the ServerInfo.phpΔ file, copy it to your pmwiki /cookbook directory.
-->Usually something like www.mydomain.org/pmwiki/cookbook

Add the include line to your /local/config.php file:

include_once( "$FarmD/cookbook/ServerInfo.php" ) ;

Create a new page, say /Site/ServerInfo and add the Markup:

(:ServerInfo:)

That's it!

Configuration

None needed.

But, for decoration I like to have the alternating colors in my tables so I use something like this:
	tr:nth-child(even) {
	    background-color: rgb( 36, 42, 47);
	}

In my CSS to decorate the Table Rows (tr)

Usage

Once you have installed it, and added the markup to a page, you just go to that page and read carefully.

Notes

Cookbook:SimpleRecipeTemplate also provides a display of $_SERVER

To do / some day / maybe

If you have future plans or wishes for this recipe. I expect I will be adding other queries and variables to this table as time goes on...

Change log / Release notes

2022-06-10 - Security feature: hides actual server-username, but allows display by commenting one line.

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Contributors

Kirk Siqveland

Comments

See discussion at ServerInfo-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.