[pmwiki-users] more on fedora 5 / pmwikiserv problems

Patrick R. Michaud pmichaud at pobox.com
Fri Nov 24 15:14:38 CST 2006


On Fri, Nov 17, 2006 at 11:47:12PM +0000, Loic Domaigne wrote:
> Hi Everybody, 
> 
> > > So the solution to this problem is to change pmwikiserv to use "php-cgi" 
> > > on Linux distributions that have it, and run "php" otherwise.  With that 
> > > done, it works quite well on Fedora Core 5.
> 
> I Finally found out what Lindsay meant. Enclosed the patch to apply on FC5/6 to
> get the pmwikiserv.php running:
> 
> --- tmp/pmwikiserv.php.bak      2006-11-16 22:40:23.000000000 +0100
> +++ tmp/pmwikiserv.php  2006-11-16 23:12:18.000000000 +0100
> @@ -171,7 +171,7 @@
>    global $PmWikiDir;
>    $proc_talk = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"));
>    putenv("SCRIPT_FILENAME=pmwiki.php");
> -  $process = proc_open("php pmwiki.php", $proc_talk, $pipes);
> +  $process = proc_open("php-cgi pmwiki.php", $proc_talk, $pipes);
>    stream_set_blocking($pipes[1], 0);
>    $len = getenv("CONTENT_LENGTH");
>    while ($len - strlen($post) > 0) {
> 
> [ 
> you basically just have to change the line:
> $process = proc_open("php pmwiki.php", $proc_talk, $pipes);
> to: 
> $process = proc_open("php-cgi pmwiki.php", $proc_talk, $pipes);
> ] 
> 
> Hope this will help newbie readers like me who are interested to get PmWiki
> running (but not necessarily understand what's running under the hood). 

Wow, many thanks!  A patch like this is always nice to get.
I'll update the pmwikiserv.php script appropriately, so that others
won't run into similar issues.

Thanks again!

Pm




More information about the pmwiki-users mailing list