Menu

#174 v5.0.0, inc.Extension.php, invalid path to directory ext

5.0.0
closed
nobody
None
bug
2014-11-13
2014-11-05
No

I'm evaluating the branch v5.0.0. Testing the login error page I've found two errors related to the file inc.Extension. I attach a high resolution screenshot image with error details.

Personal notes:
(1) The component looks for a directory "ext" that does not exists.
(2) The path to this directory is incorrect. See the error message:

Warning: opendir(/home/seeddms5.acimud.org.es/data/seeddms.org/httdocs//ext): failed to open dir: No such file or directory in /home/seeddms5.acimud.org.es/data/seeddms.org/httdocs/inc/inc.ClassExtensionMgr.php on line 77

See there are two slash characters “//”. If I remove the rootDir ending “/” char other code fails. It is needed. By the way this easy to fix. Replace following line:

$extMgr = new SeedDMS_Extension_Mgr($db, $settings->_rootDir."/ext", $settings->_cacheDir);

With this one:

$extMgr = new SeedDMS_Extension_Mgr($db, $settings->_rootDir."ext", $settings->_cacheDir);

This fix also requires to create the directory “ext” within your directory for “httdocs”. Then you see another problem whenever includes file “extensions.php” that does not exists. Apparently the following code at inc.Extension.php:20 fails to create the configuration file:

$extconffile = $extMgr->getExtensionsConfFile();
if(!file_exists($extconffile)) {
$extMgr->createExtensionConf();
}

It is clear to me that this code needs to be tested. Analyzing the source code on the same file inc.Extensions, the foreach loop also missplaces the character “/” when building an absolute path to a directory.

1 Attachments

Discussion

  • Uwe Steinmann

    Uwe Steinmann - 2014-11-13

    All your errors are related to two problems. The quickstart archive for 5.0.0-pre1 doesn't contain the 'ext' directory and the cached extension configuration file containing the extensions' information was not created but included. The double slash in the path is just a cosmetic issue.

    I will be fixed in the nexr 5.0.0 pre release

     
  • Uwe Steinmann

    Uwe Steinmann - 2014-11-13
    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo