Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

PHPWiki

Main.PHPWiki History

Hide minor edits - Show changes to markup

May 07, 2006, at 03:02 AM by zeppo -
Changed lines 229-230 from:

USER_AUTH_POLICY = strict (I tried stacked and first-only but bogo still seemed to work then)

to:

USER_AUTH_POLICY = strict

  1. (I tried stacked and first-only but bogo still seemed to work then)
Changed line 237 from:
  1. I just took this part out since it was in earlier
to:
  1. I just took this part out since the connection is in earlier
Changed lines 249-255 from:

@]

to:

@]

Now only I can edit it but anybody can read it.

BUT if somebody that is NOT in the MySQL database tries to log in the browser goes to a blank page. !!??!!

If I put the USER_AUTH_POLICY = first-only I would sometimes get a MySQL error about duplicate entries in PearDB. I should probably look into that.

May 07, 2006, at 02:52 AM by zeppo -
Added lines 207-248:

I changed a bunch of stuff and it kind of works:

I Wanted To Make It So Only I Could Edit The Page

Got the MySQL user check to work with these settings in the config.ini file

; allow anon users to view or edit any existing pages
ALLOW_ANON_USER = true
; allow anon users to edit pages
; ALLOW_ANON_EDIT = true
; ALLOW_ANON_EDIT = false

; True User Authentication:
; To require user passwords:
; ALLOW_ANON_USER = false
ALLOW_ANON_EDIT = false
ALLOW_BOGO_LOGIN = false
ALLOW_USER_PASSWORDS = true

USER_AUTH_ORDER = "Db"

USER_AUTH_POLICY = strict (I tried stacked and first-only but bogo still seemed to work then)

#### DATABASE CONNECTION 
; A database DSN to connect to.  Defaults to the DSN specified for the Wiki
; as a whole.

;DATABASE_DSN = "mysql://wiki:passwrd@localhost/phpwiki"
### I just took this part out since it was in earlier
;
; USER/PASSWORD queries
;
; For USER_AUTH_POLICY=strict and the Db method this is required:
DBAUTH_AUTH_USER_EXISTS = "SELECT userid FROM user WHERE userid='$userid'"
;
; Check to see if the supplied username/password pair is OK
;
; plaintext passwords:
DBAUTH_AUTH_CHECK = "SELECT IF(passwd='$password',1,0) AS ok FROM user WHERE userid='$userid'"

May 06, 2006, at 04:37 AM by zeppo -
Changed lines 128-129 from:
 lib/editpage.php:385: Notice: Use of undefined constant ENABLE_SPAMBLOCKLIST - assumed 'ENABLE_SPAMBLOCKLIST' 
to:
 lib/editpage.php:385: Notice: Use of undefined constant 
    ENABLE_SPAMBLOCKLIST - assumed 'ENABLE_SPAMBLOCKLIST' 
May 06, 2006, at 04:35 AM by zeppo -
Changed lines 154-155 from:

First, create the new database. The database name must match the name you selected earlier with the configurator (I chose phpbuilder_wiki):

to:

First, create the new database. The database name must match the name you selected earlier with the configurator (I chose phpbuilder_wiki):

May 06, 2006, at 04:03 AM by zeppo -
Added lines 201-204:

This still lets anybody edit but they at least have to login to do it.

I don't understand how to use the admin password.

May 06, 2006, at 04:02 AM by zeppo -
Changed lines 182-187 from:

; allow anon users to view or edit any existing pages
; ALLOW_ANON_USER = true
; allow anon users to edit pages
; ALLOW_ANON_EDIT = true

to:
; allow anon users to view or edit any existing pages
; ALLOW_ANON_USER = true
; allow anon users to edit pages
; ALLOW_ANON_EDIT = true

Then I UN-commented these lines (some comments left for atmosphere)

; True User Authentication:
; To require user passwords:
;   ALLOW_ANON_USER = false
   ALLOW_ANON_EDIT = false
   ALLOW_BOGO_LOGIN = false,
   ALLOW_USER_PASSWORDS = true.
; Otherwise any anon or bogo user might login without any or a wrong password.
ALLOW_USER_PASSWORDS = true
May 06, 2006, at 03:59 AM by zeppo -
Added lines 177-187:

I looked closer at the README.php.wiki.auth doc in the doc folder and found some suggestions.

So I commented these lines

; allow anon users to view or edit any existing pages
; ALLOW_ANON_USER = true
; allow anon users to edit pages
; ALLOW_ANON_EDIT = true

May 05, 2006, at 04:05 AM by zeppo -
Changed lines 88-89 from:

Thanks to an now obvious suggestions, I checked the apache log file and found

to:

Thanks to an now obvious suggestions, I checked the apache log file (/var/log/apache/...) and found

May 01, 2006, at 04:36 PM by Zeppo -
Changed lines 145-146 from:

I fount this information at http://www.phpbuilder.com/columns/ian_gilfillan20060309.php3

to:

I found this information at http://www.phpbuilder.com/columns/ian_gilfillan20060309.php3

Added lines 174-176:

I will try some stuff later.

May 01, 2006, at 03:40 AM by zeppo -
Changed lines 158-159 from:

Next, create a new user with the correct permissions (I chose a user with the same name as the database, phpbuilder_wiki, and a password of phpbuilder_wiki_password):

to:

Next, create a new user with the correct permissions (I chose a user with the same name as the database, phpbuilder_wiki, and a password of phpbuilder_wiki_password):

May 01, 2006, at 03:40 AM by zeppo -
Changed lines 15-16 from:

2. Create a user for the database with the (default) name wikiuser who has the rights to select, insert, update, delete (again using an administration account). It is done in two steps on the command line:

to:

2. Create a user for the database with the (default) name wikiuser who has the rights to select, insert, update, delete (again using an administration account). It is done in two steps on the command line:

Changed lines 23-24 from:

If you use mySQL 4.x or higher, you will also need to grant 'LOCK' permissions, so your grant statement would look like:

to:

If you use mySQL 4.x or higher, you will also need to grant 'LOCK' permissions, so your grant statement would look like:

Changed lines 30-31 from:

On most shared webservers you can't create new users. Your hoster gave you a fixed mysql-username like web55. This user has some administration privileges and can create new tables. You can use phpMyAdmin to give this user the above mentioned rights for your phpwiki database.

to:

On most shared webservers you can't create new users. Your hoster gave you a fixed mysql-username like web55. This user has some administration privileges and can create new tables. You can use phpMyAdmin to give this user the above mentioned rights for your phpwiki database.

May 01, 2006, at 03:37 AM by zeppo -
Added line 167:

I don't remember using the "configurator"

May 01, 2006, at 03:37 AM by zeppo -
Changed lines 146-148 from:

to:

On the same page I found this:

First, create the new database. The database name must match the name you selected earlier with the configurator (I chose phpbuilder_wiki):

mysqladmin -uroot_user -proot_password create phpbuilder_wiki

Next, create a new user with the correct permissions (I chose a user with the same name as the database, phpbuilder_wiki, and a password of phpbuilder_wiki_password):


mysql -uroot_user -proot_password phpbuilder_wiki

GRANT select, insert, update, delete, lock tables
 ON phpbuilder_wiki.*
 TO phpbuilder_wiki@localhost
 IDENTIFIED BY 'phpbuilder_wiki_password';

May 01, 2006, at 03:35 AM by zeppo -
Changed line 142 from:

More configuration

to:

More configuration\\

May 01, 2006, at 03:35 AM by zeppo -
Changed lines 140-145 from:

to:

I fount this information at http://www.phpbuilder.com/columns/ian_gilfillan20060309.php3

More configuration

Depending on the nature of your wiki, you may not want just anybody editing, or even viewing, your pages. You have quite a lot of flexibility with regards to this. Take a deeper look in the config.ini file. Part Three is what's relevant here. By default, most options are set to their least strict possibility. ALLOW_ANON_USER is set to true, so users don't have to log in to view the pages. Similarly, ALLOW_ANON_EDIT is also true, so anonymous users can make edits. Even if they do log in, ALLOW_BOGO_LOGIN is set to true, which means that no actual password authentication is performed. There are all sorts of more rigorous alternatives, from Apache authentication, IMAP authentication, LDAP authentication or external database authentication. Have a look at the documentation in the config file for more details.

April 30, 2006, at 04:00 AM by zeppo -
Deleted line 0:
Changed lines 3-6 from:

Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

OK, so it didn'y work at firsr but it turns out I misunderstood the SCRIPT_NAME path.

to:

I started using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

I looked like it was fine but it didn't really work at first, but it turns out I misunderstood the SCRIPT_NAME path.

April 30, 2006, at 03:58 AM by zeppo -
Changed lines 1-36 from:

Continued from MySQL entry

Thanks to an now obvious suggestions, I checked the apache log file and found

 [error] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) 

Searching the web brought two suggestions, one was change the .htaccess file which I took to mean the one in my phpwiki folder and add a line about memeory allocation.

I tried that but it didn't work

The other suggestion was to edit the php.ini file in /etc/apache/php.ini

I found the resource sections and change it from 8 MB to 12 MB

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

Then I could edit and create pages. But at the bottom of each page I got this message:

 lib/pear/Cache/Container/file.php:339: Warning: mkdir(/tmp/cache/toolbarcache/): Permission denied 

I thought I change the permissions but I must not have applied it to subfolders, because it didn't work until I allowed everyone and applied to subfolders. Then it worked.

I found info for it at this site
http://phpwiki.sourceforge.net/phpwiki/KnownBugs

Which I think I will mirror on this wiki. It also had the solution to my resource problem

to:

Trying to setup PHPWiki to use MySQL

Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

OK, so it didn'y work at firsr but it turns out I misunderstood the SCRIPT_NAME path.

Changed lines 9-26 from:

I changed back to the MySQL version and will check the database manually in a bit.

Now my only problem (that I know of), is that after each edit I get this warning at the top of the page

 lib/editpage.php:385: Notice: Use of undefined constant ENABLE_SPAMBLOCKLIST - assumed 'ENABLE_SPAMBLOCKLIST' 

The thing works but I want to fix that little bit.

OK, I got that one. It turns out there was something in config.ini for phpWiki, NOT the editpage.php file where I first looked.

Anyway in confi.ini I had to uncomment the bit about SPAMBLOCKLIST

; Check for links to blocked external tld domains in new edits, against 
; multi.surbl.org and bl.spamcop.net.
ENABLE_SPAMBLOCKLIST = true
to:

1. Create a database with the (default) name phpwiki if you do not have one already. Use the root or another privileged account.

The command line syntax is:

mysqladmin -uuser -ppassword create phpwiki

2. Create a user for the database with the (default) name wikiuser who has the rights to select, insert, update, delete (again using an administration account). It is done in two steps on the command line:

Login to the database with:

mysql -uuser -ppassword phpwiki

If you use mySQL 4.x or higher, you will also need to grant 'LOCK' permissions, so your grant statement would look like:

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

The new password2 belongs to the wikiuser, not to the root.

On most shared webservers you can't create new users. Your hoster gave you a fixed mysql-username like web55. This user has some administration privileges and can create new tables. You can use phpMyAdmin to give this user the above mentioned rights for your phpwiki database.

Added lines 32-138:

Then it calls for:

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

And I don't know where or what schemas/mysql-initialize.sql is!

I FOUND IT in the a sub folder of phpwiki


3. Create the tables inside your database (still using an administration account). A lot of typing is necessary to do this. Therefore the developers have put together those commands in one SQL-batchfile. Let MySQL execute this file with the command:

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

(When using MySQL 4.1, I noticed that half the searches stopped working. I solved this with ALTER TABLE page CHARACTER SET latin1 COLLATE latin1_general_ci;, which fixed a problem with pagename being set to 'binary' collation. --KeithTyler) We will see if this happens, for now I ignored it

4. Edit the configuration to reflect your settings.

First generate an encrypted password for the wiki administrator with the passencrypt.php page. This page came with PhpWiki and is now in the PhpWiki directory on your webserver.

Open the default configuration file config/config-dist.ini and change the following entries:

* ADMIN_USER = YourAdminName
* ADMIN_PASSWD = The encrypted administrator password
* DATABASE_TYPE = SQL
* DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, for phpwiki see step 1)
* DEFAULT_LANGUAGE = de or your most beloved language code
* SCRIPT_NAME = /the_absolute_path_from_server_root_to_your_wiki/index.php

              THIS MEANS STARTING AT THE WEB ROOT NOT HARD DRIVE ROOT DIRECTORY

Save the file with the new name config.ini in the config directory.
The entries WIKI_PGSRC, DEFAULT_WIKI_PGSRC, INLINE_IMAGES and USE_SAFE_DBSESSION are not correctly read in Version 1.3.11rc3.

5. Run your Wiki.

I had to close out the browser and restart it to find the homepage for the wiki


Now I can display everything but I cannot edit or create any page. In Mozilla it brings up a blank page and in IE I get a page cannot be displayed.

I switch to a non MySQL version (flatfile) and I have the same problems.

A permissions problem?

I don't think so as I gave others permission to write on the phpwiki folder and subfolders. Something in the code I guess.


Thanks to an now obvious suggestions, I checked the apache log file and found

 [error] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) 

Searching the web brought two suggestions, one was change the .htaccess file which I took to mean the one in my phpwiki folder and add a line about memeory allocation.

I tried that but it didn't work

The other suggestion was to edit the php.ini file in /etc/apache/php.ini

I found the resource sections and change it from 8 MB to 12 MB

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

Then I could edit and create pages. But at the bottom of each page I got this message:

 lib/pear/Cache/Container/file.php:339: Warning: mkdir(/tmp/cache/toolbarcache/): Permission denied 

I thought I change the permissions but I must not have applied it to subfolders, because it didn't work until I allowed everyone and applied to subfolders. Then it worked.

I found info for it at this site
http://phpwiki.sourceforge.net/phpwiki/KnownBugs

Which I think I will mirror on this wiki. It also had the solution to my resource problem


I changed back to the MySQL version and will check the database manually in a bit.

Now my only problem (that I know of), is that after each edit I get this warning at the top of the page

 lib/editpage.php:385: Notice: Use of undefined constant ENABLE_SPAMBLOCKLIST - assumed 'ENABLE_SPAMBLOCKLIST' 

The thing works but I want to fix that little bit.

OK, I got that one. It turns out there was something in config.ini for phpWiki, NOT the editpage.php file where I first looked.

Anyway in confi.ini I had to uncomment the bit about SPAMBLOCKLIST

; Check for links to blocked external tld domains in new edits, against 
; multi.surbl.org and bl.spamcop.net.
ENABLE_SPAMBLOCKLIST = true


April 30, 2006, at 03:44 AM by zeppo -
Changed lines 38-40 from:
to:

I changed back to the MySQL version and will check the database manually in a bit.

April 30, 2006, at 03:43 AM by zeppo -
Changed lines 45-48 from:

to:

OK, I got that one. It turns out there was something in config.ini for phpWiki, NOT the editpage.php file where I first looked.

Anyway in confi.ini I had to uncomment the bit about SPAMBLOCKLIST

; Check for links to blocked external tld domains in new edits, against 
; multi.surbl.org and bl.spamcop.net.
ENABLE_SPAMBLOCKLIST = true


I found another problem though. I seems I don't have to log in to edit. In fact I can't log in as the admin at all.

April 30, 2006, at 03:25 AM by zeppo -
Changed lines 43-46 from:

to:

The thing works but I want to fix that little bit.

April 30, 2006, at 03:25 AM by zeppo -
Changed lines 37-46 from:
to:

Now my only problem (that I know of), is that after each edit I get this warning at the top of the page

 lib/editpage.php:385: Notice: Use of undefined constant ENABLE_SPAMBLOCKLIST - assumed 'ENABLE_SPAMBLOCKLIST' 

April 30, 2006, at 03:12 AM by zeppo -
Changed line 32 from:

I found info for it at this site

to:

I found info for it at this site\\

April 30, 2006, at 03:12 AM by zeppo -
Changed lines 24-25 from:
to:

@]

Changed lines 28-29 from:

lib/pear/Cache/Container/file.php:339: Warning: mkdir(/tmp/cache/toolbarcache/): Permission denied

to:
 lib/pear/Cache/Container/file.php:339: Warning: mkdir(/tmp/cache/toolbarcache/): Permission denied 
Changed line 37 from:

@]

to:
April 30, 2006, at 03:12 AM by zeppo -
Changed line 31 from:

I found info for it at this site\\

to:

I found info for it at this site

April 30, 2006, at 03:11 AM by zeppo -
Added lines 24-35:

Then I could edit and create pages. But at the bottom of each page I got this message:

lib/pear/Cache/Container/file.php:339: Warning: mkdir(/tmp/cache/toolbarcache/): Permission denied

I thought I change the permissions but I must not have applied it to subfolders, because it didn't work until I allowed everyone and applied to subfolders. Then it worked.

I found info for it at this site
http://phpwiki.sourceforge.net/phpwiki/KnownBugs

Which I think I will mirror on this wiki. It also had the solution to my resource problem

April 30, 2006, at 12:27 AM by zeppo -
Added lines 1-24:

Continued from MySQL entry

Thanks to an now obvious suggestions, I checked the apache log file and found

 [error] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) 

Searching the web brought two suggestions, one was change the .htaccess file which I took to mean the one in my phpwiki folder and add a line about memeory allocation.

I tried that but it didn't work

The other suggestion was to edit the php.ini file in /etc/apache/php.ini

I found the resource sections and change it from 8 MB to 12 MB

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

Edit - History - Print - Recent Changes - Search
Page last modified on May 07, 2006, at 03:02 AM