Menu

SAFE MODE installation problems.

Help
veggio
2005-05-27
2012-10-11
  • veggio

    veggio - 2005-05-27

    I am trying to install phpwiki on a shared host with SAFE MODE in effect. I have uploaded the files, edited config.ini and run the mysql init script.

    However, when loading the frontpage I get the following error:

    Fatal Error:
    lib/FileFinder.php:191: Error: /tmp/cache: file not found

    lib/IniConfig.php:462: Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 32287 is not allowed to access /tmp owned by uid 0

    lib/IniConfig.php:464: Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 32287 is not allowed to access /tmp owned by uid 0

    lib/FileFinder.php:191: Error: /tmp/cache: file not found

    I am using ADODB for database backend access, have changed all references to /tmp to /home/username/tmp (assuming that access to /tmp is limited in safe mode).

    I think I have switched of any and all options regarding file system access.

    Does anyone know why I am getting this error?

    Thanks for all help!

     
    • Dan F

      Dan F - 2005-05-27

      I don't know exactly why. However, this grep would indicate it has to do with caching plugins:

      % grep -r /tmp/cache *
      config/config.ini:; PLUGIN_CACHED_CACHE_DIR = /tmp/cache
      config/config-default.ini:; PLUGIN_CACHED_CACHE_DIR = /tmp/cache
      config/config-dist.ini:;PLUGIN_CACHED_CACHE_DIR = /tmp/cache
      config/config.ini~:; PLUGIN_CACHED_CACHE_DIR = /tmp/cache
      configurator.php:new _define_commented_optional('PLUGIN_CACHED_CACHE_DIR', "/tmp/cache", "
      lib/IniConfig.php: if (!FindFile('/tmp/cache', 1)) { // [29ms]
      lib/IniConfig.php: mkdir('/tmp/cache', 777);
      lib/IniConfig.php: define('PLUGIN_CACHED_CACHE_DIR', FindFile('/tmp/cache',false,1));
      lib/plugin/VisualWiki.php:// are actually being created now in '/tmp/cache'.)
      log:are actually being created now in '/tmp/cache'.)

       
      • veggio

        veggio - 2005-05-30

        Thanks!

        I have changed all references to /tmp/cache in config.ini to a path /home/user... that I think should be accessible also in safe mode. But that doesn't seem to affect the error message, as /tmp seem to be hardcoded quite a few places...

        My ISP just recently switched to safe mode, and I don't know how many things that have been 'broken' by this yet.

        I would think that PHP safe mode is a quite common configuration on shared hosts. Have anyone else experience with setting up phpwiki in this scenario?

        BTW, There are some comments on /tmp access and safe mode at http://www.php.net/features.safe-mode

         
        • Reini Urban

          Reini Urban - 2005-05-31

          /tmp is no hardcoded anywhere anymore.

          I just could make a common /tmp root for the various
          needed tmp (cache) and db subdirs.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.