Pagina 3 din 3

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 18:47:04
de irbis
Ok, am facut.

Cod: Selectaţi tot

<?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
*/
if (class_exists('phpbb_captcha_factory'))
{
return;
}

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;
	}
}

?>
Autentificarea merge (a testat unul din userii care avea probleme) insa in ACP ramane eroarea cand accesez Setarile importiva botilor.

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 18:59:14
de bogdan
Asta inseamna ca nu poti schimba componenta captcha?

Ce rezultat obtii daca executi codul

Cod: Selectaţi tot

SELECT config_value FROM phpbb3_config WHERE config_name like '%captcha%'

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 19:11:12
de irbis

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 19:47:09
de bogdan
Sa inteleg ca tot nu poti schimba componenta captcha dupa ce ai facut modificarea de mai sus si dupa ce ai curatat cache-ul forumului?

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 19:51:33
de irbis
Nu :(
Tot primesc eroarea asta:

Cod: Selectaţi tot

[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 88: call_user_func(phpbb3_recaptcha::is_available) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 94: call_user_func(phpbb3_recaptcha::get_name) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 88: call_user_func(phpbb3_captcha_nogd::is_available) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 94: call_user_func(phpbb3_captcha_nogd::get_name) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 88: call_user_func(phpbb3_captcha_qa::is_available) [function.call-user-func]: First argument is expected to be a valid callback
[phpBB Debug] PHP Warning: in file /includes/captcha/captcha_factory.php on line 94: call_user_func(phpbb3_captcha_qa::get_name) [function.call-user-func]: First argument is expected to be a valid callback

Fatal error: Cannot redeclare class phpbb_captcha_gd in /home/hunter/public_html/includes/captcha/plugins/phpbb3_captcha_gd_plugin.php on line 163

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 21-Aug-2011, 20:02:58
de bogdan
Incearca metoda de mai sus si pentru fisierul /includes/captcha/plugins/phpbb3_captcha_gd_plugin.php pana reusesti sa schimbi componenta captcha in Panoul administratorului. Adauga codul

Cod: Selectaţi tot

if (class_exists('phpbb_captcha_gd'))
{
return;
}

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 23-Aug-2011, 18:24:29
de bogdan
Trebuie precizat ca problema s-a rezolvat prin eliminarea fisierelor includes/captcha/plugins/captcha_factory.php, includes/captcha/plugins/phpbb3_*.php si a directorului includes/captcha/plugins/plugins/ folder

http://tracker.phpbb.com/browse/PHPBB3- ... ment-36423

Re: probleme dupa reinstalare cu autentificarea legate de ca

Scris: 23-Aug-2011, 20:04:06
de irbis
Multumesc, Bogdan pentru ajutor in rezolvarea problemei.