Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: henlon on October 10, 2009, 04:29:07 PM

Title: Error in Register plugin
Post by: henlon on October 10, 2009, 04:29:07 PM
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
Title: Error in Register plugin
Post by: SKaero on October 11, 2009, 05:33:39 AM
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.
Title: Error in Register plugin
Post by: Scarabaeus on October 11, 2009, 09:22:34 AM
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

Code: [Select]
/** 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");
.
.
.
Title: Error in Register plugin
Post by: SKaero on October 11, 2009, 09:35:03 AM
Ah my error I was thinking of the main.inc.php not the config.inc.php. The
Code: [Select]
...plugins/\register... part should only have one /.
Title: Error in Register plugin
Post by: Scarabaeus on October 11, 2009, 09:58:01 AM
Ya... and that too!!! Most probably because of what you indicate.
The bigger question; how did that path get mangled??
Title: Error in Register plugin
Post by: henlon on October 11, 2009, 02:08:18 PM
What is the difference between the two driver directories 'hmail_sql_5_2' and 'hmail_sql_db_5201'
Title: Error in Register plugin
Post by: Scarabaeus on October 11, 2009, 04:02:26 PM
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.
Title: Error in Register plugin
Post by: henlon on October 13, 2009, 01:25:45 PM
Is it not critical to select the apropriate driver in config.inc.php ?

$rcmail_config['register_driver'] = 'hmail_sql_5_2';
Title: Error in Register plugin
Post by: Scarabaeus on October 13, 2009, 03:19:11 PM
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.
Title: Error in Register plugin
Post by: rosali on October 17, 2009, 11:11:51 AM
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).