Roundcube Community Forum

 

Error in Register plugin

Started by henlon, October 10, 2009, 04:29:07 PM

Previous topic - Next topic

henlon

After several tries I got this error in my log file when I use the Register plugin.
I'm using RC 0.3RC1.

[10-Oct-2009 22:09:59 +0200]: PHP Error: Failed to load config from C:\Inetpub\wwwroot\rcv3/plugins/\register/drivers/hmail_sql_5_2/config.inc.php.dist (POST /index.php?_action=register&_ajax=1?_task=&_action=)

The path to the file 'config.inc.php.dist' looks very strange

There are both slashes and backslashes.
Shouldn't the path contain only backslashes?

RC runs on IIS 6.0

SKaero

The thing I notice about the path is the config.inc.php.dist file, roundcube use config.inc.php for its configuration. I don't know why it would be pulling the config.inc.php.dist file.

Scarabaeus

Note Usage #2 in below code.
When configuring  the Register Plug-in for hMailServer the .dist file must remain.
It is used as a default config if one fails to provide a .php config file.
Also see below.
If you renamed the .dist to .php instead of copying, then this error would be expected.

regards

/** USAGE
 *
 * #1- Configure "register/config/config.inc.php.dist".
 * #2- Copy file to "config.inc.php" ("config.inc.php.dist" must still be present !!!).
 * #3- Register plugin ("./config/main.inc.php ::: $rcmail_config['plugins']").
 *
.
.
.
function init()
  {
    $this->add_texts('localization/', true);
    $this->load_config('config/config.inc.php.dist');
    if(file_exists("./plugins/register/config/config.inc.php"))
      $this->load_config('config/config.inc.php');
    $this->include_script('register.js');

// load driver config
    $rcmail = rcmail::get_instance();
    $driver = $rcmail->config->get('register_driver');
    $this->load_config("drivers/$driver/config.inc.php.dist");
    if(file_exists("./plugins/register/drivers/$driver/config.inc.php"))
      $this->load_config("drivers/$driver/config.inc.php");
.
.
.
hMailServer 5.3.3 - Build 1879 | ClamAV 0.96.5 (tBB) | SpamAssassin 3.2.3.5
AfterLogic Webmail Pro 6.3.10 | RoundCube 0.7.1
WampServer 2.0i - [ Apache 2.2.11 | MySQL 5.1.36 | PHP 5.3.0 ]

SKaero

Ah my error I was thinking of the main.inc.php not the config.inc.php. The ...plugins/\register... part should only have one /.

Scarabaeus

Ya... and that too!!! Most probably because of what you indicate.
The bigger question; how did that path get mangled??
hMailServer 5.3.3 - Build 1879 | ClamAV 0.96.5 (tBB) | SpamAssassin 3.2.3.5
AfterLogic Webmail Pro 6.3.10 | RoundCube 0.7.1
WampServer 2.0i - [ Apache 2.2.11 | MySQL 5.1.36 | PHP 5.3.0 ]

henlon

What is the difference between the two driver directories 'hmail_sql_5_2' and 'hmail_sql_db_5201'

Scarabaeus

Not positive, but after a cursive inspection I would speculate that there was a uniqueness attributed to the 5.2.1 series of builds (from the 5.2. series) of hMailServer which necessitated the different driver.
The RoundCube plug-in selects the appropriate driver for  you.
hMailServer 5.3.3 - Build 1879 | ClamAV 0.96.5 (tBB) | SpamAssassin 3.2.3.5
AfterLogic Webmail Pro 6.3.10 | RoundCube 0.7.1
WampServer 2.0i - [ Apache 2.2.11 | MySQL 5.1.36 | PHP 5.3.0 ]

henlon

Is it not critical to select the apropriate driver in config.inc.php ?

$rcmail_config['register_driver'] = 'hmail_sql_5_2';

Scarabaeus

Well, ya know... I completely missed that, thanks.
Yes it appears that one needs to configure the appropriate driver.
Please ignore this portion of my last post:
"The RoundCube plug-in selects the appropriate driver for you. " ( not true!!)
Sorry 'bout that.
After looking at the hMailServer archives, I would speculate that:
driver hmail_sql_5_1 is for hMailServer 5.1 and 5.1.x builds
driver hmail_sql_5_2 is for hMailServer 5.2 builds
driver hmail_sql_5_201 is for hMailServer 5.2.1 builds
driver hmail_sql_5_300 is for hMailServer 5.3 builds
 
Begs the question on what to use for hMailServer 5.2.2.
 
But Rosali would need to weigh in as the authoritative source.
hMailServer 5.3.3 - Build 1879 | ClamAV 0.96.5 (tBB) | SpamAssassin 3.2.3.5
AfterLogic Webmail Pro 6.3.10 | RoundCube 0.7.1
WampServer 2.0i - [ Apache 2.2.11 | MySQL 5.1.36 | PHP 5.3.0 ]

rosali

Sorry for confusion and for delay due to vacations.

I have included developement drivers by mistake.

Use hmail_sql_db_5201 for hmail 5.2.x and hmail_sql_db_5300 for latest hmail stable (5.3 Build 1617).
Regards,
Rosali