UmbHost Limtied Posted April 25, 2023 Share Posted April 25, 2023 When I try to make an API request (/includes/api.php?action=DomainWhois&responsetype=json) for the whois search I receieve a 500 error. From the error in the log, it looks to be an issue with a vendor library: {main} {"exception [error] [WHMCS Application] ERROR: Laminas\HttpHandlerRunner\Exception\EmitterException: Unable to emit response; headers already sent in /home/wwwroot/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:19 Stack trace: #0 /home/sites/25a/2/27a7ef7eec/my/wwwroot/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(36): Laminas\HttpHandlerRunner\Exception\EmitterException::forHeadersSent() #1 /home/wwwroot/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 /home/wwwroot/includes/api.php(0): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(WHMCS\Http\Message\JsonResponse)) #3 Interestingly the error only occurs with the external api, if I make an internal api request it works. 0 Quote Link to comment Share on other sites More sharing options...
andrezzz Posted April 29, 2023 Share Posted April 29, 2023 Hello, How are you? Just for the avoidance of doubt, can you show me the output of this request? https://example.com/admin/whois.php?domain=REPLACE_WITH_DOMAIN 0 Quote Link to comment Share on other sites More sharing options...
UmbHost Limtied Posted May 2, 2023 Author Share Posted May 2, 2023 Sure it's below, as I say the internal API's all work great, it only breaks if I try to access it via the external api 0 Quote Link to comment Share on other sites More sharing options...
Solution UmbHost Limtied Posted May 4, 2023 Author Solution Share Posted May 4, 2023 This has been solved. There was a stray space at the beginning of the configuration.php file 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.