It looks like I'm seeing quite a few lines of errors whenever I try something via curl and the API. For example, just pulling events.json I get quite a few lines of seemingly errors before the json data:
First I authenticate using:
Code: Select all
curl --silent --insecure -d "username=useid&password=password&action=login&view=console" -c /root/cookies.txt https://hostname/zm/index.php -o /dev/null
That correctly generates a fresh cookies.txt file. Then I pull a list of events with:
Code: Select all
curl -b /root/cookies.txt -XGET --silent --insecure https://hostname/zm/api/events.json
I would expect to see the json data and nothing else but I get quite a few lines of other stuff first.
Code: Select all
<pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875ee1b-trace').style.display = (document.getElementById('cakeErr5baa00875ee1b-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Use of undefined constant ZM_DB_SSL_CA_CERT - assumed 'ZM_DB_SSL_CA_CERT' [<b>CORE/Cake/Model/ConnectionManager.php</b>, line <b>69</b>]<div id="cakeErr5baa00875ee1b-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875ee1b-code').style.display = (document.getElementById('cakeErr5baa00875ee1b-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875ee1b-context').style.display = (document.getElementById('cakeErr5baa00875ee1b-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr5baa00875ee1b-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">include_once </span><span style="color: #0000BB">CONFIG </span><span style="color: #007700">. </span><span style="color: #DD0000">'database.php'</span><span style="color: #007700">;</span></span></code>
<code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">if (</span><span style="color: #0000BB">class_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'DATABASE_CONFIG'</span><span style="color: #007700">)) {</span></span></code>
<span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">static::</span><span style="color: #0000BB">$config </span><span style="color: #007700">= new </span><span style="color: #0000BB">DATABASE_CONFIG</span><span style="color: #007700">();</span></span></code></span></pre><pre class="stack-trace">ConnectionManager::_init() - CORE/Cake/Model/ConnectionManager.php, line 69
ConnectionManager::getDataSource() - CORE/Cake/Model/ConnectionManager.php, line 83
Model::setDataSource() - CORE/Cake/Model/Model.php, line 3646
Model::setSource() - CORE/Cake/Model/Model.php, line 1162
Model::getDataSource() - CORE/Cake/Model/Model.php, line 3673
Model::_readDataSource() - CORE/Cake/Model/Model.php, line 3040
Model::find() - CORE/Cake/Model/Model.php, line 3012
EventsController::index() - APP/Controller/EventsController.php, line 86
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
AppController::invokeAction() - APP/Plugin/Crud/Lib/CrudControllerTrait.php, line 31
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 108</pre></div></pre><pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875f585-trace').style.display = (document.getElementById('cakeErr5baa00875f585-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Use of undefined constant ZM_DB_SSL_CLIENT_KEY - assumed 'ZM_DB_SSL_CLIENT_KEY' [<b>CORE/Cake/Model/ConnectionManager.php</b>, line <b>69</b>]<div id="cakeErr5baa00875f585-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875f585-code').style.display = (document.getElementById('cakeErr5baa00875f585-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875f585-context').style.display = (document.getElementById('cakeErr5baa00875f585-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr5baa00875f585-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">include_once </span><span style="color: #0000BB">CONFIG </span><span style="color: #007700">. </span><span style="color: #DD0000">'database.php'</span><span style="color: #007700">;</span></span></code>
<code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">if (</span><span style="color: #0000BB">class_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'DATABASE_CONFIG'</span><span style="color: #007700">)) {</span></span></code>
<span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">static::</span><span style="color: #0000BB">$config </span><span style="color: #007700">= new </span><span style="color: #0000BB">DATABASE_CONFIG</span><span style="color: #007700">();</span></span></code></span></pre><pre class="stack-trace">ConnectionManager::_init() - CORE/Cake/Model/ConnectionManager.php, line 69
ConnectionManager::getDataSource() - CORE/Cake/Model/ConnectionManager.php, line 83
Model::setDataSource() - CORE/Cake/Model/Model.php, line 3646
Model::setSource() - CORE/Cake/Model/Model.php, line 1162
Model::getDataSource() - CORE/Cake/Model/Model.php, line 3673
Model::_readDataSource() - CORE/Cake/Model/Model.php, line 3040
Model::find() - CORE/Cake/Model/Model.php, line 3012
EventsController::index() - APP/Controller/EventsController.php, line 86
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
AppController::invokeAction() - APP/Plugin/Crud/Lib/CrudControllerTrait.php, line 31
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 108</pre></div></pre><pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875fcdf-trace').style.display = (document.getElementById('cakeErr5baa00875fcdf-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Use of undefined constant ZM_DB_SSL_CLIENT_CERT - assumed 'ZM_DB_SSL_CLIENT_CERT' [<b>CORE/Cake/Model/ConnectionManager.php</b>, line <b>69</b>]<div id="cakeErr5baa00875fcdf-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875fcdf-code').style.display = (document.getElementById('cakeErr5baa00875fcdf-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr5baa00875fcdf-context').style.display = (document.getElementById('cakeErr5baa00875fcdf-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr5baa00875fcdf-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">include_once </span><span style="color: #0000BB">CONFIG </span><span style="color: #007700">. </span><span style="color: #DD0000">'database.php'</span><span style="color: #007700">;</span></span></code>
<code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">if (</span><span style="color: #0000BB">class_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'DATABASE_CONFIG'</span><span style="color: #007700">)) {</span></span></code>
<span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">static::</span><span style="color: #0000BB">$config </span><span style="color: #007700">= new </span><span style="color: #0000BB">DATABASE_CONFIG</span><span style="color: #007700">();</span></span></code></span></pre><pre class="stack-trace">ConnectionManager::_init() - CORE/Cake/Model/ConnectionManager.php, line 69
ConnectionManager::getDataSource() - CORE/Cake/Model/ConnectionManager.php, line 83
Model::setDataSource() - CORE/Cake/Model/Model.php, line 3646
Model::setSource() - CORE/Cake/Model/Model.php, line 1162
Model::getDataSource() - CORE/Cake/Model/Model.php, line 3673
Model::_readDataSource() - CORE/Cake/Model/Model.php, line 3040
Model::find() - CORE/Cake/Model/Model.php, line 3012
EventsController::index() - APP/Controller/EventsController.php, line 86
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
AppController::invokeAction() - APP/Plugin/Crud/Lib/CrudControllerTrait.php, line 31
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 108</pre></div></pre>
All that preceeds the events.json output that I expect to see. The json data is normal and valid but all those error lines are confusing a perl script that used to work just fine.