SettingsServer
Click here if you want to read this article for the latest version.
Piwik\
SettingsServer
Contains helper methods that can be used to get information regarding the server, its settings and currently used PHP settings.
Methods
The class defines the following methods:
isArchivePhpTriggered()— Returns true if the current script execution was triggered by the cron archiving script.isMatomoForWordPress()— Returns true if Matomo is running within Matomo for WordPress.isIIS()— Returnstrueif running on Microsoft IIS 7 (or above),falseif otherwise.isWindows()— Returnstrueif running on a Windows operating system,falseif otherwise.isTimezoneSupportEnabled()— Returnstrueif this PHP version/build supports timezone manipulation (e.g., php >= 5.2, or compiled with EXPERIMENTAL_DATE_SUPPORT=1 for php < 5.2).isGdExtensionEnabled()— Returnstrueif the GD PHP extension is available,falseif otherwise.
isArchivePhpTriggered()
Returns true if the current script execution was triggered by the cron archiving script.
Helpful for error handling: directly throw error without HTML (eg. when DB is down).
Signature
- It returns a
boolvalue.
isMatomoForWordPress()
Returns true if Matomo is running within Matomo for WordPress.
Signature
- Returns:
bool— true if Matomo is running in WordPress, false if Matomo is running as part of On-Premise
isIIS()
Returns true if running on Microsoft IIS 7 (or above), false if otherwise.
Signature
- It returns a
boolvalue.
isWindows()
Since Matomo 0.6.5
Returns true if running on a Windows operating system, false if otherwise.
Signature
- It returns a
boolvalue.
isTimezoneSupportEnabled()
Returns true if this PHP version/build supports timezone manipulation
(e.g., php >= 5.2, or compiled with EXPERIMENTAL_DATE_SUPPORT=1 for
php < 5.2).
Signature
- It returns a
boolvalue.
isGdExtensionEnabled()
Returns true if the GD PHP extension is available, false if otherwise.
Note: ImageGraph and the sparkline report visualization depend on the GD extension.
Signature
- It returns a
boolvalue.