Loading...
 
Skip to main content

History: SourceForgeTikiInstall

Preview of version: 4

Initial version of the page was taken from http://hispascal.sourceforge.net/phpwiki-1.3.3/index.php/Adrian15SourceForgeTikiWikiInstallQuestion

This is an explanation on the additional steps required to install TikiWiki on a SourceForge hosted project page. Specifically this solves a problem with Tiki automatically logging you out after one or two page clicks. This is caused by the PHP session file not being created successfully.

Activate your project's MySQL database

Please Read all of the documentation provided by SourceForge for setting up your project database. It is provided here only for convenience.

  1. Go to your project admin page, select Database Admin.
  2. Click on 'create' and Sourceforge will make a DB with the same name as your project. It makes DB's about once an hour so you might have to wait before it says active. The username will also be your project name.
  3. Change the password to your liking and hit update. Once again, wait until it goes through the queue.
  4. This page will tell you the host, user, and database names

Tiki Modifications

These instructions assume that you have installed Tiki at: /home/groups/n/na/name/htdocs/tiki/

tiki/db/tiki-db.php

Edit /home/groups/n/na/name/htdocs/tiki/db/tiki-db.php, you must add the init_set line and edit the file according to the following lines:

// Database connection for the tiki system
ini_set('include_path', '.:/usr/local/lib/php');
require_once('DB.php');
$host_tiki = 'mysql.sourceforge.net';
$user_tiki = 'projectname';
$pass_tiki = 'yourpassword';
$dbs_tiki = 'projectname';

tiki/sessions/

Create the following directory for PHP session files to be stored:

mkdir /home/groups/n/na/name/htdocs/tiki/sessions

and set its permissions so that it can be written to by PHP

chmod 766 /home/groups/n/na/name/htdocs/tiki/sessions

tiki/tiki-setup.php

after the line:

$tiki_timer ->start();

add the following lines:

ini_set("memory_limit", "16M");
session_save_path("/home/groups/n/na/name/htdocs/tiki/sessions");

Alternative setup

Create database as explained above


That part of the explanation above is sourceforge specific. There is no other way to make the database.
Ofcourse, you'd need to run the sql script as described in the documentation manually using the project
shell servers.

cd /home/groups/p/pr/projectname/htdocs/tiki/db
mysql -u projectname -h mysql projectname -p < tiki.sql


You will be prompted for your password, which you will supply.

The next step is to indeed change the tiki/db/tiki-db.php file. But only alter 4 lines

// Database connection for the tiki system
require_once('DB.php');
$host_tiki = 'mysql'; // the mysql database is only accessible from sourceforge servers themselves
$user_tiki = 'projectname';
$pass_tiki = 'yourpassword';
$dbs_tiki = 'projectname';

Sessions


As an alternative setup procedure you can make the directory for sessions (it does not have to
be in the htdocs directory) and make sure that you can read/write to that directory using the
nobody user. (ie: chmod 766 /home/groups/n/na/name/offsite/sessions).

Create a .htaccess file


Add a .htaccess file to your project's htdocs directory.

cd /home/groups/n/na/name/htdocs
pico .htaccess


Add 3 lines to this file.

php_value memory_limit "16M"
php_value session.save_path "/home/groups/n/na/name/offsite/sessions"
php_value include_path ".:/usr/local/lib/php:/home/groups/n/na/name/offsite"


Make of course sure that the n, na, name and offsite directory are the ones specific to your project.

memory_limit & session.save_path
This is the alternative to the above mentioned changes to tiki/tiki-setup.php

ini_set("memory_limit", "16M");
session_save_path("/home/groups/n/na/name/htdocs/tiki/sessions");


Those lines need no longer to be inserted into tiki/tiki-setup.php.

include_path

The first 2 directory's are part of the include path that was in the sourceforge php.ini.
Everything after it are the directories (absolute) that you want to include files from.
In my example I have included an 'offsite' directory out of the htdocs directory.

Make sure that those directories are correctly chmodded

chmod 751 /home/groups/n/na/name/offsite


You can move the db directory into it for instance (not the contents, but the DIRECTORY with the contents).

Testing the altered tiki and new settings


If you are not sure, you can always create a test.php in the htdocs directory that is
chmodded with 755 and contains

<?
phpinfo();
?>


You then direct your browser to your project page (or url) with extended to it '/test.php'

For instance


Then look for the settings in the local column and compare it to the master column.



History

Information Version
drsassafras Mass search and replace 7
View
mlpvolt 6
View
Amedee Van Gasse 5
View
Smits Dimitri 4
View
Jim Kring 3
View
Marc Laporte transferred from http://alt.thetinfoilhat.com/tiki-index.php?page=SourceForgeTikiWikiInstall 2
View