Author Topic: Failed opening Auth_SASL.php  (Read 10542 times)

Offline jeff_r

  • Newbie
  • *
  • Posts: 9
Failed opening Auth_SASL.php
« on: June 13, 2011, 02:25:30 PM »
I'm having some trouble getting 0.5.3 to work.  This is the first version I've tried, so I don't have a working Roundcubemail installation to start from.  I do have a working server with Squirrelmail.  Apologies if this has already been asked - I didn't see anything when I searched.

I am seeing the following problem when I go through the tests in the Installer:

Jun 13 12:43:23 finity roundcube: PHP Warning:  include_once() [function.include]: Failed opening 'Auth_SASL.php' for inclusion (include_path='/usr/share/roundcubemail-0.5.3/program/lib:/usr/share/roundcubemail-0.5.3/program:/usr/share/roundcubemail-0.5.3/program/include:.:/usr/share/php') in /usr/share/roundcubemail-0.5.3/installer/utils.php on line 41
Jun 13 12:43:23 finity roundcube: PHP Warning:  include_once(Auth_SASL.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/roundcubemail-0.5.3/installer/utils.php on line 41

Line 41 of utils.php is the include_one line of function __autoload($classname).

I have Auth_SASL version 1.0.4 installed in /usr/share/php/Auth, which is in the include_path.  However, there is no such file Auth_SASL.php.  There is, however Auth/SASL.php.  Is the filename/path getting messed up or am I showing my ignorance of PHP?

Offline jeff_r

  • Newbie
  • *
  • Posts: 9
Failed opening Auth_SASL.php
« Reply #1 on: June 13, 2011, 02:37:14 PM »
Aha, I think I figured it out: it looks like the autoload function of utils.php (supposedly copied from iniset.php) wasn't updated?  The preg pattern for Auth_ isn't included.  

I seem to be making progress if I update the function autoload in utils.php to:

function __autoload($classname)
{
  $filename = preg_replace(
      array('/MDB2_(.+)/', '/Mail_(.+)/', '/Net_(.+)/', '/Auth_(.+)/', '/^html_.+/', '/^utf8$/'),
      array('MDB2/\\1', 'Mail/\\1', 'Net/\\1', 'Auth/\\1', 'html', 'utf8.class'),
      $classname
  );
  include_once $filename. '.php';
}

Offline mawcomw

  • Newbie
  • *
  • Posts: 4
Failed opening Auth_SASL.php
« Reply #2 on: June 13, 2011, 05:57:30 PM »
From what i found is that the roundcube is looking for "Auth_SASL.php" file, but it does not exist!!!
The correct file should be "SASL.php" in the pear path, that in my system is "/usr/share/pear/Auth/SASL.php".

Anyone figure out how to change this in the roundcube/xinstallerx/Utils.php???

Offline jeff_r

  • Newbie
  • *
  • Posts: 9
Failed opening Auth_SASL.php
« Reply #3 on: June 14, 2011, 10:47:58 AM »
The following patch fixes the problem in utils.php where it incorrectly looks for Auth_SASL.php.

Offline mawcomw

  • Newbie
  • *
  • Posts: 4
Failed opening Auth_SASL.php
« Reply #4 on: June 14, 2011, 12:06:09 PM »
Really thanks!

I didn't knew that the roundcube has it's own pear packages.
Is there any way to use the system pear packages?

Offline mawcomw

  • Newbie
  • *
  • Posts: 4
Failed opening Auth_SASL.php
« Reply #5 on: June 14, 2011, 08:33:08 PM »
Really thanks! Worked!

I was unaware that Roundcube is shipped with it's own pear package.
Although this, is it possible to use the system pear package?

Thanks in advance.

Online SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Failed opening Auth_SASL.php
« Reply #6 on: June 15, 2011, 05:24:13 AM »
When downloading RoundCube from Downloading Roundcube webmail if you chose the "GPL (dependent)" version it won't include any of the libraries and will use the systems.