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

    We're trying to install modx at XS4ALL.nl (hoster in holland); without any luck.
    after the installation that seems to run fine we end up with a white screen.
    after some reserach we found that this has to be related to paths in the config files.These are
    /usr/local/WWW/A/.5c2/v/myaccount/htdocs/core/cache

    that is not the address we FTP to which is
    /usr/local/WWW/A/v/myaccount/htdocs/core/cache

    (note the /.5c2 in the path)
    so manualy we try to set the paths to
    /usr/local/WWW/A/v/myaccount/htdocs/core/cache

    some parts of MODX start to work but not all.

    This is what we think might be wrong
    it turns out that PHP is running in CGI mode (php5.2.17) and we suspect that's why
    dirname(__FILE__) = /usr/local/WWW/A/.5c2/v/myaccount/htdocs/core/cache
    and
    _SERVER["DOCUMENT_ROOT"] = /usr/local/WWW/A/v/myaccount/htdocs/core/cache

    so there are 2 different versions of absolute paths that somehow prevent modx from working.
    I'm not very server-savvy so this is where i'm stuck.

    any ideas?

    Rdg

    Is MODX using dirname(__FILE__) and _SERVER["DOCUMENT_ROOT"] both?



    • Different parts use different paths, so most likely, yes it does use both. The issue here is that the server environment is not reporting the paths properly. The cgi configuration should be translating the path information to report it consistently across the various server variables.
        • 24629
        • 370 Posts
        Hi OpenGeek,
        Slowly i'm puzzling this together and it has something to do with the PHP process running in the CGI-bin which in turn is a symlink. Since XS4ALL is a major hoster here i can't imagine this is a unique problem. A lot of ISP's use symlinks
        So why not change every
        dirname(__FILE__)
        into
        _ENV["DOCUMENT_ROOT"] 

        I don't know enough about Unix or PHP to judge on this or even sound intelligent, but it seems to me MODX would be a bit more stable if this could be done. I'm pretty sure i won't be able to have an ISP change they're server config and i know i won't get my client to move somewhere else. so i'm really stuck here.
        any help or insight would be appriciated
        rdg
        • MODx Cloud has different paths as well, depending on what you are trying to do. The config paths and the SERVER path to the web root is something like '/paas/c00xx/www/', while the actual usable file path is something like "/home/www". SFTP shows /home. SSH prompt shows /paas/c00xx/, while a pwd will show /home.

          As far as I can figure, a "cloud" configuration will alias the actual physical server path for certain applications, since that server path may vary depending on which server is being accessed at the moment. How efficiently a given "cloud" implementation does so is another question.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • There is no aliasing or different paths in the web server/PHP configuration on MODX Cloud. Each Cloud instance has it's own PHP-FPM pool and is not chrooted. The SFTP structure you see is because of a chroot being used to secure the account to /paas/cXXXX/ and the home directory representation in your SFTP/SSH session appears slightly different because of this. This certainly affects things run from the command line via SSH, but there will never be inconsistencies in the PHP configuration as described above.

            The paths being reported by the PHP variables should be consistent, and match in the web server configuration. That is the point being made here.