Author Topic: Error in Register plugin  (Read 3927 times)

Offline henlon

  • Jr. Member
  • **
  • Posts: 40
Error in Register plugin
« 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

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,517
    • http://SKaero.com/
Error in Register plugin
« Reply #1 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.

Offline Scarabaeus

  • Jr. Member
  • **
  • Posts: 13
Error in Register plugin
« Reply #2 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");
.
.
.
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 ]

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,517
    • http://SKaero.com/
Error in Register plugin
« Reply #3 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 /.

Offline Scarabaeus

  • Jr. Member
  • **
  • Posts: 13
Error in Register plugin
« Reply #4 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??
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 ]

Offline henlon

  • Jr. Member
  • **
  • Posts: 40
Error in Register plugin
« Reply #5 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'

Offline Scarabaeus

  • Jr. Member
  • **
  • Posts: 13
Error in Register plugin
« Reply #6 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.
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 ]

Offline henlon

  • Jr. Member
  • **
  • Posts: 40
Error in Register plugin
« Reply #7 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';

Offline Scarabaeus

  • Jr. Member
  • **
  • Posts: 13
Error in Register plugin
« Reply #8 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.
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 ]

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Error in Register plugin
« Reply #9 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).
Regards,
Rosali
__________________
MyRoundcube Project (commercial)