2009年2月21日土曜日

PhpWiki

Install Maniax2008 WIKI



PhpWiki

http://phpwiki.sourceforge.net/


アクセス http://iis.museum-in-cloud.com/phpwiki2/

http://phpwiki.sourceforge.net/

Download PhpWiki: http://sourceforge.net/projects/phpwiki/

1. 上記サイからダウンロードしたファイルを c:/apps/phpwiki に展開し
  仮想ディレクトリを追加

2. config/config-dist.ini を元に config/config.ini を作成

DATABASE_TYPE = SQL
DATABASE_PREFIX = phpwiki_
DATABASE_DSN = "mysql://user:password@localhost/databasename"  # phpwiki

DATABASE_DIRECTORY = c:/apps/phpwiki/tmp

;DEFAULT_LANGUAGE = ja

ADMIN_USER = "admin"
ADMIN_PASSWD = "admin"

* ADMIN_USER を設定していないと画面が表示されない

3.  schemas/mysql-initialize.sql によりテーブルを作成する。

   Prefix は用意されているが、機能が完全でないためこれを利用するためには
  手動でSQLを修正する必要がある。

; Currently you MUST EDIT THE SQL file too (in the schemas/
; directory because we aren't doing on the fly sql generation
; during the installation.
; Note: This prefix is NOT prepended to the default DBAUTH_
;       tables user, pref and member!
DATABASE_PREFIX = phpwiki_

 

* mysql-initialize.sql の以下のコメンtの部分は phpmyadmin 実行時にエラーと
   なるため削除

-- update to 1.3.12: (see lib/upgrade.php)
-- ALTER TABLE pref ADD passwd     CHAR(48) BINARY DEFAULT '';
-- ALTER TABLE pref ADD groupname CHAR(48) BINARY DEFAULT 'users';

-- deprecated since 1.3.12. only useful for seperate databases.
-- better use the extra pref table where such users can be created easily
-- without password.
--CREATE TABLE user (
--      userid     CHAR(48) NOT NULL,
--      passwd     CHAR(48) DEFAULT '',
--    prefs      TEXT NULL DEFAULT '',
--    groupname CHAR(48) DEFAULT 'users'
--);

-- Use the member table, if you need it for n:m user-group relations,
-- and adjust your DBAUTH_AUTH_ SQL statements.

 4.  上記の設定後、 http://iis.museum-in-cloud.com/phpwiki/ にアクセスすることで
    インストール作業が開始される。

 

 

Loading up virgin wiki

AllPages
from MIME file C:/apps/phpwiki/pgsrc/AllPages - New page - saved to database as version 1
AllPagesCreatedByMe

 ......

Complete.

Return to HomePage

lib\stdlib.php:2033 Notice[8]: iconv() [function.iconv]: Detected an illegal character in input string (...repeated 4 times)

lib\WikiPlugin.php:513 Warning[2]: include_once(lib/plugin/New.php) [function.include-once]: failed to open stream: No such file or directory

   Complete.

以上

 

  * 参考

   _PearDbPassUser::_PearDbPassUser() cannot be called statically エラー
   http://forum.mamboserver.com/showthread.php?t=16655

 

phpwiki/INSTALL

REQUIREMENTS

PhpWiki requires a web server with at least PHP version 4.0.6.
PhpWiki was tested 4.0.4pl1 and 4.0.5 also, but several bugs in these
releases make them unstable for production sites.

Due to a security issue found in all versions of PHP (including 3.x
and 4.x), all users of PHP are strongly encouraged to either upgrade
to at least PHP 4.2.2, or install a patch available for PHP 3.0.18,
4.0.6 and 4.1.0/4.1.1. Visit for downloads and
information.
Larger phpwiki installations (big pages or > 500 pages)
with PHP <= 4.3.9 suffer from a PCRE memory problem and might not
work with the 8MB default PHP memory limit.

You need the Perl regular expressions package compiled in; this is the
default for PHP, so you probably have it. If you don't you'll see an
error like "function preg_replace() not defined."

PHP must also be compiled with support for the type of database you
want to use, i.e. --with-gdbm, --with-db2, --with-db3, --with-msql,
--with-pgsql. (With PHP4 MySQL support is always enabled. With PHP5
sqlite instead). Consult the PHP installation manual for specific
installation and configure options.


Since version 1.3.0 PhpWiki uses the 'DB.php' from PEAR, a database
abstraction layer which is part of PHP. PhpWiki version 1.3.3 and later
includes the necessary PEAR libraries and will use it if your system
PEAR library can not be found. For more information about PEAR
see .
PhpWiki version 1.3.7 and later includes the ADODB libraries and will
use it for DATABASE_TYPE=ADODB. ADODB has more features, can use yet
unsupported backends out of the box, and this is where SQL development
happens. ADODB improvements are then backported to the stable PEAR
backend (which often suffers from bad upstream PEAR libraries) and to
PDO for php5.


QUICK START INSTRUCTIONS

Copy 'config/config-dist.ini' to 'config/config.ini' and edit the
settings in 'config/config.ini' to your liking.

By default PhpWiki is configured to use a dba database. If there
is no dba on your system, you will see an error like this the first
time you try to use PhpWiki:
 
    "Fatal error: Call to undefined function: dba_open() in
     phpwiki/lib/DbaDatabase.php on line 32"

To correct this you will have to check the available dba handlers
(default: db3 for Windows, otherwise gdbm), install the dba extension
or preferably an sql-compatible database such as MySQL or PostgreSQL
and make the necessary configuration changes to 'lib/config/config.ini'.


INSTRUCTIONS

Below are the instructions for the "out of the box" installation,
which uses DB files. If you are using a relational database like
MySQL, see the INSTALL file for your database in the 'doc/' directory
under the root of your PhpWiki installation.


0. INSTALLATION

Untar / gzip this file into the directory where you want it to
live. That's it.

bash$ gzip -d phpwiki-X.XX.tar.gz
bash$ tar -xvf phpwiki-X.XX.tar

In the config subdirectory copy 'config-dist.ini' to 'config.ini' and
edit the settings in 'config.ini' to your liking.


1. CONFIGURATION

The first time you run this Wiki it will load a set of basic pages
from the 'pgsrc/' directory. These should be enough to get your Wiki
started.

PhpWiki will create some DBA files in '/tmp'. They contain the pages
of the live site, archived pages, and some additional information.

If you don't want the DBA files to live in '/tmp' you must make sure
the web server can read/write to your chosen location.  It's probably
a bad idea to leave it in '/tmp', so change it in 'config/config.ini'.

WARNING: On many systems, files in '/tmp' are subject to periodic
         removal. We very strongly advise you to move the files to
         another directory.

For example, create a subdirectory called 'pages' in the 'phpwiki'
directory which was made when you untarred PhpWiki. Move the DBA files
there. The files should already have proper rights and owners, as they
were created by the web server. If not, change the permissions
accordingly so your web server can read / write the DBA files. Note
that you must be root to move files created by the web server.

Next you must ensure that the web server can access the 'pages'
directory and can create new files in it. For example, if your web
server runs as user 'nobody', give the web server access like this:

bash$ chown nobody:youraccount pages
bash$ chmod 755 pages

This is necessary so that the server can also create / set the
database lock file (PHP has a built in locking mechanism for DBA file
access).  Or if you're really lazy and don't worry much about
security:

bash$ chmod 777 pages

Note: This is insecure. The proper way is to let the directory be
      owned by the web servers GUID and give it read and write access.


2. ALLOWING EMBEDDED HTML

PhpWiki ships with this feature disabled by default. According to
CERT, malicious users can embed HTML in your pages that allow pure
evil to happen:

   

Set the ENABLE_RAW_HTML to true in ' config/config.ini' to allow
embedded HTML, but you should NEVER do this if your Wiki is publicly
accessible!

3. ETC

Installing PHP is beyond the scope of this document :-) You should
visit if you don't have PHP. Note that you
should have the web server configured to allow index.php as the root
document of a directory.

4. PATCHES

Post patches to:
   

5. BUGS

Post bugs to:
   

6. SUPPORT

For support from the PhpWiki team and user community post to:
   

You can join this list at:
   

FIN

$Id: INSTALL,v 1.26 2006/09/06 05:40:02 rurban Exp $

 

Installing phpwiki with MySQL   /doc/INSTALL.mysql

-----------------------------

A MySQL configuration is relatively hard to setup and slow, compared
to dba or better SQL databases.

This assumes that you have a working MySQL server and client setup.
Installing MySQL is beyond the scope of this document.
For more information on MySQL go to http://www.mysql.org/

1. If you do not have a suitable database already, create one (using
   the root or other privileged account you set up when MySQL was
   installed.)

    mysqladmin -uuser -ppassword create phpwiki

2. If necessary create a user for that database which has the rights
   to select, insert, update, delete (again using the root
   administration account).

    mysql -uuser -ppassword phpwiki

   A MySQL grant statement for this user would look like this:

    GRANT select, insert, update, delete, lock tables
    ON phpwiki.*
    TO wikiuser@localhost
    IDENTIFIED BY 'password';

    Upgrade note: The mysql wikiuser needs to have the LOCK TABLES
    privilege granted for all the wiki tables (PAGE, VERSION,
    LINK, RECENT and NONEMPTY). This is a relatively new privilege type.

3. Create tables inside your database (still using the root account).

    mysql -uuser -ppassword phpwiki < schemas/mysql-initialize.sql

   Note: the user specified in this command needs to have the rights
         to drop and create tables. Use the same user as in step 1.

4. Edit the DATABASE settings in config/config.ini to reflect your settings.

    a) DATABASE_TYPE should be set to 'SQL' or 'ADODB'.
    b) DATABASE_DSN should be set to something like
           'mysql://guest@unix(/var/lib/mysql/mysql.sock)/phpwiki".
       (where 'phpwiki' is the mysql database name.)
        c) Note that if you set DATABASE_PREFIX to a
           non-empty string, you will have to edit
           schemas/mysql-initialize.sql before you perform step
           three (above).  (Sorry.)  (You might also edit
           schemas/mysql-destroy.sql at the same time, so you
           don't forget.)

That's it. Phpwiki should now work.
DATABASE_DIRECTORY and DATABASE_DBA_HANDLER are ignored for mysql.

If you run into problems then check that your MySQL-user has
the necessary access rights for the phpwiki tables.

Hint for Linux-Debian users: it may be necessary to load the MySQL
module first: insert the following line in config.php before
"mysql.php" gets included:
if (!extension_loaded("mysql"))  { dl("mysql.so"); }


Upgrading a MySQL phpwiki
-------------------------

If schemas/mysql-initialize.sql has changed for your old phpwiki
installation (or changed when compared to the old "mysql.sql" file),
you can either create missing tables manually and ALTER the changed
tables manually. 
Or you can run ?action=upgrade (also from "Upgrade"
at PhpWikiAdministration), but then your database user needs the
necessary ALTER and CREATE permissions.
You might want to set DBADMIN_USER temporarly in your config.ini.
?action=upgrade also brings all changed pgsrc files up-to-date.

/Reini Urban and Arno ahollosi@mail.com

$Id: INSTALL.mysql,v 1.7 2004/12/17 09:28:40 rurban Exp $
 

1 件のコメント: