We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44297
    • 6 Posts
    Description of Problem:
    I'm trying to install MODX on a shared webspace I just rented. My provider won't grant me access to /var/tmp/ though, which produced the following error message (see below)

    Can you tell me which file I need to edit to use a different folder for temporary data?

    • MODX Version: MODX Revolution 2.2.8-pl Traditional
    • PHP Version: 5.3
    • Database (MySQL, SQL Server, etc) Version: MySQL 5.5.31
    • Additional Server Info: -
    • Installed MODX Add-ons: -
    • Error Log Contents: Warning: session_start() [function.session-start]: SAFE MODE Restriction in effect. The script whose uid is 1974558 is not allowed to access /var/tmp/ owned by uid 0 in /mnt/web9/e1/70/53732270/htdocs/setup/index.php on line 32
    • Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /mnt/web9/e1/70/53732270/htdocs/setup/index.php on line 32

    This question has been answered by multiple community members. See the first response.

    [ed. note: fogshot last edited this post 13 years, 3 months ago.]
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Create a "info.php" file with just
      <?php
      phpinfo();

      and put it in your site root. Then check to see what directory PHP is using for its session files. Scroll down to the "session" section and look for session.save_path.
        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
        • 44297
        • 6 Posts
        Quote from: sottwell at Jun 29, 2013, 12:01 AM
        Create a "info.php" file with just
        <!--?php
        phpinfo();

        and put it in your site root. Then check to see what directory PHP is using for its session files. Scroll down to the "session" section and look for session.save_path.-->
        Got it. This is the line:
        session.save_path	2;/var/tmp	2;/var/tmp
        • discuss.answer
          • 44297
          • 6 Posts
          Okay, I solved the riddle: I just changed session.save_path by adding to a php.ini file in my working directory:
          session.save_path = "/path/to/unrestricted/folder/"
          .