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

    I am stuck trying to install modx with a core moved outside of the web directory.
    on the first setup screen, I get the following message :

    Your MODX_CORE_PATH is invalid

    In order to install MODX Revolution, you must first locate your core directory that contains the files required to run MODX, including this setup application. The current value specified is not valid and setup cannot continue until this is resolved.
    MODX_CORE_PATH

    /var/www/vhost/mydomain.com/core/

    ERROR: Your MODX_CORE_PATH is invalid; please specify the correct path in the field above and click Submit.

    I have tried both standard and advanced installer.

    the path to the web dir : /var/www/vhost/mydomain.com/httpdocs
    accessible via http://www.mydomain.com

    I have tried an installation with modified name in core path :
    /var/www/vhost/mydomain.com/httpdocs/mycore/
    it works properly.


    when I try an installation with a moved core to :
    /var/www/vhost/mydomain.com/core/
    does work and I get the message.


    The /var/www/vhost/mydomain.com/core/ directory is given the same owner and group as the /var/www/vhost/mydomain.com/httpdocs directory.
    I have changed to 777 the /var/www/vhost/mydomain.com/httpdocs/setup/includes/config.core.php
    I have changed to 777 the /var/www/vhost/mydomain.com/core/cache directory
    I have created a blank and 777 the /var/www/vhost/mydomain.com/core/config/config.inc.php

    Basically everything explained in the docs.

    It seems to me that the problem comes from plesk configuration that prevent php using a directory outside the httpdocs directory.

    Is there anyone here who experimented installing with a moved core on a linux plesk server ?

    Thanks for help

    Philippe [ed. note: Fildefer57 last edited this post 12 years, 6 months ago.]
      • 9674
      • 170 Posts
      First you need to have access to the ssh command line terminal (using plesk linux its under virtuoso)

      If you are not using ssl access you can skip steps 6 and 7

      1. Place your core just above your httpdocs:

      /var/www/vhosts/mydomain/core


      2. CHOWN the directory to username:psaserv

      username is the username set up for the virtual host and psaserv is the Apache group set up by Plesk

      3. Set the permissions for core as normal (777)

      4. create the file in /var/www/vhosts/mydomain/conf/vhost.conf

      This is where you can put any of your own Apache config options.

      5. Add the following lines:

      <Directory /var/www/vhosts/mydomain/httpdocs/>
      php_admin_value open_basedir "/var/www/vhosts/mydomain/httpdocs:/var/www/vhosts/mydomain/core"
      </Directory>


      6. create the file in /var/www/vhosts/mydomain/conf/vhost_ssl.conf

      This is where you can put any of your own SSL Apache config options.

      7. Add the following lines:

      <Directory /var/www/vhosts/mydomain/httpsdocs/>
      php_admin_value open_basedir "/var/www/vhosts/mydomain/httpsdocs:/var/www/vhosts/mydomain/core"
      </Directory> 


      8. When you've saved that you need to instruct Plesk to update the httpd.include file

      /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=mydomain


      And I thought it worked, but not finally, it bursts....

      I am looking at some plesk9.5 expertise to solve it....

      If you have any idea, you are welcome to help.

      Have fun with modx

      Philippe [ed. note: Fildefer57 last edited this post 12 years, 6 months ago.]
        • 28120
        • 380 Posts
        Hi Philippe

        Did you ever get to the bottom of this? I've got the same problem in what sounds like the same enviroment.

        I've run a test script with an include in my core folder so I know I've definitely set up open_basedir correctly.

        But I'm getting the error

        ERROR: Your MODX_CORE_PATH is invalid; please specify the correct path in the field above and click Submit.


        I've been staring at the path for at least an hour and I'm sure it's correct smiley

        Thanks
          • 9674
          • 170 Posts
          Mark,


          First make sur you are running plesk version 10.3 minimum.

          Second make sur your php and especially ziplib library are at the latest... (since there is a bug with some version of old libraries) see post http://forums.modx.com/thread/?thread=72011&page=1


          Third make sur to use advanced installation and copy your directories in the proper place in your filetree (usually core and httpdocs are on the same level or core is upper).
          Then make sure you put the rigth access to the directories and files. To do so, under ssl, I would use something like :
          cd /var/www/vhosts/YOURdomain.tld/httpdocs && chown -R YourUser:psacln * && find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
          cd /var/www/vhosts/YOURdomain.tld/core && chown -R YourUser:psacln * && find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;



          Fouth, verify using phpinfo() that you have set a timezone like
          date.timezone = "Europe/Paris" 
          if you are using php5.3+ (my last servers are running 5.3.3 and I went into this trouble.



          And it should install properly.

          Hope this help.

          Philippe
            • 28120
            • 380 Posts
            Hi Philippe, thanks for the response.

            I don't think I'll be able to upgrade Plesk.

            My timezone = Europe/London
            php = 5.2.17
            Libzip version = 0.9.0

            My folders are definitely set up ok for open_basedir, ownership and permissions.

            I think I might park the option of moving the /core outside www under the category "not worth the bother".

            Thanks
              • 9674
              • 170 Posts
              Mark,

              One last thing i forgot

              install your domain indicating fastcgi support.

              Philippe
                • 28120
                • 380 Posts
                ok I tried fastcgi but then ran into the sessions problem http://forums.modx.com/thread/28834/revolution-install-problem so I'd climbed out of one hole, taken one step and fallen into another one.

                Not having run fastcgi before I feel nervous about going down that path because no doubt there are unknown obstacles along the way.

                In Plesk I reset it back to apache mode but was still getting the sessions problem. I even deleted the domain and re-created it but was still getting the sessions problem. Seems Plesk leaves a trace of fastcgi stuff somewhere.

                Anyhow I got it working with /core above www finally by

                1. Creating a new domain in Plesk with a different url to leave fastcgi behind
                2. Performed an advanced install with /core still in httpdocs
                3. Changed the name of /manager and /connecters
                4. Checked all was working
                5. Moved /core above httpdocs
                6. Edited the paths in the 3 instances of config.core.php
                7. Checked all was working

                Out of interest I then tried to run setup but failed on the setup path problem. This means if I want to perform a subsequent upgrade I'll need to move the /core back down to httpdocs, upgrade and then move /core back up.

                I'm wondering if MODX could change the path validation in setup to some alternative method. Clearly MODX works with /core moved in Plesk environments, it's just that pesky little path check routine in setup.