vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - ibProArcade - professional Arcade System (https://vborg.vbsupport.ru/showthread.php?t=101554)

dan325ci 05-23-2017 11:13 AM

Quote:

Originally Posted by bridge2heyday (Post 2586772)
I took sometime checking this for a friend
on MYSQLI class I changed the connect function to
PHP Code:

 function connect()
    {
        
$this->connection_id mysqli_connect($this->obj['sql_host'], $this->obj['sql_user'], $this->obj['sql_pass'], $this->obj['sql_database']);
        if (
mysqli_connect_errno()) {
            echo 
"Failed to connect to MySQL: " mysqli_connect_error();
        }
        
    } 

and at line 186
PHP Code:

 $this->query_id mysqli_query($the_query$this->connection_id); 

connection should be the first parameter on mysqli_connect fuction not second parameter
PHP Code:

 $this->query_id mysqli_query($this->connection_id$the_query); 

it is working fine now


Tried these changes but not working :(

bridge2heyday 05-24-2017 12:14 AM

Quote:

Originally Posted by dan325ci (Post 2586819)
Tried these changes but not working :(

you should use MySQLI
PHP Code:

$MYSQLI    1

I tried this with PHP 5.6 .. but this problem should be solved for PHP 7 as well .. not aware about other problems

Sicilian 06-03-2017 04:21 AM

Few weeks ago upgraded to vbulletin 4.2.4, now getting error below.

PHP Warning: Illegal string offset 'type' in ..../includes/class_postbit.php(345) : eval()'d code on line 110

Updated arcade from 2.7.2 to 2.7.3, still have the error. Any ideas anyone please?

This error shows where we have members who've won awards in the thread. Postbit and Postbit legacy have the relevant template edits.

If i disable Arcade error goes away.

Sicilian 06-03-2017 04:38 AM

Quote:

Originally Posted by Sicilian (Post 2587225)
Few weeks ago upgraded to vbulletin 4.2.4, now getting error below.

PHP Warning: Illegal string offset 'type' in ..../includes/class_postbit.php(345) : eval()'d code on line 110

Updated arcade from 2.7.2 to 2.7.3, still have the error. Any ideas anyone please?

This error shows where we have members who've won awards in the thread. Postbit and Postbit legacy have the relevant template edits.

If i disable Arcade error goes away.

I've tried this too: https://vborg.vbsupport.ru/showpost....49&postcount=5

At the moment I've disable the hook.

MarkFL 06-05-2017 12:22 AM

Quote:

Originally Posted by dan325ci (Post 2586737)
This file already had the live above as you mentioned.


I also did all the previous changes you mentioned but still getting this error:




and in the error logs the following:

Code:

[21-May-2017 03:09:31 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; info has a deprecated constructor in /home/username/public_html/forum/arcade.php on line 112
[21-May-2017 03:09:31 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Arcade has a deprecated constructor in /home/username/public_html/forum/arcade.php on line 341
[21-May-2017 03:09:31 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; FUNC has a deprecated constructor in /home/username/public_html/forum/arcade/functions/functions.php on line 3
[21-May-2017 03:09:31 UTC] PHP Warning:  require(./arcade/functions/dbclass_mysqli.php): failed to open stream: No such file or directory in /home/username/public_html/forum/arcade.php on line 161
[21-May-2017 03:09:31 UTC] PHP Fatal error:  require(): Failed opening required './arcade/functions/dbclass_mysqli.php' (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/username/public_html/forum/arcade.php on line 161


Any other advice?

To fix the deprecated constructor warnings, download the file "arcade.php" and locate the class constructor beginning on line 112 which reads:

PHP Code:

class info {

        var 
$member     = array();
        var 
$input      = array();
        var 
$session_id "";
        var 
$base_url   "";
        var 
$vars       "";
        var 
$skin_id    "0";     
        var 
$skin_rid   "";      
        var 
$lang_id    "en";
        var 
$skin       "";
        var 
$lang       "";
        var 
$server_load 0;
        var 
$version    "v1.3 Final";
        var 
$lastclick  "";
        var 
$location   "";
        var 
$debug_html "";
        var 
$perm_id    "";
        var 
$forum_read = array();
        var 
$topic_cache "";
        var 
$session_type "";

        function 
info() {
                global 
$sess$std$DB$INFO$vboptions$vbulletin$session;

                
$this->vars = &$INFO;

                
$this->vars['board_name'] = $vboptions['bbtitle'];
        }


And change this to:

PHP Code:

class info {

        var 
$member     = array();
        var 
$input      = array();
        var 
$session_id "";
        var 
$base_url   "";
        var 
$vars       "";
        var 
$skin_id    "0";     
        var 
$skin_rid   "";      
        var 
$lang_id    "en";
        var 
$skin       "";
        var 
$lang       "";
        var 
$server_load 0;
        var 
$version    "v1.3 Final";
        var 
$lastclick  "";
        var 
$location   "";
        var 
$debug_html "";
        var 
$perm_id    "";
        var 
$forum_read = array();
        var 
$topic_cache "";
        var 
$session_type "";

        public function 
__construct() {
                global 
$sess$std$DB$INFO$vboptions$vbulletin$session;

                
$this->vars = &$INFO;

                
$this->vars['board_name'] = $vboptions['bbtitle'];
        }

        function 
info() {
            
self::__construct();
        }


Then look for the class constructor around line 345 that reads:

PHP Code:

class Arcade 

Scroll down about 12 lines and find:

PHP Code:

        function Arcade() 

Change that to:

PHP Code:

        public function __construct() 

Then after that function, around line 505 insert:

PHP Code:

        function Arcade()
        {
            
self::__construct();
        } 

Save and upload that file to your server. Next, download and open the file "arcade/functions/functions.php and locate the constructor at line 3 and replace this code:

PHP Code:

class FUNC {

    var 
$time_formats  = array();
    var 
$time_options  = array();
    var 
$offset        "";
    var 
$offset_set    0;
    var 
$num_format    "";
    var 
$allow_unicode 1;
    var 
$get_magic_quotes 0;

    function 
FUNC() {
        global 
$INFO$vboptions$vbulletin;

        
$this->time_options = array( 'JOINED' => $INFO['clock_joined'],
                                     
'SHORT'  => $INFO['clock_short'],
                                     
'LONG'   => $INFO['clock_long']
                                   );

        
$this->num_format = ($INFO['number_format'] == 'space') ? ' ' $INFO['number_format'];

        
$this->get_magic_quotes get_magic_quotes_gpc();

    } 

With this:

PHP Code:

class FUNC {

    var 
$time_formats  = array();
    var 
$time_options  = array();
    var 
$offset        "";
    var 
$offset_set    0;
    var 
$num_format    "";
    var 
$allow_unicode 1;
    var 
$get_magic_quotes 0;

    public function 
__construct() {
        global 
$INFO$vboptions$vbulletin;

        
$this->time_options = array( 'JOINED' => $INFO['clock_joined'],
                                     
'SHORT'  => $INFO['clock_short'],
                                     
'LONG'   => $INFO['clock_long']
                                   );

        
$this->num_format = ($INFO['number_format'] == 'space') ? ' ' $INFO['number_format'];

        
$this->get_magic_quotes get_magic_quotes_gpc();

    }

    function 
FUNC() {
        
self::__construct();
    } 

Save the file and upload it to your server. :)

dan325ci 06-05-2017 05:50 PM

Hi

I am having no luck fixing this

Here are my new errors with ALL the changes outlined by the two coders helped with above.

Code:

[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; mod_arcade has a deprecated constructor in /home/username/public_html/forum/arcade/modules/mod_arcade.php on line 3
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_query(): (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 4 in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 170
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 489



I moved another arcade over with no issues when upgrading to vb 4.2.5 but the difference is i didnt upgrade to php 7.0 at the same time as i did with this problem one. But this arcade seems to have issues even when reverting back to 5.6

MarkFL 06-05-2017 06:05 PM

1 Attachment(s)
Quote:

Originally Posted by dan325ci (Post 2587300)
Hi

I am having no luck fixing this

Here are my new errors with ALL the changes outlined by the two coders helped with above.

Code:

[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; mod_arcade has a deprecated constructor in /home/username/public_html/forum/arcade/modules/mod_arcade.php on line 3
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_fetch_array() expects parameter 2 to be integer, string given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 276
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_query(): (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 4 in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 170
[05-Jun-2017 19:46:34 UTC] PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /home/username/public_html/forum/arcade/functions/dbclass_mysqli.php on line 489



I moved another arcade over with no issues when upgrading to vb 4.2.5 but the difference is i didnt upgrade to php 7.0 at the same time as i did with this problem one. But this arcade seems to have issues even when reverting back to 5.6

I have attached an edited version of "mod_arcade.php" to get rid of the deprecated constructor error. Upload it to the folder "arcade/modules".

MarkFL 06-05-2017 06:23 PM

1 Attachment(s)
I just edited all of the PHP files in the "arcade/modules" folder to fix the class constructors. I have attached a .ZIP file containing them.

dan325ci 06-05-2017 10:27 PM

Quote:

Originally Posted by MarkFL (Post 2587302)
I just edited all of the PHP files in the "arcade/modules" folder to fix the class constructors. I have attached a .ZIP file containing them.


Thanks for your efforts on this.

So, do I still need to do all those changes outlined earlier or just uploading these files will be good enough?

I am referring to those earlier changes outlined by yourself and the other coder to the arcade.php, function.php, dbclass.php and dbclass_mysqli.php files?


Getting this error now:

Quote:

Call to undefined function mysql_connect() on line 41 in /home/username/public_html/forum/arcade/functions/dbclass.php
#0 /home/username/public_html/forum/arcade.php(192): db_driver->connect()
#1 {main}

MarkFL 06-05-2017 11:09 PM

Quote:

Originally Posted by dan325ci (Post 2587305)
Thanks for your efforts on this.

So, do I still need to do all those changes outlined earlier or just uploading these files will be good enough?

I am referring to those earlier changes outlined by yourself and the other coder to the arcade.php, function.php, dbclass.php and dbclass_mysqli.php files?

The changes made to those files are in addition to, not instead of, the earlier changes. I just thought I would go ahead and look at all the scripts in the "arcade/modules" folder and rewrite the class constructors in them. :)


All times are GMT. The time now is 01:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08219 seconds
  • Memory Usage 1,854KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (12)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete