We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22098
    • 218 Posts
    Hello,

    we are using a PhpAdsNew system for our banner management. This system is located in it’s own website.
    When i try to create a snippet that uses the local PHP invocation of phpadsnew banners i get an error in modX.

    This is the code in the snippet:

    <?php
    if (@include(’e:/Websites/phpAdsNew/phpadsnew.inc.php’)) {
    if (!isset($phpAds_context)) $phpAds_context = array();
    $phpAds_raw = view_raw (’1’, 2, ’_blank’, ’’, ’1’, $phpAds_context);
    echo $phpAds_raw[’html’];
    }
    ?>

    and this is the error i get:

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Unknown(e:/Websites/phpAdsNew/phpadsnew.inc.php): failed to open stream: No such file or directory
    Error type/ Nr.: Warning - 2
    File: E:\websites\modxB5\manager\includes\document.parser.class.inc.php(748) : eval()’d code
    Line: 2

    the funny thing: the path is correct! Maybe modX ads something to the include path or something?

    Olaf
      • 22098
      • 218 Posts
      nobody? shocked
        • 22303 MODX Staff
        • 10,725 Posts
        seems to be e:/websites and not e:/Websites huh
          • 22098
          • 218 Posts
          it’s a windows box, so case insensitive

          Olaf
            • 22098
            • 218 Posts
            is this a bug in 0.9.5 ? ... huh
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: olafmol at Dec 20, 2006, 08:03 AM

              is this a bug in 0.9.5 ? ... huh
              In what way? The error is occurring in the evaluation of your custom snippet. So, I’d say the error has to be with the snippet. Since you are referencing the path absolutely anyway, it wouldn’t matter if MODx did change the include path, which it does for manager requests, but not for the front-end. Sounds like a permissions issue or perhaps something else Windows-specific that I cannot imagine currently.
                • 22098
                • 218 Posts
                aaargh! i feel so stupid, i was working on 2 different servers at the same time ... lipsrsealed lipsrsealed rolleyes