Could you post your config files? I feel that the problem might be something I overlooked in the setup.
 
Just sent you my config file in a private mail (off-list).
Basically it is a standard config.inc.php, for the gmail server I only modified these settings:

$rcmail_config['default_host'] = 'ssl://imap.gmail.com';

$rcmail_config['default_port'] = 993;

PHP Version is 5.2.17 by the way.