Turn on logging library usage, in file config.inc.php
$LOG4PHP_DEBUG = true;
Activate the type of logging and log level, in the file include/logging/config.php
'APPLICATION' =>; [
'Enabled' => true,
'Level' => 'DEBUG',
'MaxBackup' => 10,
'File' => 'corebosapp',
],
The log files will be written in the logs directory. For the rootLogger it will be logs/corebosapp-{date}.log
if(empty($adb)) {
$adb = new PearDatabase();
$adb->connect();
// ADD THIS LINE
$adb->setDebug(true);
}
In file, Smarty_setup.php add the following to class constructor
function `function vtigerCRM_Smarty() {
$this->Smarty();
$this->template_dir = 'Smarty/templates';
// ...
// ADD THIS LINE
$this->debugging = true;
}
Chrome and Firefox have webdevelopers tools and firebug.
There are various debug global variables that can help you diagnose problems with your coreBOS installation.
diff --git a/vtwsclib/Net/curl_http_client.php b/vtwsclib/Net/curl_http_client.php
index c52dd76..a42eb3c 100644
--- a/vtwsclib/Net/curl_http_client.php
+++ b/vtwsclib/Net/curl_http_client.php
@@ -183,7 +183,7 @@ class Curl_HTTP_Client
//and finally send curl request
$result = curl_exec($this->ch);
-
+var_dump($result); // GET
if($this->has_error())
{
return false;
@@ -243,7 +243,7 @@ class Curl_HTTP_Client
//and finally send curl request
$result = curl_exec($this->ch);
-
+var_dump($result); // POST
if($this->has_error())
{
return false;
Also, the ajax call in the browser can be seen and is very useful also to see the raw result (Firebug is your friend)
Additionally, one of our former team members used this patch, which produces the error on screen or in the AJAX response.
Have a read here about how coreBOS outgoing email server works and how to configure it.
Activate the debug log at level FATAL and set the Debug_Email_Sending global variable to 1. This will send the whole conversation between coreBOS and the email server to the log file so you can diagnose the problem.
To debug the outgoing email server the best is to activate PHPMailer debugging with the changes below and look in the debug log file (logs/vtigercrm.log)
diff --git a/modules/Emails/class.phpmailer.php b/modules/Emails/class.phpmailer.php
index 8427255..61bd55c 100644
--- a/modules/Emails/class.phpmailer.php
+++ b/modules/Emails/class.phpmailer.php
@@ -326,7 +326,7 @@ class PHPMailer
* @var integer
* @see SMTP::$do_debug
*/
- public $SMTPDebug = 0;
+ public $SMTPDebug = 4;
/**
* How to handle debug output.
diff --git a/modules/Emails/mail.php b/modules/Emails/mail.php
index a8cac72..7674172 100755
--- a/modules/Emails/mail.php
+++ b/modules/Emails/mail.php
@@ -328,7 +328,14 @@ function setMailServerProperties($mail)
$mail->Host = $server; // specify main and backup server
$mail->Username = $username ; // SMTP username
$mail->Password = $password ; // SMTP password
-
+global $log;$log->fatal(array(
+ 'SMTPOptions' => $mail->SMTPOptions,
+ 'SMTPSecure' => $mail->SMTPSecure,
+ 'Host' => $mail->Host = $server,
+ 'Username' => $mail->Username = $username,
+ 'Password' => $mail->Password = $password,
+));
+$mail->Debugoutput = function($str, $level) { global $log;$log->fatal($str);};
return;
}
Make sure the webserver user has write permission in the user_privileges directory and that the new user's permission file is correct (it will be user_privileges_##.php and sharing_privileges_##.php).
If that is correct (most probably will be or you wouldn't get to this error) you will have to add some debug message to see exactly what file the application is looking for and can't find. That will be something like this:
https://github.com/tsolucio/corebos/commit/26cf68eb89b888aa71d99f3d0e1e5d48b6cf7081