Getting Data In

Instruct Splunk PHP SDK to connect via HTTP not HTTPS

EricLloyd79
Builder

I am having an issue connecting to a Splunk search head with the Splunk PHP SDK:
http://x.x.x.x

I get the error below. It is attempt to connect to https://.. and then gives me an SSL error. When I attempt to connect to https://x.x.x.x through my web browser it gives me a similar error so clearly I need to connect to this search head using http, not https.
I cannot figure out how to tell the SDK to connect with http: instead of https. Help?

PHP Fatal error: Uncaught exception 'Splunk_ConnectException' with message 'SSL connect error' in /var/www/html/eventcount/src/SplunkIndexMonitor/Splunk/Splunk/Http.php:196
Stack trace:

0 /var/www/html/eventcount/src/SplunkIndexMonitor/Splunk/Splunk/Http.php(94): Splunk_Http->requestWithCurl('post', 'https://x.x.x...', Array, 'username=abc&pa...')

1 /var/www/html/eventcount/src/SplunkIndexMonitor/Splunk/Splunk/Http.php(45): Splunk_Http->request('post', 'https://x.x.x...', Array, 'username=abc&pa...')

2 /var/www/html/eventcount/src/SplunkIndexMonitor/Splunk/Splunk/Context.php(94): Splunk_Http->post('https://x.x.x...', Array)

3 /var/www/html/eventcount/src/SplunkIndexMonitor/abc-prod04-run.php(127): Splunk_Context->login()

4 {main}

thrown in /var/www/html/eventcount/src/SplunkIndexMonitor/Splunk/Splunk/Http.php on line 196

0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...