4.3 KiB
scripts
PHP
Global Variables
As the modules this website includes have to communicate together there are some global variables defined as arrays.
$_REQUEST
:php$_REQUEST
$_SERVER
:php$_SERVER
Contains the recent host-header from the actual request (if sent). Is set by system.
This variable is used in includes/general.php
Contains a non-empty value if the script is called by HTTPS. It is assumed to be the value "on".
This variable is used in includes/general.php
$_SESSION
:php$_SESSION
Note
The web application uses the session to store global variables. It might be a better idea to use real variables or constants. The session is user related and should only store the minimum information to make information available across request boundaries.
This global variable defines the status of the database connection
- TRUE if a connection could be established
- FALSE otherwise
$_SESSION['_config']
:php$_SESSION['_config']
This global variable is initialized in includes/general.php
with the value ''.
This global variable is initialized in includes/general.php
with the value '/www'. Meant is the root direcory.
This global variable defines the main CAcert-website, it is set in /includes/mysql.php
.
- "www.cacert.org" for production
- "test.cacert.org" for testing
This global variable defines the secure CAcert-website, it is set in /includes/mysql.php
.
- "secure.cacert.org" for production
- " cacert.org" for testing
This global variable defines TVERIFY, it is set in /includes/mysql.php
.
- "tverify.cacert.org" for production
- " " for testing
checkout what TVERIFY means, check names for test-system
$_SESSION['profile']
:php$_SESSION['profile']
Here the internal representation of the user is stored. It is used for database accesses. 'user'
Contains the total number of points for the user; calculated from notary
.
globalConstants