群組最近更新列表 - 搜尋:

PmWiki

pmwiki.org

獨立運行

注意:

此頁面為翻譯英文頁面?而來,任何的改動及所需要的檔案,請參考英文頁面。

此recipe所解決的問題

我可以在"獨立運行"的模式運行PmWiki,運行於我的個人電腦,而不需要網路主機,例如Apache嗎?

解決辦法

PmWiki 是一個架構於PHP 的網路應用程式。所以,後端必須要有可以支援PHP,並且可以進行類似網路主機行為的環境。而此必須的環境可以由以下的檔案提供一個特定的、最簡易的環境,使得無法使用網路主機的電腦(例如桌上型電腦或個人電腦),也可以運行PmWiki。

server.zip - 完整的壓縮檔,適用於Microsoft Windows環境,內含有PHP的運行環境。
pmwikiserv.php - 只含有PHP語言的PHP程式(適用於 Unix 或者其它可以運行PHP的系統)

另一個檔案的來源,是使用本站的唯讀映像站(read-only mirror)您可以使用 wget,並且進行特殊的網址轉換(special link conversions):

  • 您可以使用此所提供的 bash 腳本(script):doHoove.txt
  • 若您所使用的不是預設的風格(style),則在style sheet的連結轉換上,必須要更新為您所使用的style sheet。

安裝方法

Microsoft Windows

  1. 下載頁面中下載一份PmWiki的壓縮檔,並將它解壓至系統中。
  2. 下載此附件檔案server.zip並將其解壓縮。然後將其資料夾的內容複製到一個名為server的資料夾,而server資料夾必須位於PmWiki的主資料夾下。此附件中含有PHP的運行環境,所以您不需要另外安裝PHP。
  3. 開啟server資料中的pmwikiserv.bat檔案
  4. 您將可以看見windows的命令列程式,並可在其最後一行看見started...ready for requests,這表示簡易的server正在運行了,請不要關閉這個命令程式。
  5. 開啟您的瀏灠器,並連結到http://localhost/wiki -- 您應該可以見到PmWiki的預設首頁了。

結束了!可以開始您的使用了!再次的開啟,只要重覆3.~5.即可。

Apple OS X

請參見Wiki on a stick?

Unix systems

方法如上文所述

  • 此recipe最後測試的PmWiki 版本:2.1.13
  • 此recipe對於PmWiki版本的需求:任何版本

參見

  • Wiki on a stick?中,有關於將不同的網路主機程式(web server)PmWiki安裝於行動儲存裝置(USB stick)的方法。

討論

以下的內容描述了一些使用者在安裝上所遇到的問題以及解決的辦法,我們並不強制閱讀以下的內容───若是您遇到安裝上的問題,可以參考下面的內容,或者在英文的頁面中提出新的問題。

I ran into 2 problems the first time I tried this:

  1. Clicking on the batch file opens a command window. The first few times I did this the window filled with text that scrolled so fast I couldn't see what it was saying. Turning off Skype stopped that problem. As described below, this is a conflict on port 80, and you can disable port 80 use in Skype prefs.
  2. Once the darn thing was running, there was no way to stop it. The command window was completely unresponsive and I didn't really want to kill PHP.EXE in the Task Manager. Type Control-C in the command window to bring up a "Terminate batch job?" dialog. Neil Herber?

While using this recipe I got two problems:

  • Only images situated in the '/pub' directory or subdirectory can be displayed.
    Now fixed as of 9-Oct-2005. --Pm?
  • We are back with the terrific problem of accented letters, either in image name or in directory names, which prevent images to be displayed, when these images are in the http://localhost domain. Same images, but called via File:///C:/Doc... are perfectly visible, as they are on any outside site. This occurs with IE and Firefox, while with different error messages.
    PRZ?

Please, be aware that the standalone version is not totally functional because of the server configuration. You may run into problems arising from directory names not being recognized by the server. Also, setting WikiFarms doesn't seem to work properly with the minimal server configuration. Be sure to check the readme included with it.

I was able to get this to work, but I had to add the following lines to pmwikiserv.php. As explained on the comments on the PHP site, this tweak is a way of getting around the "unable to bind, address already in use" error (that I was getting). I'm not sure exactly what negative effects this tweak might have; if anybody has an idea about that, please fill us in. These lines go right BEFORE the line, socket_bind($AcceptSocket, $ip, $port);

# reuse socket tweak
  if (!socket_set_option($AcceptSocket, SOL_SOCKET, SO_REUSEADDR, 1)) {
    echo socket_strerror(socket_last_error($sock));
    exit;
  }

I also might add, I was able to get this thing to work on my flash drive, no problem. Just follow the instructions above, and you've got a localized portable PmWiki installation. Just keep in mind that, from computer to computer, there are probably different settings related to servers, and it's possible you could have problems on one machine and not another. - JonHaupt?

I am having trouble running on a shared drive at work. PM Wiki ran fine in standalone mode on my hard drive. I exited it by killing the dos window. I copied the installation over to a shared drive and found it working when called from a DOS command prompt. When I click the batch file \server\pmwikiserv.bat from Windows, (with no servers running) I get a lovely flash on the screen but no wiki. Methinks (wethinks?) the path is not setting correctly in Windows. Help? OBTW. My mappage of the drive will be different than my co-worker's, the path can not be hard-coded. - CongaMike

Update: I fixed (kludged) the problem by hard coding the path statement in the pmwikiserver batch file - CongaMike

I thought the action above corrected the problem and I no longer needed the local copy. Windows would not let me delete it due to file sharing issues. I exited PM Wiki, deleted the local copy, and tried to run the shared copy. Voila! All is well! Sorry to trouble you. - CongaMike

Sometimes the server won't work, because the port 80 that the server uses is already taken. A common reason for this is if you have Skype running. To fix this problem go to Skype Tools > Options > Connection and uncheck "use port 80 and 443 as alternatives for incomming connections". You might have to restart Skype in order for the changes to take effect.
The same problem occurs also with other servers used, like the ones below. Anno?

Win32 bundle; Applied the recipe successfully, however the PHP http server sometimes seems unable to cope with a large number of simultaneous requests (e.g. GUIButtons images). stderr says socket_write() unable to write to socket [0]: <localized WinSock message here: closed by remote host>. - RasqualTwilight

  • Another possible combination is to set up PmWiki to work under another free and more complete web server called Xampp-Lite. The whole pack needs only about 90 MB and includes many advantages. Visit http://www.apachefriends.org for more details.
  • Yet another WAMP (Windows, Apache, MySQL and PHP) package has been spotted at http://www.en.wampserver.com/index.php . This one is licensed under the GNU GPL (like PmWiki). According to the site "WAMP5 installs automatically Apache 1.3.31 ,PHP5, MySQL database ,PHPmyadmin and SQLitemanager on your computer. It's principal aim is to allow you to easily discover the new version oh PHP .."
  • And yet another is The Uniform Server ( http://www.uniformserver.com/ ) The Uniform Server is a free and open source WAMP package that allows you to run a server on any MS Windows OS based computer. It is small and mobile to download or move around and can also be used or setup as a production/live server.
    • It works great with subfolders (e.g. pmwiki in pmwiki folder)
    • micro-how-to
      • choose UPX zip, uncompress it
      • uncompress your pmwiki in the www folder Z:/path_to_/UniformServer/www/pmwiki/pmwiki.php
      • modify your local/config.php
$ScriptUrl = 'http://localhost/pmwiki/pmwiki.php';
$PubDirUrl = 'http://localhost/pmwiki/pub';
  • run Z:/path_to_/UniformServer/Server_Start.bat
  • et voila !
  • What about using Nanoweb, an HTTP server written in PHP?
    • It works just fine in a SUSE box, just a little slow with the graphics. CarlosAB? April 16, 2007, at 06:44 AM

I tried using server.zip on my Windows XP machine. I unzipped PmWiki to a folder on my local machine. I unzipped server.zip into that folder. I executed pmwikiserv.bat. When I tried to use my web browser to http://localhost/wiki, I got a page stating "No input file specified." I can't find mention of this problem in the PmWiki. Can anyone help me out on this? ---Michael Galvin Oops. I just figured out what I did wrong. I created a directory on my machine, I called PmWiki. I unzipped pmwiki-latest to that directory, into a directory under "PmWiki" called "pmwiki-1.2.27". I then unzipped server.zip into "PmWiki". What I should have done was to unzip it into pmwiki-1.2.27. Now all is well and works fine. I'll leave this comment in this page in case someone else makes the same darned mistake. ---Michael Galvin

:Jolly good thing... I just did the same thing, and I would have given up and gone to bed if I hadn't seen your post! Perhaps some rewording of the instruxions would be in order!!!


I'm trying to run pmwikiserv.php and got message like this:

PHP Warning:  dl() [<a href='function.dl'>function.dl</a>]: 
Unable to load dynamic library 
'/usr/local/Php-5.2.0/lib/php/extensions/no-debug-non-zts-20060613/php_sockets.dll' 
- /usr/local/Php-5.2.0/lib/php/extensions/no-debug-non-zts-20060613/php_sockets.dll: 
cannot open shared object file: 
No such file or directory in /root/spot/webserver/htdocs/tww/server/pmwikiserv.php on line 76
PHP Fatal error:  
Call to undefined function socket_create() in /root/spot/webserver/htdocs/tww/server/pmwikiserv.php on line 77

What does it mean?

---Ierikka

I've been trying to use pmwikiserv.php, and have got it running, but it doesn't seem to work properly:

  • It seems to be splitting the header/body sections incorrectly, resulting in the beginning of the header section being missing, and raw html appearing instead of the wiki.
  • I think the regular expression used in preg_split on line 136 of pmwikiserv.php isn't quite right, but I don't really know enough about php to fix it.

Any thoughts?

Many thanks, Rowland (2007-10-01)



If you wish to distribute your copy of PmWiki on a CD, you can give http://www.server2go-web.de/ a try hua?

Another option is Web Server for CD running on Win, Mac OS X and Linux - currently the only option for creating single CD that will work on 3 platforms. Derek?


I'm trying to set up and test this on a Windows XP PC with PHP, apache, etc, but for use on a PC without them. I get

PHP Warning:  Unknown(): (null): Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP    compiled with module API=20020429, debug=0, thread-safety=1
These options need to match in Unknown on line 0

Any suggestions for how to get it to work would be appreciated.

tia, Simon

Hello, I'm using XP Home OS. I'm trying to use the stand alone version and i followed instructions. I unzpped pmwiki to pmwiki-2.1.27, then unzipped server to pmwiki-2.1.27 then executed the batch file named "pmwikeserv" and when it runs I get a command promt that says "c:\pmwiki-2.1.27\server>echo off" then a few seconds later i get a pop up box that says;

"Unknown(): (null): Unable to initialize module Module compiled with module API=20060613, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1"

Can someone please explain to me how to fix this? Sterling

Answer:

I had this same problem when I tried to run a standalone wiki on a machine that already had one set up on an Apache web server. To fix this, I moved the PHP file (originally in Program Files) and its contents to the desktop. Now the standalone one works, but the one running off Apache doesn't. I'm not sure if they can both run at the same, but this issue definitely has something to do with PHP and not the wiki itself.


Configuration note

It's worth to know that some configuration can be put in a separate configuration file pmwikiserv.conf you should create in the server/ directory. This allows e.g. for easy configuration of the port on which the server will reside. An example from my disk is:

 
<?php
$Listen = "127.0.0.1:7777";
print "Listening port used: $Listen\n";

which allows me to browse local PmWiki at http://localhost:7777/wiki when port 80 is occupied by a firewall configuration page. MateuszCzaplinski?


Contributors

編輯 - 版本 - 列印 - 群組最近更新列表 - 搜尋
頁面最後更新於 2011/09/11, 02:48