We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6038
    • 228 Posts
    I’m having trouble getting MODx to work with a particular hosting environment.
    I’ve installed successfully, created a database, made the necessary files and folders writable etc etc.
    I first noticed something was wrong as the manger doesnt come up - there is an error.

    Display errors is turned off on this host, so i searched the logs.
    Looking at the logs i see it trying to include the ’documentparser.class.php’ in the wrong location - its trying to load it from .:/usr/share/pear:/usr/share/php’ which is obviously how it is set in my hosting environment.
    So I worked out that the ini_set command in the /manager/index.php page is not being allowed, which sets the include path to the /manager/includes folder. I figured this was because ’safe mode’ was on. I decided to contact tech support at this stage.
    I asked support if ’safe_mode’ could be turned off, and of course the answer was ’no way’, but they did suggest we could get round it by changing the path to include for me, so they set it locally to be /manager/includes, but then my default site does not work because other include files such as ’assets/modules/quick_edit/output.class.inc.php’ could no longer be accessed.
    Woe is me! What to do!?

    Is there any other way to resolve the issues?
    I have tried setting the php include path via the .htaccess file but that didnt seem to work either.
    Should I go through all files using includes and manually set them? ( not a great option - i know)
    You are probably going to tell me to move hosts - which is not a great option, just paid for a whole year 2 months ago


    Environment:
    Red Hat Enterprise Linux
    Apache 2.0.52
    PHP 5.2.5 (safe_mode On)
    Mysql 4.1.22
    MODx 9.6.1

      • 7231
      • 4,205 Posts
      PHP 5.2.5 (safe_mode On)
      This is the issue. Depending on the level of restrictions, safe mode can limit where include files can be loaded from. The solution is to disable safe_mode or at remove the restriction on includes. Safe mode is so questionable that it has been removed from php in version 6.

      I had to build a site with php in safe mode and it can work, but you may have issues with file ownership since safe mode restrict you to only be able to access files that belong to your user.

      More info on safe_mode: http://www.php.net/features.safe-mode
        [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]
        • 6038
        • 228 Posts
        Quote from: dev_cw at Aug 05, 2008, 05:57 AM

        The solution is to disable safe_mode or at remove the restriction on includes.
        Safe mode is definitely the problem. I think i will have to resort to hard coding all the include links... there are a lot.  undecided
        I can’t see any other way to do it.


        I had to build a site with php in safe mode and it can work, but you may have issues with file ownership since safe mode restrict you to only be able to access files that belong to your user.
        Was this a MODx site? Yes i think i will have problems with the file uploads.

        Since ’safe_mode’ seems to be a fairly major issue for getting MODx running I am surprised I couldn’t see it mentioned anywhere on the main site or the wiki - i searched the installation and requirements pages first, where you think something like that would be... but no!
        Perhaps it would be a good idea to add this somewhere so others are aware of issues they may run into on restrictive hosting like the one i am on.
        I did find some threads here in the forum, but of the ones that were actually related to safe_mode issues, it seems none were properly resolved. Is safe_mode on MODx’s dirty little secret?

        Christian
          • 7231
          • 4,205 Posts
          The next release ,0962, has a safe mode warning if it is detected during the install. It can work without much problems depending on the level of strictness of safe_mode.

          Was this a MODx site? Yes i think i will have problems with the file uploads.

          Yes, the site I referred to is a MODx site. We had problems with file uploads and if an admin with higher permissions than me edited a file I could no longer edit it and they would need to do a chown to ghange the owner. However once these issues were identified the site was able to run fine. It is a site with over 40 content editors and they are very pleased.
            [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]
            • 6038
            • 228 Posts
            thanks for your valued input anyways.
            Out of curiosity - did you also have the ’include’ issue, and how did you get round it?