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

    I am currently installing a website (again) for my client. The webhoster is XS4ALL.

    But after the installation i have the following problem: everypage is redirected to www.websitename.com/cgi-bin/here-is-the-page.php so every page has cgi-bin as map in the url but i didn`t installed it in that map.
    So every page has cgi-bin in the name and that results into a Page Does Not Exist error undecided

    If i login into my FTP account i see the followng maps : cgi-bin, htdocs(map where i installed modx) , incoming, logs



    Yesterday i have been on the phone for 2hours with the webhost provider and they say that it schould be the problem of the CMS system. undecided



    Please help me this is a urgent problem because we have had much visitors that where upset that our website has problems...





    Greetz Monsterboy
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do you have an .htaccess in your site root with some rewrite rules?
        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
        • 20177
        • 24 Posts
        Do you have an .htaccess in your site root with some rewrite rules?

        No i dont have any .htaccess file in the site root or in the map htdocs.


        It also seems that the host has much maps in the cgi-bin map with maps i mean some scripts and php5. ( If i delete this directory it says that the directory is not empty. and after a few minutes the server has installed the cgi-bin map again, beacause without this map the website just dont work sad )



        Greetz monsterboy


        PS : thank you for the fast answer...
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Can you get into the manager of the site OK?
            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
            • 20177
            • 24 Posts
            Can you get into the manager of the site OK?

            Yes i can get into the manager but after i click on the button : Login ,it redirects me to www.mysite.com/cgi-bin/manager
            If i then just delete the name cgi-bin in the url i just can go further with the modx manager.

            If i logout i have the same problem the url just put that cgi-bin map in the url...

            I also seems that any texteditor (for example xinha) just doesnt work... i need to program almost anything in html...



            I tryed the turning off of the friendly urls but that doesn`t make a difference...


            I Just to checked if this happens too with this version : 0.9.6 and there is no difference



            Greetz monsterboy


            PS : thanks for the fast reply
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I’m afraid I have no further ideas. It sounds to me like an Apache configuration issue, but I’m not that much of a server admin type to have more than a vague idea. Hopefully someone else will have more thoughts on this.

                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
                • 20177
                • 24 Posts
                Is it maybe possible to delete that cgi-bin in the url with a .htaccess file ?

                Sorry im not really into htaccess...



                Greetz monsterboy
                  • 20177
                  • 24 Posts
                  Thanks for the fast answer... yes sorry i am dutch so i meant directory grin


                  I installed the oldest back-up that i had (24 December 2007) it is version 0.9.6 and it seems that this works fine, the only problem is that other subdirectories will automatically put the directory cgi-bin in the URL. So this is probably the reason that my text editor in modx doesn`t work... Xinha is in a subdirectory of modx but the website automatic try`s too put the /cgi-bin/ in the url so modx can`t find the Xinha module.

                  But if i freshly install modx version 0.9.6 or 0.9.6.1 i will get everytime that strange problem with cgi-bin. (on every page link on the website)



                  I have included the phpinfo in this reply... here you can download the phpinfo file : http://www.mediafire.com/?1itzmmteymb



                  Greetz monsterboy
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    According to a user comment on the php site
                    NOTE: Running PHP as a CGI program will change the value of $_SERVER[’SCRIPT_NAME’]. When running via the (normal) mod_PHP mechanism, it will be set to the name of (actually, path to) the PHP script that’s running. When running via CGI, it will instead point to the path of the CGI binary.
                    The config.inc.php file uses this value to set the base path and base url which MODx uses when generating URLs...
                        if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
                            $script_name= $_SERVER['PHP_SELF'];
                        } else {
                            $script_name= $_SERVER['SCRIPT_NAME'];
                        }
                    

                    Apparently this is not always true; I’m running CGI and my phpinfo() from the Manager/Reports/System Info shows that the $_SERVER[’SCRIPT_NAME’] is
                    /manager/index.php
                    Yours, however, is doing this:
                    /cgi-bin/php
                    Your script_name is being reported the same.

                    This is where the trouble is coming from.

                    You could try replacing with this:
                        if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
                            $script_name= $PHP_SELF;
                        } else {
                            $script_name= $PHP_SELF ;
                        }
                    

                    My phpinfo does not report that value (not a part of the $_SERVER array), but yours does. Your $_SERVER[’PHP_SELF’] also reports the correct value (/phpinfo.php).
                      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
                      • 20177
                      • 24 Posts
                      Reply on Sottwell
                      I try`d it and i had no result the website was just the same...



                      The `old` back-up that i meantioned in a earlier topic just has the same problems...


                      Thank you guys for your great support and your fast reply`s


                      Greetz monsterboy

                      This discussion is closed to further replies. Keep calm and carry on.