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

    I’m stumped. I’ve searched the forums and can’t find anything.

    I’m trying to include a file in a new Module:
    include("news/index.php?show=list");

    I keep getting the following errors:
    ----
    Warning: include(news/index.php?show=list) [function.include]: failed to open stream: No such file or directory in /home/XXXX/public_html/np/manager/processors/execute_module.processor.php(95) : eval()’d code on line 1

    Warning: include(news/index.php?show=list) [function.include]: failed to open stream: No such file or directory in /home/XXXX/public_html/np/manager/processors/execute_module.processor.php(95) : eval()’d code on line 1

    Warning: include() [function.include]: Failed opening ’news/index.php?show=list’ for inclusion (include_path=’/home/XXXX/public_html/np/manager/includes/’) in /home/XXXX/public_html/np/manager/processors/execute_module.processor.php(95) : eval()’d code on line 1
    ----

    The file does exist and I can execute it directly via URL. eg.:
    http://www.XXXX.XXX/np/manager/includes/news/index.php?show=list

    I found some info regarding snippets and include() but nothing for this. If it helps, my host just changed over to PHP5 from 4.

    Any help would be great!
    Glenn


    MODx ver: 0.9.5
    PHP: 5.2.3
      • 22640
      • 44 Posts
      Quote from: ganeshXL at Jul 31, 2007, 02:24 PM

      try using an absolute instead of a relative path

      Unfortunately that doesn’t work either. I get:

      Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/XXXX/public_html/np/manager/processors/execute_module.processor.php(95) : eval()’d code on line 1
        • 26435
        • 1,193 Posts
        You could try adding:
        ini_set('allow_url_fopen', 'on');
        

        right after your opening <?php tag.

        -sD-
        Dr. Scotty Delicious, Scientist.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages