DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

install:mac_alt

Mac Install Page

This is my attempt to install DokuWiki on my PowerBook running Mac OS X 10.3 (aka Panther). This is after installing DokuWiki on my PC at work (running Windows 2000 Service Pack 4) without too much hassle.

N.B. eventually this page will describe in steps how to get DokuWiki running on Mac OS (first Panther, then Tiger).

Thanks for your efforts to create Install Guide Mac users! Your Session Problems are most likely caused by a problem with your PHP setup. PHP (running as user www) isn't allowed to write to the /tmp directory for storing session data. You should investigate in this direction.
In short, /tmp turned out to be an actual directory, whereas it should have been a symbolic link to /private/tmp. See more details in the Solution section below.

OS, versions etc

Mac OS X, 10.3.9 according to 'About this Mac'. Xcode tools installed.

Fink

  Package manager version: 0.23.6
  Distribution version: 0.7.1.rsync

No fink package available.

DarwinPorts

  how do I find out version I have?

There is an old (2004 December) port available, but it would not install for me (if I remember correctly, it was a dependency error relating to Apache). More likely the problem is that DarwinPorts installed DokuWiki in /opt/local/share/dokuwiki/ rather than ~/Sites/dokuwiki/

Installation

The only option left was to try to do a manual install. Before commencing, I did a search and Google found me an interesting O'Reilly MacDevCenter article that complimented the information for *nix installs at install.

mv dokuwiki-2005-02-18.tgz ~/Sites/
cd ~/Sites/
tar zxf dokuwiki-2005-02-18.tgz 
mv dokuwiki-2005-02-18 dokuwiki
touch dokuwiki/changes.log

The next thing to do according to the install guide, was to set the appropriate permissions. Only problem, for which user? After a lot of hair pulling and searching (I am not naturally gifted at this sort of thing), I decided that apache was running as user www (confirmed by the Activity Monitor app). This can be seen and confirmed this way:

ps auwx | grep httpd

After setting the permissions (chown), had to start (or restart Apache).

cd dokuwiki
sudo chown www changes.log data media attic conf/users.auth
sudo apachectl restart

:!: missed important step (described in O'Reilly article) - need to edit a couple of things in apache.conf so that php module is active (if this has not already been done). Thanks to TaoofMac for reminding me :) 2005-05-22 cmc :!:

Then I tested the wiki by going to the start page - http://localhost/~tcstcs/dokuwiki. My wiki was working, but I had a couple of problems…

Problems

The wiki is up and running (I can add pages), but I'm getting session_start() errors and cannot figure out what to do to solve them.

Localhost

n.b. IP6 is deactivated, so localhost = 127.0.0.1

Warning: session_start(): open(/tmp/sess_be09512603dfe7ca99751ee0ded7fbad, O_RDWR) failed: Permission denied (13) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: Cannot modify header information - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/doku.php on line 123
The current page is writable by you
Warning: Unknown(): open(/tmp/sess_f5feaec436d37b396bd600503f680e2d, O_RDWR) failed: Permission denied (13) in Unknown on line 0

The test page http://localhost/~tcstcs/dokuwiki/doku.php?do=check gives me (in addition to errors above) the following info

DokuWiki version: Release 2005-02-18a
PHP version 4.3.10
Changelog is writable
Datadir is writable
Attic is writable
Mediadir is writable
conf/users.auth is writable
mb_string extension is available and will be used
Your current permission for this page is 8
The current page is writable by the webserver
The current page is writable by you

(Windows) machine on network

A quick test from a (Windows) machine on my network, the results:

Warning: session_start(): open(/tmp/sess_a4d6ea4f18d3079a7302394b29ee7e87, O_RDWR) failed: Permission denied (13) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/inc/common.php on line 22
Warning: Cannot modify header information - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki/inc/common.php:22) in /Users/tcstcs/Sites/dokuwiki/doku.php on line 76
Warning: Unknown(): open(/tmp/sess_a4d6ea4f18d3079a7302394b29ee7e87, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

(Temporary) Solution

Although I hadn't modified dokuwiki.php, I opened it with vim and removed (and then put back) the final ?> as suggested in the FAQ.

No change.

The I opened /Users/tcstcs/Sites/dokuwiki/inc/common.php:22 in SubEthaEdit (first program I could thing of that numbers lines) and made a backup.

  1. tried deleting blank line after line 22 (and 123); did not work.
  2. commented out session_name() and session_start() (using the standard //). It would appear that this change effected the removal of session handling in DokuWiki – thus “fixing” the problem seen by the user.
  //session_name("DokuWiki");
  //session_start(); 

This worked! No more errors, but the text formatting toolbar now works differently:

Formatting

And as the dialog box warns, the formatted text (H1, H2, link etc) is appended to the end of the document.

Latest DokuWiki

Problem

All of the rest of this document concerns version 2005-02-18; however, a couple of days ago Andi released 2005-05-07. I upgraded my DokuWiki on my Windows machine without any hassle; however on my Macintosh, the problems are not only still there, but have gotten worse - my 'solution' of commenting out session_start() no longer works. Compare these two images - the first is DokuWiki version 2005-02-18, the second is DokuWiki version 2005-05-07. Both are 'out of the box' configurations, i.e., without making any changes to configuration files.

DokuWiki 2005-02-18 DokuWiki 2005-02-18

DokuWiki 2005-05-07 DokuWiki 2005-05-07

Then problem is now in another file (init.php), but still seems to be session_start(). For the sake of being complete, here are all the error messages:

Warning: session_start(): open(/tmp/sess_4c83bc578f25063c404105c399312d9a, O_RDWR) failed: Permission denied (13) in /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php on line 38
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php:38) in /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php on line 38
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php:38) in /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/init.php:38) in /Users/tcstcs/Sites/dokuwiki-2005-05-07/inc/actions.php on line 71
   ---text: this topic does not exist etc---
Warning: Unknown(): open(/tmp/sess_4c83bc578f25063c404105c399312d9a, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

Solution

To get proper formatting, you have to set the basedir parameter in conf/dokuwiki.php. In my case, I had to set it to

  $conf['basedir']     = '/Users/tcstcs/Sites/dokuwiki-2005-05-07/';

Then everything works beautifully.

To remove the session errors, follow the steps given in http://forums.macosxhints.com/showpost.php?p=119064&postcount=6 - basically you need to remove /tmp and then create a symbolic link of /tmp to /private/tmp.

It appears that this problem, if it occurs, is a corruption of the MacOS X environment - that is, it should not happen. But if it does… now you know how to fix it.
looking over at the macosxhints forum, this does happen from time to time for some unknown reason.
I never had any problems with my installation, though my installation of PHP was likely an upgraded version pulled from Fink; /tmp remains as it always was, and Apple's Apache 1.3.x installation has been configured to use the upgraded PHP. I'm utilizing Mac OS X 10.2.
installed fink as well, but not sure if I upgraded php through it at some stage - really don't remember. Mac OS X 10.3.
However, I'm soon to get a Mac Mini with 10.4; we'll see what happens then. My G3 iBook is currently dysfunctional (sigh). I'll put up my experiences with Mac OS X 10.4 here when I install DokuWiki on it.

Note that the DokuWiki does not seem to work in Internet Explorer for Macintosh 5.x (does anyone still use that?); the formatting toolbar does not work properly in Safari (text is appended to the end of the document instead of being inserted); Firefox has no problems whatsoever :)

IE for Macintosh is no longer supported by Microsoft, and hasn't been for some time. I use Camino (also from the Mozilla project, like Firefox) and haven't had any troubles.
install/mac_alt.txt · Last modified: 2012-02-09 14:24 by 195.205.15.3