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,

    i installed modx in a folder (/dagboek) on my site NOT the root. now wayfinder generates links to ’/cgi-bin/index.php’ instead of ’/dagboek/index.php’.
    It seems in the config.inc the baseurl is set to ’cgi-bin’. But this is wrong.

    How can i prevent this?

    tnx Ralph
      • 27330
      • 884 Posts
      did u try replacing cgi-bin with dagboek in your config file?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The root paths and URLs are calculated automatically from server information (see the environment variables from the bottom of the phpinfo() view). I’ve had a server do this, and had to comment out the part in config.inc.php that determines this, and manually code the correct values.
          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
          • 24629
          • 370 Posts
          hi,

          which $var do i need to replace? there are many

          tnx
          Ralph
            • 19140
            • 6 Posts
            I have the same problem,
            I updated from 9.6.1 to 9.6.3, followed the instructions and copied the config.inc.php

            But now soms paths (generated form wayfinder) and other paths are redirected to cgi-bin

            Seems that more modx users with XS4All as server having this problem

              • 19140
              • 6 Posts
              Ok I fixed it, don’t know if it’s the right way but still...

              automatically assign base_path and base_url
              if(empty($base_path)||empty($base_url)||$_REQUEST[’base_path’]||$_REQUEST[’base_url’]) {
              $sapi= ’undefined’;
              if (!strstr($_SERVER[’PHP_SELF’], $_SERVER[’SCRIPT_NAME’]) && ($sapi= @ php_sapi_name()) == ’cgi-bin’) {
              $script_name= $_SERVER[’PHP_SELF’];
              } else {
              $script_name= $_SERVER[’SCRIPT_NAME’];
              }


              To

              automatically assign base_path and base_url
              if(empty($base_path)||empty($base_url)||$_REQUEST[’base_path’]||$_REQUEST[’base_url’]) {
              $sapi= ’undefined’;
              if (!strstr($_SERVER[’PHP_SELF’], $_SERVER[’SCRIPT_NAME’]) && ($sapi= @ php_sapi_name()) == ’cgi-bin’) {
              $script_name= $_SERVER[’http://www.name-of-website.nl’];
              } else {
              $script_name= $_SERVER[’http://www.name-of-website.nl’];
              }