Installing bitweaver with safe_mode active

Created by: xing, Last modification: 15 Jul 2008 (16:11 UTC) by laetzer

Safe mode

Safe_mode and open_basedir are security features of PHP (but removed in version 6). Some hosts enable them on their servers, some don't. Web applications written in PHP tend to have problems with safe_mode and/or open_basedir. It's important to note, that there is a difference between the restrictions safe_mode and open_basedir. Your server might have safe_mode switched off but open_basedir switched on.

Bitweaver has not been extensively tested on servers with safe_mode/open_basedir switched on. However, bitweaver does have code in place to run even with safe_mode/open_basedir enabled. If you experience problems, please try the following tips one by one. Please report how it worked out for you (comment on this page, in bitweaver's forum, in ConnectingToIrc).

Session path

Try setting an appropriate session.save_path by editing the file bit_setup_inc. Set it to a path where bitweaver has write access, for instance bitweaver's temp directory with 777 perms.


// change the following line:
// ini_set('session.save_path', 'C:\somewhere\I\can\write');

// to:

Temp path

To install bitweaver, you need a file called config_inc.php in /kernel/. Usually it can be 0 byte (empty), it only has to be writeable by bitweaver (e.g., perm 0777). To resolve safe_mode issues, open that file and paste only the following, and with the same path of the session.save_path setting above. (This file will get overwritten in the process of installing bitweaver. Error messages might pop up. Wait until after the installation is finished to change the path one last time.)


// This allows you to set a custom path to your PHP tmp directory - used for ADODB
// caching if active, and other stuff This is usually only needed in very
// restrictive hosting environments.
$gTempDir '/yourbitweaver/temp/';

More info

SME server 7.1

On SME server 7.1 with safe_mode enabled, if you are getting a blank page, try the approach below. Then restart apache (/etc/init.d/httpd restart).


// in your /etc/httpd/conf/httpd.conf look for
php_admin_value open_basedir /home/bitweaver/html

// and add :/tmp to the end of the line so it looks like
php_admin_value open_basedir /home/bitweaver/html:/tmp

  1. Tikiwiki's page on the subject:
  2. ...


works so far

by , 10 Jun 2008 (14:52 UTC)
With those two tweaks concerning the writable temp dir, I got bitweaver running on a server with safe_mode OFF and open_basedir ON. No problems so far.
  Page 1 of 1  1