Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   BT.Manager (phpMyBitTorrent) (http://www.bvlist.com/forumdisplay.php?f=23)
-   -   PMBT 2.0.4 php 5.3 error fixes (http://www.bvlist.com/showthread.php?t=7736)

BitFarmer 12th March 2012 00:58

PMBT 2.0.4 php 5.3 error fixes
 
Error
Code:

Deprecated:  Function eregi() is deprecated in C:\xampp\htdocs\newbase\include\configdata.php on line 30
Fix ... open said configdata.php find
Code:

if (eregi ("configdata.php" , $_SERVER["PHP_SELF"])) die ("You can't access this file directly");
replace with
Code:

if (!defined('IN_PMBT')) die ("You can't access this file directly");
Error
Code:

Deprecated:  Call-time pass-by-reference has been deprecated; If  you would like to pass it by reference, modify the declaration of  ip_valid().  If you would like to enable call-time pass-by-reference,  you can set allow_call_time_pass_reference to true in your INI file in C:\xampp\htdocs\newbase\include\functions.php on line 128
Fix .. open said functions.php find
Code:

  foreach ($check as $c) {
    if (ip_valid(&$_SERVER[$c])) {
      return ip_first($_SERVER[$c]);
    }
  }

replace with

Code:

  foreach ($check as $c) {
    if (@ip_valid($_SERVER[$c])) {
      return ip_first($_SERVER[$c]);
    }
  }

Error
Code:

Deprecated:  Function eregi() is deprecated in C:\xampp\htdocs\newbase\include\functions.php on line 4

Deprecated:  Function eregi() is deprecated in C:\xampp\htdocs\newbase\include\functions.php on line 6

Fix .... open said functions.php find
Code:

// This file contains Bit Torrent main functions. MUST be included before every
// other file at the beginning of any script
if (eregi("functions.php",$_SERVER['PHP_SELF'])) die("You can't access this file directly");
if (!function_exists("sha1")) require_once("include/sha1lib.php");
if (!eregi("download.php",$_SERVER['PHP_SELF']))include ("./include/forum_settings.php");
if (!eregi("download.php",$_SERVER['PHP_SELF']))include ("./include/functions_phpBB3.php");

replace with
Code:

// This file contains Bit Torrent main functions. MUST be included before every
// other file at the beginning of any script
if (!defined('IN_PMBT')) die ("You can't access this file directly");
if (!function_exists("sha1")) require_once("include/sha1lib.php");
//if (!preg_match("download.php",$_SERVER['PHP_SELF']))include ("./include/forum_settings.php");
//if (!preg_match("download.php",$_SERVER['PHP_SELF']))include ("./include/functions_phpBB3.php");

Error
Code:

Strict Standards:  Resource ID#14 used as offset, casting to integer (14) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 482

Strict Standards:  Resource ID#14 used as offset, casting to integer (14) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 484

Strict Standards:  Resource ID#17 used as offset, casting to integer (17) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 482

Strict Standards:  Resource ID#17 used as offset, casting to integer (17) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 484

Strict Standards:  Resource ID#19 used as offset, casting to integer (19) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 482

Strict Standards:  Resource ID#19 used as offset, casting to integer (19) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 484

Strict Standards:  Resource ID#21 used as offset, casting to integer (21) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 482

Strict Standards:  Resource ID#21 used as offset, casting to integer (21) in C:\xampp\htdocs\newbase\include\db\mysql.php on line 484

Fix .... open said mysql.php find
Code:

        function sql_fetchrow($query_id = 0)

        {

                if(!$query_id)

                {

                        $query_id = $this->query_result;

                }

                if($query_id)

                {

                        $this->row[$query_id] = @mysql_fetch_array($query_id);

                        return $this->row[$query_id];

                }

                else

                {

                        return false;

                }

        }

replace with
Code:

        function sql_fetchrow($query_id = 0)

        {

                if(!$query_id)

                {

                        $query_id = $this->query_result;

                }

                if($query_id)

                {

                        $this->row[(int)$query_id] = @mysql_fetch_array($query_id);

                        return $this->row[(int)$query_id];

                }

                else

                {

                        return false;

                }

        }

Error
Code:

Notice:  Undefined variable: configquery in C:\xampp\htdocs\newbase\include\config.php on line 197
Fix open said config.php find
Code:

$db->sql_freeresult($configquery);
replace with
Code:

//$db->sql_freeresult($configquery);


All times are GMT +2. The time now is 14:48.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2020, vBulletin Solutions Inc.