همون طور که می دانید، تولید کنندگان ویبولتین، نسخه 4.2 این محصول را با php 5.3 و 5.4 سازگار کرده اند و گفته اند که این محصول با php های بالاتر سازگاری کاملی ندارد و ارور هایی را تجربه خواهید کرد که یا باید تغییری در فایل ها ایجاد کنید و یا نسخه پی اچ پی را کاهش دهید
از آن جایی که ممکن است تغییر هاست برای همه میسر نباشد، لذا باید دست به تغییر کد ها برد
اگر قصد دارید ویبولتین 4.2 را در (لوکال)هاست با php 7 نصب کنید و در صورتی که خطا های زیر را مشاهده کردید، به ازای هر خطای زیر، باید کد های زیر را از فایل زیر به شکل مناسب تغییر دهید
Deprecated:, Methods with the Same name as with Their class will of the BE the constructors' not in a future version of the PHP; vB_Database has a deprecated constructor in .... \ includes \ class_core.php on line 83
در \ includes \ class_core.php پیدا کنید:
کد PHP:
function vB_Database(&$registry)
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Datastore has a deprecated constructor in ....\includes\class_core.php on line 1479
در \includes\class_core.php پیدا کنید:
کد PHP:
function vB_Datastore(&$registry, &$dbobject)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, &$dbobject)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Input_Cleaner has a deprecated constructor in ....\includes\class_core.php on line 1820
در \includes\class_core.php پیدا کنید:
کد PHP:
function vB_Input_Cleaner(&$registry)
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Registry has a deprecated constructor in ....\includes\class_core.php on line 3139
در \includes\class_core.php پیدا کنید:
کد PHP:
function vB_Registry()
جایگزین کنید با:
کد PHP:
function __construct()
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Session has a deprecated constructor in ....\includes\class_core.php on line 3541
در \includes\class_core.php پیدا کنید:
کد PHP:
function vB_Session(&$registry, $sessionhash = '', $userid = 0, $password = '', $styleid = 0, $languageid = 0)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $sessionhash = '', $userid = 0, $password = '', $styleid = 0, $languageid = 0)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_XML_Parser has a deprecated constructor in ....\includes\class_xml.php on line 52
در \includes\class_xml.php پیدا کنید:
کد PHP:
function vB_XML_Parser($xml, $path = '', $readencoding = false)
جایگزین کنید با:
کد PHP:
function __construct($xml, $path = '', $readencoding = false)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_XML_Builder has a deprecated constructor in ....\includes\class_xml.php on line 689
در \includes\class_xml.php پیدا کنید:
کد PHP:
function vB_XML_Builder(&$registry, $content_type = null, $charset = null)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $content_type = null, $charset = null)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vBulletinHook has a deprecated constructor in ....\includes\class_hook.php on line 27
در \includes\class_hook.php پیدا کنید:
کد PHP:
function vBulletinHook()
جایگزین کنید با:
کد PHP:
function __construct()
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Database_Alter has a deprecated constructor in ....\includes\class_dbalter.php on line 35
در \includes\class_dbalter.php پیدا کنید:
کد PHP:
function vB_Database_Alter(&$db)
جایگزین کنید با:
کد PHP:
function __construct(&$db)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_DataManager has a deprecated constructor in ....\includes\class_dm.php on line 20
در \includes\class_dm.php پیدا کنید:
کد PHP:
function vB_DataManager(&$registry, $errtype = ERRTYPE_STANDARD)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_DataManager_Multiple has a deprecated constructor in ....\includes\class_dm.php on line 1628
در \includes\class_dm.php پیدا کنید:
کد PHP:
function vB_DataManager_Multiple(&$registry, $errtype = ERRTYPE_STANDARD)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_DataManager_User has a deprecated constructor in ....\includes\class_dm_user.php on line 31
در \includes\class_dm_user.php پیدا کنید:
کد PHP:
function vB_DataManager_User(&$registry, $errtype = ERRTYPE_STANDARD)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_DataManager_Forum has a deprecated constructor in ....\includes\class_dm_forum.php on line 37
در \includes\class_dm_forum.php پیدا کنید:
کد PHP:
function vB_DataManager_Forum(&$registry, $errtype = ERRTYPE_STANDARD)
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Upload_Abstract has a deprecated constructor in ....\includes\class_upload.php on line 25
در \includes\class_upload.php پیدا کنید:
کد PHP:
function vB_Upload_Abstract(&$registry)
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Upload_SocialGroupIcon has a deprecated constructor in ....\includes\class_upload.php on line 1241
در \includes\class_upload.php پیدا کنید:
کد PHP:
function vB_Upload_SocialGroupIcon(&$registry)
{
parent::vB_Upload_Abstract($registry);
}
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
{
parent::__construct($registry);
}
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Image has a deprecated constructor in ....\includes\class_image.php on line 76
در \includes\class_image.php پیدا کنید:
کد PHP:
function vB_Image() {}
جایگزین کنید با:
کد PHP:
function __construct() {}
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Image_Abstract has a deprecated constructor in ....\includes\class_image.php on line 123
در \includes\class_image.php پیدا کنید:
کد PHP:
function vB_Image_Abstract(&$registry)
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Text_Diff has a deprecated constructor in ....\includes\class_diff.php on line 21
در \includes\class_diff.php پیدا کنید:
کد PHP:
function vB_Text_Diff($data_old, $data_new, $output_progress = false)
جایگزین کنید با:
کد PHP:
function __construct($data_old, $data_new, $output_progress = false)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Text_Diff_Entry has a deprecated constructor in ....\includes\class_diff.php on line 462
در \includes\class_diff.php پیدا کنید:
کد PHP:
function vB_Text_Diff_Entry($data_old, $data_new)
جایگزین کنید با:
کد PHP:
function __construct($data_old, $data_new)
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Image_Magick has a deprecated constructor in ....\includes\class_image.php on line 419
در \includes\class_image.php پیدا کنید:
کد PHP:
function vB_Image_Magick(&$registry)
{
parent::vB_Image_Abstract($registry);
$path = preg_replace('#[/\\\]+$#', '', $this->registry->options['magickpath']);
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
{
parent::__construct($registry);
$path = preg_replace('#[/\\\]+$#', '', $this->registry->options['magickpath']);
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_Image_GD has a deprecated constructor in ....\includes\class_image.php on line 1268
در \includes\class_image.php پیدا کنید:
کد PHP:
function vB_Image_GD(&$registry)
{
parent::vB_Image_Abstract($registry);
جایگزین کنید با:
کد PHP:
function __construct(&$registry)
{
parent::__construct($registry);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 121 in ....\includes\class_dm_forum.php
در \includes\class_dm_forum.php پیدا کنید:
کد PHP:
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 222 in ....\includes\class_dm_user.php
در \includes\class_dm_user.php پیدا کنید:
کد PHP:
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager_Thread::vB_DataManager() on line 1666 in ....\includes\class_dm_threadpost.php
در \includes\class_dm_threadpost.php پیدا کنید:
کد PHP:
function vB_DataManager_Thread_FirstPost(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
($hook = vBulletinHook::fetch_hook('threadfpdata_start')) ? eval($hook) : false;
}
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
($hook = vBulletinHook::fetch_hook('threadfpdata_start')) ? eval($hook) : false;
}
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 57 in ....\includes\class_dm_threadpost.php
در \includes\class_dm_threadpost.php پیدا کنید:
کد PHP:
function vB_DataManager_ThreadPost(&$registry, $errtype = ERRTYPE_STANDARD)
{
if (!is_subclass_of($this, 'vB_DataManager_ThreadPost'))
{
trigger_error("Direct Instantiation of vB_DataManager_ThreadPost class prohibited.", E_USER_ERROR);
}
parent::vB_DataManager($registry, $errtype);
}
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
if (!is_subclass_of($this, 'vB_DataManager_ThreadPost'))
{
trigger_error("Direct Instantiation of vB_DataManager_ThreadPost class prohibited.", E_USER_ERROR);
}
parent::__construct($registry, $errtype);
}
Fatal error: Call to undefined method vB_DataManager_ThreadPost::vB_DataManager_ThreadPo st() on line 1114 in ....\includes\class_dm_threadpost.php
در \includes\class_dm_threadpost.php پیدا کنید:
کد PHP:
function vB_DataManager_Thread(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager_ThreadPost($registry, $errtype);
($hook = vBulletinHook::fetch_hook('threaddata_start')) ? eval($hook) : false;
}
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
($hook = vBulletinHook::fetch_hook('threaddata_start')) ? eval($hook) : false;
}
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 59 in ....\includes\class_dm_attachment.php
در \includes\class_dm_attachment.php پیدا کنید:
کد PHP:
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 75 in ....\includes\class_dm_ip_data.php
در \includes\class_dm_ip_data.php پیدا کنید:
کد PHP:
function vB_DataManager_IP_Data(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 74 in ....\includes\class_dm_content_read.php
در \includes\class_dm_content_read.php پیدا کنید:
کد PHP:
function vB_DataManager_Content_Read(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 91 in ....\includes\class_dm_pm.php
در \includes\class_dm_pm.php پیدا کنید:
کد PHP:
function vB_DataManager_PM(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 111 in ....\includes\class_dm_poll.php
در \includes\class_dm_poll.php پیدا کنید:
کد PHP:
function vB_DataManager_Poll(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 70 in ....\includes\class_dm_pollvote.php
در \includes\class_dm_pollvote.php پیدا کنید:
کد PHP:
function vB_DataManager_PollVote(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 113 in ....\includes\class_dm_visitormessage.php
در \includes\class_dm_visitormessage.php پیدا کنید:
کد PHP:
function vB_DataManager_VisitorMessage(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager::vB_DataManager() on line 136 in ....\includes\class_dm_userpic.php
در \includes\class_dm_userpic.php پیدا کنید:
کد PHP:
function vB_DataManager_Userpic(&$registry, $errtype = ERRTYPE_STANDARD){parent::vB_DataManager($registry, $errtype);
جایگزین کنید با:
کد PHP:
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
parent::__construct($registry, $errtype);
Fatal error: Call to undefined method vB_DataManager_Userpic::vB_DataManager_Userpic() on line 288 in ....\includes\class_dm_userpic.php
در \includes\class_dm_userpic.php پیدا کنید:
کد PHP:
class vB_DataManager_Userpic_Avatar extends vB_DataManager_Userpic
{
function vB_DataManager_Userpic_Avatar(&$registry, $errtype = ERRTYPE_STANDARD)
{
$this->table = 'customavatar';
$this->revision = 'avatarrevision';
$this->filepath =& $registry->options['avatarpath'];
parent::vB_DataManager_Userpic($registry, $errtype);
}
}
جایگزین کنید با:
کد PHP:
class vB_DataManager_Userpic_Avatar extends vB_DataManager_Userpic
{
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
$this->table = 'customavatar';
$this->revision = 'avatarrevision';
$this->filepath =& $registry->options['avatarpath'];
parent::__construct($registry, $errtype);
}
}
Fatal error: Call to undefined method vB_DataManager_Userpic::vB_DataManager_Userpic() on line 300 in ....\includes\class_dm_userpic.php
در \includes\class_dm_userpic.php پیدا کنید:
کد PHP:
class vB_DataManager_Userpic_Profilepic extends vB_DataManager_Userpic
{
function vB_DataManager_Userpic_Profilepic(&$registry, $errtype = ERRTYPE_STANDARD)
{
$this->table = 'customprofilepic';
$this->revision = 'profilepicrevision';
$this->filepath =& $registry->options['profilepicpath'];
parent::vB_DataManager_Userpic($registry, $errtype);
}
}
جایگزین کنید با:
کد PHP:
class vB_DataManager_Userpic_Profilepic extends vB_DataManager_Userpic
{
function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
$this->table = 'customprofilepic';
$this->revision = 'profilepicrevision';
$this->filepath =& $registry->options['profilepicpath'];
parent::__construct($registry, $errtype);
}
}
Fatal error: Redefinition of parameter $line in ....\vb\exception\parser.php on line 25
در \vb\exception\parser.php پیدا کنید:
کد PHP:
class vB_Exception_Parser extends vB_Exception
{
public function __construct($message, $line = false, $code = false, $file = false, $line = false)
{
$message = $message ? $message : 'Parser Error';
if (!empty($line))
{
$message .= "::$line";
}
parent::__construct($message, $code, $file, $line);
}
}
جایگزین کنید با:
کد PHP:
class vB_Exception_Parser extends vB_Exception
{
public function __construct($message, $line = false, $code = false, $file = false, $line2 = false)
{
$message = $message ? $message : 'Parser Error';
if(empty($line))
{
$line = $line2;
}
if (!empty($line))
{
$message .= "::$line";
}
parent::__construct($message, $code, $file, $line);
}
}
Fatal error: Function name must be a string on line 1566 in ....\includes\class_bbcode.php
در \includes\class_bbcode.php پیدا کنید:
کد PHP:
$pending_text = $this->$tag_info['callback']($open['data'], $open['option']);
جایگزین کنید با:
کد PHP:
$pending_text = $this->{$tag_info['callback']}($open['data'], $open['option']);
موید باشید