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

    my hosting partner doesn’t allow changing the ’include_path’ environment of PHP (PHP Version 5.2.0-8+etch9). This makes trouble with index.php of the modx manager et al.

    There are only a few places were the environment change is needed. Do I have to change the include path in the include statement now or are there any other options?

    Thanks in advance.
    Thomas
    • Which hosting provider is this. It would be very beneficial to the community at large to know so that when/if this situation is resolved others can solve it more quickly. Thanks!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 29370
        • 4 Posts
        Hello,

        at first:
        I was wrong when I said that there are only few places where the environment change is needed! It’s not practical to change all places in my opinion.

        2nd:
        The provider is a very small local one-man-show.

        3rd:
        The problem was solved since I could convince him to change the setting. But if it was a big ISP, this might not have been possible. So actually to rely on includes via environment path is a bad idea from my point of view. Especially if the software should address a broad audience.
        So here is the Apache Directive which causes the problem:
        If the main server section or any virtual host contains

        php_admin_value include_path ’<includePath>’

        it is not possible to change this setting via script during runtime with ini_set() or set_include_path().
        Additionally there are bug reports for php_admin_value listed under bugs.php.net what makes it even worse.

        4th:
        I would really suggest not rely on include_path in modx but use a own configuration variable or include the relative path directly in the include statements. Looking into the code it seems that different modx coders used different ways to include files and did not all follow a "modx coding guideline". So there are multiple argument to optimimize this. wink

        So long... I’m happy it works now
        Thomas
        • We appreciate the details you’ve provided and justifications for fixing it.

          And just FYI, this is actually a long-standing known issue with the existing manager that has not been addressed in the current trunk, but will be in the upcoming 0.9.7 release we keep talking about. I believe sottwell posted a version of an early MODx release with all the paths changed so it would work on systems like this, but the demand for supporting it as we released subsequent versions has not been enough to justify back porting the changes, considering the significant differences in the upcoming code base.