Seite 1 von 3

Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 22:24
von Anon
Hallo!

wenn ich im ACP den Menüpunkt "spambot countermeasures" aufrufen möchte, erhalte ich folgende Fehlermeldung:

[phpBB Debug] PHP Warning: in file [ROOT]/includes/captcha/captcha_factory.php on line 83: call_user_func(phpbb_recaptcha::is_available) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file [ROOT]/includes/captcha/captcha_factory.php on line 89: call_user_func(phpbb_recaptcha::get_name) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)

An keiner anderen Stelle im ACP tritt ein solcher Fehler auf. Könnte dies darauf zurückzuführen sein, dass ich manche Verzeichnisse mit einem Verzeichnisschutz versehen habe? Wie läßt sich der Fehler beheben?

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 22:35
von Crizzo
Hi,

wie sieht denn deine /includes/captcha/captcha_factory.php aus? Welche phpBB-Version verwendest du?
Anon hat geschrieben:Könnte dies darauf zurückzuführen sein, dass ich manche Verzeichnisse mit einem Verzeichnisschutz versehen habe? Wie läßt sich der Fehler beheben?
Welche Verzeichnisse sind das?

Grüße

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 22:49
von Anon
Die phpBB 3.0.10 Version ist es.

Das adm Verzeichnis und cgi-bin Verzeichnis habe ich mit einem Schutz versehen. Testweise habe ich das rückgängig gemacht, allerdings blieb die Fehlermeldung bestehen.

Es folgt der Inhalt der captcha_factory.php Datei:

Code: Alles auswählen

<?php
/**
*
* @package VC
* @version $Id$
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* A small class for 3.0.x (no autoloader in 3.0.x)
*
* @package VC
*/
class phpbb_captcha_factory
{
	/**
	* return an instance of class $name in file $name_plugin.php
	*/
	function &get_instance($name)
	{
		global $phpbb_root_path, $phpEx;

		$name = basename($name);
		if (!class_exists($name))
		{
			include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
		}
		$instance = call_user_func(array($name, 'get_instance'));
		return $instance;
	}

	/**
	* Call the garbage collector
	*/
	function garbage_collect($name)
	{
		global $phpbb_root_path, $phpEx;

		$name = basename($name);
		if (!class_exists($name))
		{
			include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
		}
		call_user_func(array($name, 'garbage_collect'), 0);
	}

	/**
	* return a list of all discovered CAPTCHA plugins
	*/
	function get_captcha_types()
	{
		global $phpbb_root_path, $phpEx;

		$captchas = array(
			'available'		=> array(),
			'unavailable'	=> array(),
		);

		$dp = @opendir($phpbb_root_path . 'includes/captcha/plugins');

		if ($dp)
		{
			while (($file = readdir($dp)) !== false)
			{
				if ((preg_match('#_plugin\.' . $phpEx . '$#', $file)))
				{
					$name = preg_replace('#^(.*?)_plugin\.' . $phpEx . '$#', '\1', $file);
					if (!class_exists($name))
					{
						include($phpbb_root_path . "includes/captcha/plugins/$file");
					}

					if (call_user_func(array($name, 'is_available')))
					{
						$captchas['available'][$name] = call_user_func(array($name, 'get_name'));
					}
					else
					{
						$captchas['unavailable'][$name] = call_user_func(array($name, 'get_name'));
					}
				}
			}
			closedir($dp);
		}

		return $captchas;
	}
}

?>

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 22:55
von Crizzo
Die Datei ist schon mal korrekt.

Schau dir mal das Thema an: viewtopic.php?f=73&t=203668&start=40

Grüße

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:18
von Anon
Probeweise habe ich das & Zeichen in der captcha_factory.php Datei gelöscht. Das hat den Fehler nicht behoben. War es das, was Du vermutet hattest?

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:21
von Crizzo
Es sollte nicht nötig sein, dort irgendwas zu löschen.

Was für eine PHP Version nutzt du?

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:27
von Anon
PHP Version 5.2.6-1+lenny13

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:42
von Crizzo
Welche Dateien befinden sich bei dir im Ordner: \includes\captcha\plugins

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:48
von Anon
Folgende Dateien:

captcha_abstract.php
phpbb_captcha_gd_plugin.php
phpbb_captcha_gd_wave_plugin.php
phpbb_captcha_nogd_plugin.php
phpbb_captcha_qa_plugin.php
phpbb_recaptcha_plugin.php

Re: Fehlermeldung beim Aufruf von "spambot countermeasures"

Verfasst: 27.10.2012 23:49
von Crizzo
Schau mal mit phpmyadmin in deine Datenbank des Forums. Dort gibt es die Tabelle "phpbb_config" dadrin ist ein Feld "captcha_plugin" (=config_name), was hat das für einen "config_value"? Ändere diesen Wert mal auf "phpbb_captcha_nogd".

Alternative diesen SQL-Code in phpmyadmin ausführen:

Code: Alles auswählen

UPDATE phpbb_config SET config_value = 'phpbb_captcha_nogd' WHERE config_name = 'captcha_plugin';
Bei "phpbb_config" muss evtl. "phpbb_" angepasst werden, wenn du einen anderen Präfix nutzt.

Grüße