We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    After many install problems feedback from french users trying to install MODx on the free hosting offered by the Free DSL provider, I’ve done a little investigating (in fact, did an install myself on this provider).

    No errors@install until the installer tries to erase the install files but fails to do so, so I checked permissions. Those are 700 for folders and 644 for files. The hosting service has voluntary locked CHMOD so you can change permissions.

    The frontend is running without problems but when I try to access the manager I naturally get the following errors :

    Warning: main(quotes_stripper.inc.php): failed to open stream: No such file or directory in /var/www/free.fr/xxx/david.molliere/manager/index.php on line 81
    
    Warning: main(): Failed opening 'quotes_stripper.inc.php' for inclusion (include_path='/var/www/free.fr/xxx/david.molliere/include:.') in /var/www/free.fr/xxxx/david.molliere/manager/index.php on line 81
    
    Warning: main(config.inc.php): failed to open stream: No such file or directory in /var/www/free.fr/xxxxx/david.molliere/manager/index.php on line 120
    
    Warning: main(): Failed opening 'config.inc.php' for inclusion (include_path='/var/www/free.fr/d/8/david.molliere/include:.') in /var/www/free.fr/xxx/david.molliere/manager/index.php on line 120
    
    Warning: main(document.parser.class.inc.php): failed to open stream: No such file or directory in /var/www/free.fr/xxxx/david.molliere/manager/index.php on line 123
    
    Warning: main(): Failed opening 'document.parser.class.inc.php' for inclusion (include_path='/var/www/free.fr/xxxx/david.molliere/include:.') in /var/www/free.fr/xxxx/david.molliere/manager/index.php on line 123
    
    Fatal error: Cannot instantiate non-existent class: documentparser in /var/www/free.fr/xxxx/david.molliere/manager/index.php on line 124
    


    Before I make an announcement stating MODx can’t run on Free’s "Pages Perso" I wanted to check there was no work-around for this.

    Thanks !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 28042 ☆ A M B ☆
      • 24,524 Posts


      (I’ve never had the installer be able to delete the install folder either locally or remote)

      It looks to me like the problem is the attempt to set the include_path in manager/index.php:

      // set some runtime options
      $incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
      if(version_compare(phpversion(), "4.3.0")>=0) {
      	set_include_path($incPath); // this now works, above code did not?
      } else {
      	ini_set("include_path", $incPath); // include path the old way
      }
      

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Are they running PHP as a CGI module?
          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
          • 6726
          • 7,075 Posts
          How do I know that ? phpinfo() returns Server API : CGI, does this mean it’s the case ?

          Full phpinfos here


            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Yes. It’s not the usual Apache module. This, along with the rest of the "clues", tells me they’re running some form of suPHP. This causes a script to run as the script file’s owner, not the Apache user. This means you don’t have to have world-writeable or even world-readable files and folders, since the scripts are running as the same user as the files and folders. I would love to work that way. No more 777 permissions needed!

            However, it looks like there is a problem on re-setting the default PHP include paths.
              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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Could you put a line in the /manager/index.php file and see what it says?

              just before the code I quoted before, around line 68, put:

              echo __FILE__; exit();


              I would like to see what that thinks it’s supposed to be.
                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
                • 6726
                • 7,075 Posts
                I added the code, it returns

                /var/www/free.fr/d/8/david.molliere/manager/index.php
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  That looks correct. Hm. According to those error messages, the include_path is not getting set by the script I quoted below. As far as I know, the CGI version isn’t any different from the Apache module version in that regard. I’m not sure at this point why it’s not working. According to the phpinfo() results, the include_path being shown in those error messages is the original.

                  If you don’t mind, try this:
                  Before the code mentioned below, put this:

                  echo get_include_path() . "
                  ";

                  and after, put this:

                  echo get_include_path(); exit();

                  this way we can see if it is changing the include path or not.

                    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
                    • 4018
                    • 1,131 Posts
                    Susan,

                    Read this off of DreamHost’s website for a brief explanation about the differences between running PHP as CGI as opposed to a module. Might give you some insight into things:

                    https://panel.dreamhost.com/kbase/index.cgi?area=2933

                    These two things in particular is what made me wonder:


                    • Variables in the URL which are not regular ?foo=bar variables won’t work without using mod_rewrite (example.com/blah.php/username/info/variable).
                    • The $_SERVER[’SCRIPT_NAME’] variable will return the php.cgi binary rather than the name of your script

                    Err...that’s not cool...considering I use both of those things quite a bit in my apps!
                      Jeff Whitfield

                      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      jaredc seems to be having no problems with another host, 1&1, that uses a CGI module.

                      And the phpinfo() script here shows $_SERVER[SCRIPT_NAME] as /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