Loading...
 
Skip to main content

History: SourceForgeTikiInstall

Preview of version: 5

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:

Copy to clipboard
// 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:

Copy to clipboard
mkdir /home/groups/n/na/name/htdocs/tiki/sessions


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

Copy to clipboard
chmod 766 /home/groups/n/na/name/htdocs/tiki/sessions

tiki/tiki-setup.php

after the line:

Copy to clipboard
$tiki_timer ->start();


add the following lines:

Copy to clipboard
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.

Copy to clipboard
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

Copy to clipboard
// 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.

Copy to clipboard
cd /home/groups/n/na/name/htdocs pico .htaccess


Add 3 lines to this file.

Copy to clipboard
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

Copy to clipboard
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

Copy to clipboard
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

Copy to clipboard
<? 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.


Adding the SourceForge.net logo to your site

As you may know or not know, all SF hosted projects are required to have the SF logo somewhere on their website. For more information about why you have to do this, see this page: http://sourceforge.net/docman/display_doc.php?docid=790&group_id=1Question

You can show the SF logo on every page if you make a new module, based on the logo module (the one that shows the Kon-Tiki raft). First make a copy of templates/modules/mod-logo.tpl:

Copy to clipboard
cd /home/groups/n/na/name/htdocs/tiki/templates/modules cp mod-logo.tpl mod-sourceforge_logo.tpl


Modify the file mod-sourceforge_logo.tpl like this:

Copy to clipboard
{tikimodule title="{tr}projectname is hosted by{/tr}" name="sourceforge_logo"} <div align="center"> <a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=PROJECT_NUMBER&amp;type=2" align="center" alt="SourceForge.net Logo" width="125" height="37" border="0"/> </a> </div> {/tikimodule}


This will give you a white middle-sized SF logo. Read http://sourceforge.net/docman/display_doc.php?docid=790&group_id=1#addhtmlQuestion to find out gow to get on of the other logos.
You can find your project number on the admin page of your SF project, read http://sourceforge.net/docman/display_doc.php?docid=790&group_id=1#locategroupidQuestion for more info.

Now go to the Modules page in the Admin menu of your website, and add the new sourceforge_logo somewhere in the left or right 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