Closed prashant-earth closed 7 years ago
Hi, we already provide a debugging mechanism that outputs the full request details. Just do this before calling api()
:
$ac->debug = true;
Otherwise, anywhere in Connector.class.php
you can output debug statements like this:
$this->dbg("my debug stuff");
Hope that helps!
@prashant-earth try commenting this line https://github.com/ActiveCampaign/activecampaign-api-php/blob/master/includes/Connector.class.php#L205
@dieend Instead of commenting that line can you make following change to the library so that the change is hosted at activecampaign library itself and does not get removed with composer updates. And it will be available to everyone.
This fix will NOT send headers when the invocation is from Command Line Interface.
$php_sapi = php_sapi_name();
if($php_sapi !== 'cli'){
header("HTTP/1.1 " . $http_code);
}
I've actually done that before commenting here. See https://github.com/ActiveCampaign/activecampaign-api-php/pull/30 @prashant-earth You can vote there to make this repo maintainer merge it.
@dieend Ok, thanks!
Hi,
We are using your activecampaign library and we want to print details about the result from API calls. And as the library uses HTTP POST headers to make calls, we get notice error : Warning Error: Cannot modify header information - headers already sent
How can we resolve this issue?
Thanks