We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Quote from: AndyWiltshireNZ at May 05, 2008, 10:45 PM

    No kidding, (sigh) ... I can change the include_path, but noone has actually told me WHERE I do that?!?

    As I said, I am looking for the quick easy solution, but WHERE is the include_path set?
    In manager/index.php Andy... but I thought you already modified your version of MODx to do this. This is all likely because your server admin has a php_admin_value include_path set somewhere in your Apache configuration, which prevents you from being able to set the include_path anywhere.
      • 1652
      • 9 Posts
      AndyWiltshireNZ Reply #12, 16 years ago
      I have this set in my root/etc/php.ini

      include_path = ".:"

      Should I remove that?

      And what should my index.php look like to fix this?

      // set some runtime options
      $incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
      if(version_compare(phpversion(), "4.3.0")>=0) {
      set_include_path($incPath); // this now works, above code did not?
      } else {
      ini_set("include_path", $incPath); // include path the old way
      }


      Do I need to add an absolute path in there or something? I really need to solve this asap as ModX is the best CMS I have trialed over the past two weeks for my clients, and I am ready to roll out a number of sites with it, if I can just get around this hurdle.
        • 1652
        • 9 Posts
        AndyWiltshireNZ Reply #13, 16 years ago
        All FIXED!

        I emailed my host support and they sorted it out based on the information in this thread, they changed the following in the php.ini file:

        php.ini

        ;;;;;;;;;;;;;;;;;;;;;;;;;
        ; Paths and Directories ;
        ;;;;;;;;;;;;;;;;;;;;;;;;;

        ; UNIX: "/path1:/path2"
        ;include_path = ".:/php/includes"
        ;
        ; Windows: "\path1;\path2"
        ;include_path = ".;c:\php\includes"

        include_path = ".:./includes:../includes:../../includes"

        Works good now. Thanks!
        • For clarification, the problem is not the php.ini include_path, but more likely a php_admin_value in an Apache httpd.conf file which prevents the set_include_path/ini_set from working. If we changed the name of the directory to something other than includes, this rather unorthodox solution would stop working, and I dare say it’s a bit hackish.
            • 1652
            • 9 Posts
            AndyWiltshireNZ Reply #15, 16 years ago
            Well the issue is that information doesnt seem to be readily available...