Utilities for the Splunk SDK for PHP

The Splunk SDK for PHP is deprecated. For more information, see Deprecation notice.

This section describes an optional utility you can use with the Splunk® SDK for PHP.

Save login credentials for examples and unit tests

To connect to Splunk, all of the SDK examples and unit tests take arguments that specify values for the host, port, and login credentials for Splunk. For convenience during development, we store these arguments in a file named settings.default.php.

Note  Storing login credentials in this file is only for convenience during development—this file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production.

The examples and tests use different settings.default.php files (located in /splunk-sdk-php/examples and /splunk-sdk-php/tests, respectively) with the following values, which you should update with your own credentials:

'host' => 'localhost',
'port' => 8089,
'username' => 'admin',
'password' => 'changeme',