Jump to:

10844 Posts in 2515 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Can't install event_calendar & image_gallery White Page

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1714 Views
  • Funfair77
    Avatar
    Community Member
    49 Posts

    Re: Can't install event_calendar & image_gallery White Page Link to this post

    >>> if (file_exists(Director::getAbsFile("$module/_config.php")) &&

    My server provider said this:
    The script thinks that .htacce is a folder/map and he thinks that in that folder stand a file with the name _config.php .

    Do I have to change this script, why goes this only goes wrong with modules event_calendar & image_gallery en not with the Blog module?

    Thanks again for your feedback, I'm not a scripter and that makes this not easy.

       /**
        * Includes all available language files for a certain defined locale
        *
        * @param string $locale All resources from any module in locale $locale will be loaded
        */
       static function include_by_locale($locale) {
          $topLevel = scandir(Director::baseFolder());
          foreach($topLevel as $module) {
             //$topLevel is the website root, some server is configurated not to allow excess website root's parent level
             //and we don't need to check website root's parent level and websit root level for its lang folder, so we skip these 2 levels checking.
             if($module == ".." || $module == ".") continue;
             if (file_exists(Director::getAbsFile("$module/_config.php")) &&
              file_exists($file = Director::getAbsFile("$module/lang/$locale.php"))) {
                include_once($file);
             }
          }
       }

  • UncleCheese
    Avatar
    4085 Posts

    Re: Can't install event_calendar & image_gallery White Page Link to this post

    Look at this:

    $topLevel = scandir(Director::baseFolder());
    foreach($topLevel as $module) {

    What should be coming back in $topLevel are directories.. "event_calendar", "image_gallery", "cms", "sapphire", etc.. but for some reason, it's picking up on all the other stuff as well.. .htaccess, COPYING, INSTALL, etc..

    Probably want to delete all those, by the way.. except of course .htaccess.

    Looks like bad coding to me, actually. There should be an is_dir() test on all those $module results. I'm kind of puzzled, here. Why would they assume that $module is a directory?

    Maybe submit this to open.silverstripe.org as a bug? You don't need to say anything about the modules you're trying to install, because they don't support thirdparty code, but I would just let them know that i18n.php is returning those errors.

    The other thing i don't understand is why you're getting an open_basedir restriction.. to me, it seems that this path:

    /customers/cantores.be/cantores.be/httpd.www/silverstripe/.htaccess /_config.php

    Should be allowed by your open_basedir restrictions, which includes this path:

    /customers/cantores.be/cantores.be

    I'm very confused by this..

  • Funfair77
    Avatar
    Community Member
    49 Posts

    Re: Can't install event_calendar & image_gallery White Page Link to this post

    Thank you for your quick respond.
    It's very annoying that it's not working en never will in a short time.
    Do you think it will help to install 2.4?

    Marnix

    1714 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.