Is there any reason I would not be able to have 2 wikis in 1 directory branch by simply having 2 (renamed) index.php files that call different databases?
Example:
/phpwiki/joe.php is index.php that sets up joe's wiki
/phpwiki/mary.php is index.php that sets up mary's wiki
I imagine the biggest question about this scheme is whether phpwiki can handle URLs like http://www.domain.com/phpwiki/joe.php?Joe's%20Family where joe.php is substituting for index.php.
Thanks,
Tom Haws
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yep, you can absolutely do this. I know people who do.
I forget exactly how it goes, but there is a little fiddling with SCRIPT_NAME to set it to joe.php, and then if you get a blank page, sometimes some fiddling with the code at the end of joe.php (starts with "If your lib/main.php is not loaded..")
Dan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think it may have something to do with the PHPWIKI_DIR. I did fiddle quite a bit with that starting with what the WikiFarm page suggested.
By the way, do you know why I always get this error message the first time I visit my wiki?
lib/Request.php:299: Warning[2]: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any reason I would not be able to have 2 wikis in 1 directory branch by simply having 2 (renamed) index.php files that call different databases?
Example:
/phpwiki/joe.php is index.php that sets up joe's wiki
/phpwiki/mary.php is index.php that sets up mary's wiki
I imagine the biggest question about this scheme is whether phpwiki can handle URLs like http://www.domain.com/phpwiki/joe.php?Joe's%20Family where joe.php is substituting for index.php.
Thanks,
Tom Haws
Yep, you can absolutely do this. I know people who do.
I forget exactly how it goes, but there is a little fiddling with SCRIPT_NAME to set it to joe.php, and then if you get a blank page, sometimes some fiddling with the code at the end of joe.php (starts with "If your lib/main.php is not loaded..")
Dan
I have 106 such short starter scripts.
I don't like the php extension for these either, but it's tricky then to setup apache correctly.
Therefore I put these scripts into a seperate dir.
See http://phpwiki.org/PrettyWiki and http://phpwiki.org/WikiFarm
Thanks, Dan and Reini. I will let you know how it went.
Tom
I did it http://hawsedc.com/kato/HomePage and it worked pretty well. The only thing I didn't get was the theme. I'm using the default MacOSX. Compare http://hawsedc.com/phpwiki/
.htaccess :
<Files kato>
ForceType application/x-httpd-php
</Files>
kato:
<?php
define('WIKI_NAME', basename(FILE));
define('THEME', 'MacOSX');
define('PHPWIKI_DIR', '/home/user/public_html/hawsedc/phpwiki');
define('USE_PATH_INFO', true);
ini_set('include_path', PHPWIKI_DIR . '/');
define('DATA_PATH', PHPWIKI_DIR . '/');
define('VIRTUAL_PATH', $HTTP_SERVER_VARS['SCRIPT_NAME']);
define('DATABASE_TYPE', 'SQL');
define('DATABASE_DSN', 'mysql://user_phpwiki:password@localhost/user_phpwiki1');
include(PHPWIKI_DIR . "/index.php");
include(PHPWIKI_DIR . "/lib/main.php"); ?>
I think it may have something to do with the PHPWIKI_DIR. I did fiddle quite a bit with that starting with what the WikiFarm page suggested.
By the way, do you know why I always get this error message the first time I visit my wiki?
lib/Request.php:299: Warning[2]: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter'
I got it working and posted my solution to http://phpwiki.org/PrettyWiki
Tom