[pmwiki-users] CAPTCHA looping after upgrade?

Petko Yotov 5ko at 5ko.fr
Mon Sep 16 13:44:34 PDT 2019


There are 4 different Captcha recipes in the cookbook by different 
people.

This is about the https://www.pmwiki.org/wiki/Cookbook/Captcha recipe.

It probably never worked from a sidebar by itself, you may have had a 
side-effect from another local customization, because at the moment the 
sidebar is processed, the HTTP headers, hence the session cookie, have 
already been sent to the browser, and any changes to the headers will 
have no effect.

It appears to work when you manually start a session in config.php, 
before the include_once line:

   @session_start();
   include_once("$FarmD/cookbook/captcha.php");

This hopefully (re)starts a session and sends the session ID to the 
browser. When later the captcha recipe modifies the session data, the 
browser already has the session ID created earlier.

Please report if it works with your PmWiki/PHP version (it appears to 
work with PmWiki 2.2.118 and PHP 7.4).

Petko

On 16/09/2019 21:13, Russ wrote:
> I recently upgraded an older version of PmWiki running on PHP5.4 to 
> PHP7.x.
> 
> The CAPTCHA recipe is used in two places - on a contact page (required
> to display contact info), and on individual members' pages (also to
> display contact info, but in a sidebar instead of the main page).
> 
> The contact page works fine, but when the CAPTCHA is used in the
> sidebar it no longer displays the contact info as it did before the
> upgrade; now, a entering a correct CAPTCHA just displays another
> CAPTCHA.
> 
> Suggestions on why it no longer works within a sidebar/header/footer?



More information about the pmwiki-users mailing list