I am trying to set up a phpwiki on my sourceforge server. I followed the instrucitons in the index.php file for the VIRTUAL_HOST, but no luck.
I have the following:
1. Directory 'scripts' in /home/groups/j/jo/jospt (same level as the htdocs directory).
2. 'phpwiki' directory in the 'scripts' directory with all the phpwiki stuff
3. directory 'wikidocs' under htdocs with a file called .htaccess. htaccess contains the three lines:
Action x-phpwiki-page /home/groups/j/jo/jospt/scripts/phpwiki/index.php
SetHandler x-phpwiki-page
DirectoryIndex /home/groups/j/jospt/scripts/phpwiki/index.php
4. USE_PATH_INFO set to true in index.php
5. VIRTUAL_PATH set to /wikidocs in index.php
What eles do I need to change in the index.php file to make this work? Also, what permissions does the .htaccess file need?
Thanks!
Mark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To use that method, the index.php has to be within your htdoc tree. (I.e. where you have the absolute filesystem path '/home/groups/..../index.php', you need instead a "absolute URL" (absolute in the sense that it starts at the web-server root.).
Actually, I now recommend the use of an alternate method for this. (The index.php file still has to be in your htdoc tree.)
Thanks for the information! I followed the instructions to the letter (except my phpwiki directory is in phpwiki, not phpwiki-1.3), but I get the following error:
Fatal error: Failed opening required 'lib/prepend.php' (include_path='/htdocs/phpwiki:/usr/lib/php4') in /home/groups/j/jo/jospt/htdocs/phpwiki/index.php on line 70
Also, where is the PEAR.php file on the sf server? I did a locate PEAR.php and nothing was found, but there is a /usr/lib/php4/PEAR directory, which is empty. However, if I access the original index.php from the phpwiki directory, the phpwiki starts running.
My final question - what are the db files in /tmp called? I need to copy them to my local space as per the INSTALL document, but it does not say what they are called, and there are a lot of files in /temp!
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In your include_path, instead of '/htdocs/phpwiki' you need the full path to where you installed phpwiki (in your case: '/home/groups/j/jo/jospt/htdocs/phpwiki'.)
The sourceforge project web server is a fancy
load-sharing setup. There are actually several machines involved.
The machine you log in to (shell.sf.net) is not the machine on which httpd runs. Your home directory (/home/groups/j/jo/jospt/) is mounted in the same place on all the machines, but:
The shell machines don't have PEAR code installed. It's only on the webservers. (I think it's in /usr/lib/php4 there, but now I can't remember. It doesn't matter, in any case, as recent version of PhpWiki can find the PEAR code without the help of the include_path.)
Also, each of the webservers has it's own local /tmp directory. This means that putting any state files (either the database, or php session state files) in /tmp just doesn't work.
I tried to use the WikiTrek theme by uncommenting the $theme="WikiTrek", but I got the "Unable to open file" error message that it could not read the 'themeinfo.php' file. There is a note in the index.php file that implies themes are not working yet. Is this true, or do I need to do something else?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, that's a bug you've found. I've just checked a fix into CVS, so either get the latest version of index.php from CVS, or, in your index.php (or rather your htdocs/wiki). Find the three lines which look like:
if (file_exists("themes/$theme/themeinfo.php")) {
include "themes/$theme/themeinfo.php";
} else {
I am trying to set up a phpwiki on my sourceforge server. I followed the instrucitons in the index.php file for the VIRTUAL_HOST, but no luck.
I have the following:
1. Directory 'scripts' in /home/groups/j/jo/jospt (same level as the htdocs directory).
2. 'phpwiki' directory in the 'scripts' directory with all the phpwiki stuff
3. directory 'wikidocs' under htdocs with a file called .htaccess. htaccess contains the three lines:
Action x-phpwiki-page /home/groups/j/jo/jospt/scripts/phpwiki/index.php
SetHandler x-phpwiki-page
DirectoryIndex /home/groups/j/jospt/scripts/phpwiki/index.php
4. USE_PATH_INFO set to true in index.php
5. VIRTUAL_PATH set to /wikidocs in index.php
What eles do I need to change in the index.php file to make this work? Also, what permissions does the .htaccess file need?
Thanks!
Mark
To use that method, the index.php has to be within your htdoc tree. (I.e. where you have the absolute filesystem path '/home/groups/..../index.php', you need instead a "absolute URL" (absolute in the sense that it starts at the web-server root.).
Actually, I now recommend the use of an alternate method for this. (The index.php file still has to be in your htdoc tree.)
See http://phpwiki.sf.net/phpwiki/PrettyWiki
Also:
http://phpwiki.sf.net/phpwiki/PageNamesInPathInfo
and
http://phpwiki.sf.net/phpwiki/FrequentlyAskedQuestions
Thanks for the information! I followed the instructions to the letter (except my phpwiki directory is in phpwiki, not phpwiki-1.3), but I get the following error:
Fatal error: Failed opening required 'lib/prepend.php' (include_path='/htdocs/phpwiki:/usr/lib/php4') in /home/groups/j/jo/jospt/htdocs/phpwiki/index.php on line 70
Also, where is the PEAR.php file on the sf server? I did a locate PEAR.php and nothing was found, but there is a /usr/lib/php4/PEAR directory, which is empty. However, if I access the original index.php from the phpwiki directory, the phpwiki starts running.
My final question - what are the db files in /tmp called? I need to copy them to my local space as per the INSTALL document, but it does not say what they are called, and there are a lot of files in /temp!
Thanks!
In your include_path, instead of '/htdocs/phpwiki' you need the full path to where you installed phpwiki (in your case: '/home/groups/j/jo/jospt/htdocs/phpwiki'.)
The sourceforge project web server is a fancy
load-sharing setup. There are actually several machines involved.
The machine you log in to (shell.sf.net) is not the machine on which httpd runs. Your home directory (/home/groups/j/jo/jospt/) is mounted in the same place on all the machines, but:
The shell machines don't have PEAR code installed. It's only on the webservers. (I think it's in /usr/lib/php4 there, but now I can't remember. It doesn't matter, in any case, as recent version of PhpWiki can find the PEAR code without the help of the include_path.)
Also, each of the webservers has it's own local /tmp directory. This means that putting any state files (either the database, or php session state files) in /tmp just doesn't work.
I have just add a page to the PhpWiki wiki with some notes on this. See:
http://phpwiki.sf.net/phpwiki/PhpWikiOnSourceForge
Thanks - it works!
I tried to use the WikiTrek theme by uncommenting the $theme="WikiTrek", but I got the "Unable to open file" error message that it could not read the 'themeinfo.php' file. There is a note in the index.php file that implies themes are not working yet. Is this true, or do I need to do something else?
Yes, that's a bug you've found. I've just checked a fix into CVS, so either get the latest version of index.php from CVS, or, in your index.php (or rather your htdocs/wiki). Find the three lines which look like:
if (file_exists("themes/$theme/themeinfo.php")) {
include "themes/$theme/themeinfo.php";
} else {
and replace them with the single line:
if (!@include("themes/$theme/themeinfo.php")) {
One problem remains:
open page http://phpwiki.sourceforge.net/phpwiki/PrettyWiki/no/page
Click on edit, tada an apache 404 error message.
(/ is converted to %2F why)
You have to edit stdlib.php:
--- stdlib.php Sat Jan 26 20:01:21 2002
+++ stdlib.php.old Sat Jan 26 19:53:20 2002
@@ -49,7 +49,7 @@
if (USE_PATH_INFO) {
$url = $get_abs_url ? SERVER_URL . VIRTUAL_PATH . "/" : "";
- $url .= preg_replace("'%2F'i","/",rawurlencode($pagename));
+ $url .= rawurlencode($pagename);
if ($args)
$url .= "?$args";
}