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,

    I am having trouble trying to do an advance install of modx 2 tried 2.1.3,2.1.5 and 2.2 with same problem.

    I have a core that is moved outside of the webroot and install fails at :

    https://gaokerena.com/setup/index.php?action=install

    with the message :

    The install failed because MODX could not unpack the /var/www/vhosts/gaokerena.com/core/packages/core.transport.zip package. Make sure that the /var/www/vhosts/gaokerena.com/core/packages/core.transport.zip file exists and is writable, and that you have made the /var/www/vhosts/gaokerena.com/core/packages/ directory writable.


    To make sure where it comes from I wrote a small php file :

    https://gaokerena.com/setup/test.php

    <?php
    
    $file_name ="/var/www/vhosts/gaokerena.com/core/packages/core.transport.zip";
    
    echo 'Current script owner: ' . get_current_user();
    
    echo "
    ";
    
    // Check for safe mode
    if( ini_get('safe_mode') ){
        // Do it the safe mode way
    	echo " safe mode is active
    ";
    }else{
        // Do it the regular way
    	echo "safe mode is off
    ";
    }
    
    echo "file " . $file_name;
      echo "
    ";
       if (! $f = fopen($file_name, "r") ) 
    {
      echo "
    open file impossible
    ";
      } 
      else 
      {
      echo "
    " . dirname($file_name) . " open
    ";
        fclose($f);
      }
       
    if (!is_writable(dirname($file_name))) 
    {
    echo "
    ";
    echo " Directory  write impossible";
    }
    else 
    {
    echo "
    ";
    echo " Directory  write possible";
    }
    if (!is_writable($file_name)) 
    {
    echo "
    ";
    echo " file write impossible";
    }
    else 
    {
    echo "
    ";
    echo " file write possible";
    }
      echo "
    ";
    echo "<p>
    end of check-up program</p>";
      echo "
    ";
    
    ?>


    With this result :

    Current script owner: arrive
    safe mode is off
    file /var/www/vhosts/gaokerena.com/core/packages/core.transport.zip
    
    /var/www/vhosts/gaokerena.com/core/packages open
    
    Directory write possible
    file write possible
    end of check-up program


    Every thing seems fine, but I can't install modx !

    Is anyone having any idea about what is going on here ?

    Thanks for help

    Philippe

    Server config linux/plesk 9.5 php running as fastCGI, session bug patched, safe mode bug patched, and the server is currently running other modx severall standard modx install witout any trouble.

    This question has been answered by multiple community members. See the first response.

    [ed. note: Fildefer57 last edited this post 12 years, 5 months ago.]
      • 9674
      • 170 Posts
      forgot to put notify on reply to make sure to follow up....

      • If you have the core outside your web root, why are you looking for it inside it? What is your MODX_CORE_PATH which you set for setup (which you have to do since you moved the core)?
          • 9674
          • 170 Posts
          Hello Jason !

          The instalation directories are in the following tree :
          /var/www/vhosts/gaokerena.com

          In the there are httpdocs, a httpsdocs, a core directories.

          The core path set up at the install is :
          /var/www/vhosts/gaokerena.com/core/

          because :

          I have taken the zip install package from the modx DL to the server,

          unzip it

          Copied the setup directory to the httpsdocs

          Copied the content of the installation core directory[ to my core directory

          then changed permission on core/cache to 777
          then changed permission on core/export to 777
          then changed permission on core/packages to 777
          then touch core/config/config.inc.php and changed permission to 777
          then changed permission on httpdocs/setup/includes/config.core.php to 777

          Am I wrong somewhere ?

          In fact I did not moved the core after installation, but before as I understand from http://rtfm.modx.com/display/revolution20/Advanced+Installation


          The phpinfo :

          https://gaokerena.com/setup/info.php [ed. note: Fildefer57 last edited this post 12 years, 5 months ago.]
            • 9674
            • 170 Posts
            Moving on my tests...

            I Have been able to install the standard version with a core moved out of the web tree.
            But when I try to connect to the manager, I get a Site temporarily unavailable!

            And in the error log :

            [Sat Nov 26 20:02:41 2011] [warn] mod_fcgid: stderr: PHP Warning: include_once(/var/www/vhosts/gaokerena.com/httpsdocs/core/model/modx/modx.class.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/vhosts/gaokerena.com/httpsdocs/manager/index.php on line 50
            [Sat Nov 26 20:02:41 2011] [warn] mod_fcgid: stderr: PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/vhosts/gaokerena.com/httpsdocs/core/model/modx/modx.class.php' for inclusion (include_path='.:/') in /var/www/vhosts/gaokerena.com/httpsdocs/manager/index.php on line 50
            [Sat Nov 26 20:02:41 2011] [warn] mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/gaokerena.com/httpsdocs/core/error/unavailable.include.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /var/www/vhosts/gaokerena.com/httpsdocs/manager/index.php on line 51
            [Sat Nov 26 20:02:41 2011] [warn] mod_fcgid: stderr: PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/vhosts/gaokerena.com/httpsdocs/core/error/unavailable.include.php' for inclusion (include_path='.:/') in /var/www/vhosts/gaokerena.com/httpsdocs/manager/index.php on line 51 


            It seems, modx can't find the includes !

            Any guess, any help ?

            Philippe
              • 9674
              • 170 Posts
              I have not been able to install properly, absolutly no way to do it either advanced or standard with a outside webroot core directory.

              Finally I installed a standard, with core in the webroot.

              After that, I moved the core outside, fixed the directory permissions (cache packages, export, components) fixed the database, fixed the path in the config.inc.php and config.core.php files as in : http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server


              I had to put all path to the core hardcoded in the config files, it did not worked with dirname(dirname(__FILE__)) . '/core/' and dirname(__FILE__) . '/core/' paths.
              This is worrying for future updates, I would like to fix it properly.


              Cleared the cache.

              Then it worked.

              Hope this will help all those who have the same trouble.

              Philippe
              • First of all, the Traditional package is not intended for configurations with any of the locations moved. This is why it comes with all the files already extracted into the "traditional" locations and the relative paths coded into the config.core.php files.

                The Advanced should work, if you move the core before setup, and configure the core location during the first step of setup (make sure your setup/includes/config.core.php is writable by PHP or manually change it there). Other than that, you just have to make sure the PHP process can write to ALL the locations where the files should be located (it writes the core location into the config.core.php files wherever they are extracted by the advanced setup process).
                  • 9674
                  • 170 Posts
                  Jason,

                  This is why I am worried, I have not been able to install the advanced that should to the job properly.

                  At the setup time I repeatedly get the message that says :

                  The install failed because MODX could not unpack the /var/www/vhosts/gaokerena.com/core/packages/core.transport.zip package. Make sure that the /var/www/vhosts/gaokerena.com/core/packages/core.transport.zip file exists and is writable, and that you have made the /var/www/vhosts/gaokerena.com/core/packages/ directory writable.

                  All directories are writable to php, it seems to be a problem with the command used in the setup script to unpack the core (don't ask me why, I did not wrote it ...).

                  What is the command/library used in the install advanced setup shells ?

                  It can be that my server is not configured with the good library, I really don't know !


                  You can see on the info page https://gaokerena.com/setup/info.php , the zip is :

                  Zip enabled
                  Extension Version $Id: php_zip.c,v 1.1.2.43 2008/01/18 00:51:38 pajoye Exp $
                  Zip version 1.8.11
                  Libzip version 0.8.0-compatible

                  Thanks for your help
                  • discuss.answer
                    • 9674
                    • 170 Posts
                    Hi ALL !

                    Found the solution !

                    There is a bug in the ziplib 0.8.0 library that prevent from opening archive with a large number of files.

                    Solution : update php to 5.2.17
                    this will update ziplib to 0.9.0 compatible

                    And solve the problem ....

                    Hope this will help

                    Philippe
                      • 36575
                      • 104 Posts
                      OK, so just to recap, if you are on shared hosting and cannot upgrade your version of php, the solution here is to install 2.1.3 ?

                      thanks