Thursday, August 29, 2013

Captcha/static method issue

Hello,

My company recently moved our websites to our own dedicated server. Everything is working fine except for Captcha. I believe it's to do with the upgrade in php. I've installed GD and TTF so there's no issue there. However, the captchas are still not showing up. Checking the error log, I receive these two warnings
PHP Strict Standards: Non-static method member_level::loadAll() should not be called statically in /home/..../includes/global.php on line 1065 &
The corresponding pieces of code are
include_once(SYSTEM_PATH."/classes/tables/class.member_level.inc.php");
global $member_levels;
$member_levels = member_level::loadAll($dbconn,"","order by memberLevel desc"); &
class form extends common
{

/**
* DbConnector for using MYSQL DataBase
* @access private
* @var class MySqlConnector
*/
private $DbConnector; //MySqlConnector

/**
* formId in form table
* @access private
* @var char(17);
*/
private $formId; // char(17);

/**
* lifetime in form table
* @access private
* @var timestamp;
*/
private $lifetime; // timestamp;

/**
* captcha in form table
* @access private
* @var char(8);
*/
private $captcha; // char(8);

/**
* referer in form table
* @access private
* @var varchar(512);
*/
private $referer; // varchar(512);

/**
* Constructor of form class
* @access public
*/
public function form($DbConnector)
{
if(!($DbConnector instanceof MySqlConnector)){
throw new MyException("form::form -> DbConnector is not MySqlConnector Class.","0001");
return false;
}
$this->DbConnector = $DbConnector;

}

I'm not quite sure how to rewrite these so I have no errors and to get captcha working again. Any help or advice would be greatly appreciated!
Reply With Quote

View the original article here

No comments:

Free Facebook Likes