Roundcube Community Forum

 

Roundcube Getmail plugin

Started by tryphon, September 07, 2015, 10:15:21 AM

Previous topic - Next topic

tryphon

Hi,

Maybe this post should be addressed to the Getmail author : I tried to create an account to GitLab without success and I had no answer from GitLab about this issue. Then I cannot write a new subject on his GitLab project website.

I installed successfully Getmail 4.48 on my home server (Qnap). I use the MailDir method to retrieve messages from a Gmail account. It works.

The next step is to use the Getmail plugin with RoundCube. I followed carefully the installation process and carefully study the config.inc.php file to set up the right parameters. For a test I run manually the cron.php file with php-cli command included in my server OS. No error message. When I go to my MailDir folder I see nothing new.

I would like to produce the /roundcube/logs/console file to debug the issue. In the configuration file I set $config['getmail_debug'] = 1 or $config['getmail_debug'] = true, but I don't get any console log file and nothing more appears in the errors log file.

In fact, nothing happens. I do not know PHP language but I added :

echo $rcmail;

just after the line

$rcmail = rcmail::get_instance($GLOBALS['env']);

in the file cron.php, and I executed it manually.

$rcmail is empty. I do not know what rcmail::get_instance() is doing but I see this statement in the Plugins Resources page in your website.

I suspect the getmail plugin cannot work with $rcmail empty ...

Any idea ?

Thank you.

SimonTank

Does no one have a clue?

I also tried to debug this...
the error is in rcmail::get_instance($GLOBALS['env']);
somewhere in this a die() without message is thrown.

Also added

error_reporting(E_ALL);
ini_set('error_log', '/var/log/php-error-shell.log');
error_log('hello');


but only log is
[17-Dec-2015 15:11:44 Europe/Berlin] hello

did in one of the last versions
rcmail::get_instance
change?

SKaero

I don't use the getmail plugin so I can't really comment on the setup but maybe I can give you some hints as to whats wrong.

Quote from: tryphon on September 07, 2015, 10:15:21 AM
In fact, nothing happens. I do not know PHP language but I added :

echo $rcmail;

just after the line

$rcmail = rcmail::get_instance($GLOBALS['env']);

in the file cron.php, and I executed it manually.

$rcmail is empty. I do not know what rcmail::get_instance() is doing but I see this statement in the Plugins Resources page in your website.

I suspect the getmail plugin cannot work with $rcmail empty ...
The get_instance function is being used to start Roundcube, the reason why it seems empty when you echo it is because it returns an object not a string. If you wanted to see the contents you would need to do the following:

echo print_r($rcmail, true);


Quote from: SimonTank on December 17, 2015, 09:20:42 AM
I also tried to debug this...
the error is in rcmail::get_instance($GLOBALS['env']);
somewhere in this a die() without message is thrown.

Also added

error_reporting(E_ALL);
ini_set('error_log', '/var/log/php-error-shell.log');
error_log('hello');


but only log is
[17-Dec-2015 15:11:44 Europe/Berlin] hello
Most likely there isn't any fail errors being thrown and thats why changing the error reporting doesn't show anything more.

Quote from: SimonTank on December 17, 2015, 09:20:42 AM
did in one of the last versions
rcmail::get_instance
change?
If your using the GIT version of Roundcube then yes the function has changed, if your using Roundcube 1.1.x then the function hasn't changed.

My gut feel is that the problem is something deeper in the plugin then the initialization.

SimonTank

Found the error....
Damn thing.

If any problem got a little error in config, get instance isn't delivered...
The Problem was the "Melanie2 Larry Mobile skin v0.4.4" the required plugin for mobile doesn't work correct.

Deactivated it. Now everthing works

SKaero