We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6902
    • 126 Posts
    Yep - same goes for revo (we were running an install of each on the same server for 2 different sites).
      • 11153
      • 31 Posts
      Quote from: debussy at Sep 01, 2010, 08:25 AM

      Yep - same goes for revo (we were running an install of each on the same server for 2 different sites).

      Thank you.

      Is Revo supposed to work with php-5.2.11?

        • 11153
        • 31 Posts
        Quote from: debussy at Sep 01, 2010, 08:25 AM

        Yep - same goes for revo (we were running an install of each on the same server for 2 different sites).

        What about folders which are supposed to be put under Static-content handler?

        Here I put:

        /assets
        /manager/assets
        /manager/templates
        



        What do you think?

          • 6902
          • 126 Posts
          The memory is faded (we switched back to Apache a few months ago) ... not sure you need to do anything special for the static folders though as the rule applies to all subfolders, and it only takes effect if the resources don’t exist.

          For example, let’s say you type in a url: mydomain.com/myfolder/myfile.html

          If myfolder/myfile.html exisits on the server, it just sends the file. Nothing different here.

          If it doesn’t exist (and there won’t be actual files on the server for ModX pages), then, and only then, it will take everything in the url past the domain ("myfolder/myfile.html"), parse it into the variable q, and then sends the variable (plus any other variables passed by GET) over to the main index file. At that point ModX reads the q variable to determine which "page" to build and send back).

          Clear as mud?
            • 11153
            • 31 Posts
            Quote from: debussy at Sep 08, 2010, 10:58 AM

            Clear as mud?

            Yep huh
              • 6902
              • 126 Posts
              A picture is worth a thousand words... I just made a flow chart to help.

              In the flowchart, the boxes with the bold outline are handled by the .htaccess file in Apache, or by the Behavior settings in Cherokee... they do the same thing.

              Things to keep in mind:
              * If you don’t have the .htaccess/behavior set up, the three bold square boxes turn into one I/O box: "send error to user"
              * .htaccess rules / behaviors apply to a folder and all of its contents and subfolders
              * This is a pretty simplified view of what’s going on... but should give you something to visualize
              * With the typical ModX install, index.php is the only PHP file that the user accesses directly (or indirectly through friendly URLs)
                • 11153
                • 31 Posts
                Quote from: debussy at Sep 08, 2010, 12:57 PM

                A picture is worth a thousand words...

                Indeed.

                I just made a flow chart to help.

                Thanks a lot!!! It is very helpful.

                In the flowchart, the boxes with the bold outline are handled by the .htaccess file in Apache, or by the Behavior settings in Cherokee... they do the same thing.

                Cool...we’re staying with Cherokee...


                * If you don’t have the .htaccess/behavior set up, the three bold square boxes turn into one I/O box: "send error to user"

                OK.

                * .htaccess rules / behaviors apply to a folder and all of its contents and subfolders

                This was known to me.

                * With the typical ModX install, index.php is the only PHP file that the user accesses directly (or indirectly through friendly URLs)

                That’s very helpful info. Thanks a lot, once again.. cool thumbs up
                  • 20413
                  • 2,877 Posts
                    @hawproductions | http://mrhaw.com/

                    Infograph: MODX Advanced Install in 7 steps:
                    http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                    Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                    http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                    • 38162
                    • 97 Posts
                    Quote from: debussy at Sep 08, 2010, 12:57 PM

                    A picture is worth a thousand words... I just made a flow chart to help.

                    Nice chart. Thanks for sharing. cool
                      • 11153
                      • 31 Posts
                      Hiya!

                      I’ve switched back from Webfaction to my old host because of having 500 errors.

                      Now, I installed on the new/old host, but have strange problem...Cherokee is running as proxy on my local port 62845, and now when I try to access it via gour-nitai.com, front-end generates strange URLs like:

                      http://gour-nitai.com:62845/assets/components/modxss/css/layout.css


                      Here is the relevant snippet from the config.inc.php:

                      if (!defined('MODX_HTTP_HOST')) {
                              if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                                      [b]$http_host='gour-nitai.com:62845';[/b]
                                      define('MODX_HTTP_HOST', $http_host);
                              } else {
                                      $http_host= $_SERVER['HTTP_HOST'];
                                      if ($_SERVER['SERVER_PORT'] != 80) {
                                              $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
                                      }
                                      $http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
                                      define('MODX_HTTP_HOST', $http_host);
                              }
                      }
                      


                      Now, the question is:

                      • 1) is there any workaround?
                      • 2) wouldn’t it some better solution for MODx instead of hardcoding line like $http_host=’gour-nitai.com:62845’;?

                      The problem is visible in front-end only and not in manager which works fine.

                      Is it a bug or a feature?

                      Edit:

                      I ’fixed’ the issue by leaving only:

                      $http_host= $_SERVER['HTTP_HOST'];


                      I’m not sure if I miss something obvious, but I do not see the logic of removing port from HTTP_HOST and then testing the same thing again and appending port number huh

                      Iow, I believe that
                      if ($_SERVER['SERVER_PORT'] != 80) {
                          $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
                      }
                      
                      does not make sense?