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

    I just installed MODx on a server owned by a provider I haven’t worked with before. And I stumbled upon a problem I hadn’t encountered before...

    The MODx installation went smoothly, but when I login at www.mysite.com/manager/, I’m redirected to www.mysite.com/cgi-bin/manager/. This causes a 404 not found error. When I go back to http://www.mysite.com/manager/, I’m logged in and everything appears fine. But when logging out, I’m once again redirected to www.mysite.com/cgi-bin/manager/. undecided
    This probably has to do with the fact that php is running as FastCGI on this server? I’m not much of a back-end person, so I’m sort of stuck at the moment. I hope someone here can help me solve this problem. All help is very much appreciated!

    Here some info on the (server) configuration:

    MODx version: 0.9.6.1p2
    My browser: Firefox 2.0
    PHP Version 4.4.4
    System FreeBSD
    SERVER_SOFTWARE Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7d
    Server API CGI/FastCGI
    MySQL version 4.1.20

    Update:
    [(site_url)] returns www.mysite.com/cgi-bin/. So internal links in my site don’t work either, as "cgi-bin" is inside them everywhere. Is there any way I can remove the cgi-bin part?
      Thanks for MODx - I love it!
      • 17802
      • 190 Posts
      Thanks for your reply!
      I made the info.php file like you said and it’s perfectly accessible via mysite.com/info.php
      Also, there’s an old php site still running alongside the MODx install and there are no problems there. It seems to be exclusively a MODx problem - it looks like MODx thinks the site is located at www.mysite.com/cgi-bin sad
      Any more ideas? Please..?
        Thanks for MODx - I love it!
        • 17802
        • 190 Posts
        It looks like I just solved the problem laugh
        But I’m not sure my solution is very good.

        I changed these lines in config.inc.php:
        if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
                $script_name= $_SERVER['PHP_SELF'];
            } else {
                $script_name= $_SERVER['SCRIPT_NAME'];
            }


        to:

            if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
                $script_name= $_SERVER['PHP_SELF'];
            } else {
                $script_name= $_SERVER['PHP_SELF'];
            }


        I think $_SERVER[’SCRIPT_NAME’]; doesn’t work very well with my server. But is this the right thing to do?
          Thanks for MODx - I love it!
          • 26968
          • 25 Posts
          Did this solution work? I am having the same issue.
          Please advise,
          thanks.
            • 7231
            • 4,205 Posts
            From my experience this normally means that you have TomCat (jsp for apache) active on your server. Tomcat has a name space reserved for manager that redirects to the cgi-bin. Drop a support call to your host to find out.

            Disclaimer: I could be wrong shocked
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 26968
              • 25 Posts
              laugh Maaike’s solution worked like a charm. THANK YOU! much appreciated.