We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19613
    • 70 Posts
    Hi
    I think I may have placed this in the wrong listing before... I got not replies, so please accept my apologies for adding it here as well if i am wrong... or maybe nobody has the answer sad

    I recently purchased ’Frontpage Slideshow’ from frontpageslideshow.net to work with Modx (I have used it with Joomla several times but now I have switched to Modx).

    They have release a version which apparently works with any CMS.... although things are not going to plan...

    I created a snippet called ’frontpageslider’ and have called the following code in my page using the snippet:

    The original snippet code is:

    <?php
    // START of "Frontpage Slideshow" settings
    $nameOfSlideshowToDisplay = "demoslideshow"; // Enter the name of your slideshow. Slideshows are in folders inside /fpss/slideshows/.
    $URLofyoursite = "http://www.IHaveRemovedMyURL.co.uk"; // Enter your site’s URL.
    $AbsoluteServerPathofyoursite = "/user/htdocs/assets/snippets"; // Enter the root path of your site on the server.

    // do not edit below this line
    include_once($AbsoluteServerPathofyoursite."/fpss/mod_fpslideshow.php");

    // END of "Frontpage Slideshow" settings
    ?>


    However, when called the code in my test page i got the following error:

    _________________________________________________________________________

    PHP error debug
    Error: include_once() [function.include-once]: open_basedir restriction in effect. File(/user/htdocs/assets/snippets/fpss/mod_fpslideshow.php) is not within the allowed path(s): (/tmp:/home/default/IHaveRemovedMyURL.co.uk)
    Error type/ Nr.: Warning - 2
    File: /home/default/IHaveRemovedMyURL/user/htdocs/manager/includes/document.parser.class.inc.php(769) : eval()’d code
    Line: 8


    _________________________________________________________________________


    I then looked up the ’open_basedir restriction’ and tried the code below instead as advised:

    <?php
    // START of "Frontpage Slideshow" settings
    $nameOfSlideshowToDisplay = "demoslideshow"; // Enter the name of your slideshow. Slideshows are in folders inside /fpss/slideshows/.
    $URLofyoursite = "http://www.IHaveRemovedMyURL.co.uk"; // Enter your site’s URL.
    $AbsoluteServerPathofyoursite = "/user/htdocs/assets/snippets"; // Enter the root path of your site on the server.

    // do not edit below this line
    //include_once($AbsoluteServerPathofyoursite."/fpss/mod_fpslideshow.php");
    include_once($modx->config[’base_path’].’assets/snippets/fpss/mod_fpslideshow.php’);
    // END of "Frontpage Slideshow" settings
    ?>


    I now get this error:

    ----------------------------------------
    PHP error debug
    Error: require_once() [function.require-once]: open_basedir restriction in effect. File(/user/htdocs/assets/snippets/fpss/slideshows/demoslideshow/configuration.php) is not within the allowed path(s): (/tmp:/home/default/IHaveRemovedMyURL.co.uk)
    Error type/ Nr.: Warning - 2
    File: /home/default/IHaveRemovedMyURL.co.uk/user/htdocs/assets/snippets/fpss/mod_fpslideshow.php
    Line: 11
    Line 11 source: require_once($AbsoluteServerPathofyoursite.’/fpss/slideshows/’.$nameOfSlideshowToDisplay.’/configuration.php’);
    -----------------------------------------

    Can anyone help?
    I have tried moving things around but so far nothing has worked... I am experienced with CMS’s but no so much with PHP and I can’t figure out what is going wrong... thepaths are correct but it won’t work.

    Thanks smiley
      • 22446
      • 181 Posts
      Were you able to figure out how to get the Frontpage Slideshow working on your website? If you have any information that would be much appreciated.
        • 22446
        • 181 Posts
        I was able to figure out a solution. Thanks.