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)

MrZeropage 10-28-2018 06:47 PM

Quote:

Originally Posted by snakes1100 (Post 2597057)
Flipped a few switches, to give some more insite:

PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in ..../arcade/functions/dbclass_mysqli.php on line 44

PHP Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in ..../arcade/functions/dbclass_mysqli.php on line 48
ERROR: Cannot find database xxxxxxxx
PHP Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in ..../arcade/functions/dbclass_mysqli.php on line 185

PHP Warning: mysqli_error() expects exactly 1 parameter, 0 given in ..../arcade/functions/dbclass_mysqli.php on line 504

Problem solved :cool:

Was a weird problem, the database-connect was working fine with "localhost" while "localhost:3306" responded "connection refused". No idea why. Fixed by removing the port (setting it to empty).

I will include a setting for this in upcoming v2.7.6+ so that anybody having connection problems can easily switch the behaviour of the database-driver... :)


@snakes1100:
Enjoy ibProArcade :cool: :up:


@hirlas:
Please also try this:

open /arcade.php

search for
Code:

require $sql_driver;
$DB = new db_driver;

ABOVE that, add:
Code:

// fix for mysqli-connection-problems (by MrZeropage)
$config['MasterServer']['port'] = "";
$port = "";


snakes1100 10-28-2018 10:43 PM

admincp/arcade.php

Add on line 46:
// local fix for mysqli-connection-problems (by MrZeropage)
$config['MasterServer']['port'] = "";
$port = "";

Thanks for the fix MrZ!

snakes1100 10-28-2018 11:08 PM

I dont know how i missed is previously when i compared servers, but the server in question had the following in my.cnf:

skip-networking

If i recall thats a default setting from mysql 5.x.x, so now it accepts remote tcp/ip connections as it should, this server is pretty old & has since been upgraded many times & now users mariadb.

I removed the fixes & tested, all working fine now, but id agree with your email MrZ, id leave the fix in there for 2.7.6

MrZeropage 10-29-2018 06:43 AM

Quote:

so now it accepts remote tcp/ip connections as it should
You should never allow remote connections to the database, as long you don't have a dedicated database-server separated from your webserver... perspective of security nobody external should have the option to connect directly to the database.

Hope you find the problem in your server-settings so I learn about such problem and to help other users in the future :)

snakes1100 10-29-2018 08:00 AM

I agree, im just letting you know what i found, with skip-networking disabled, your coding for a db connection works, with it enabled, your db connection attempts fail.

I verified this issue on 2 other servers that dont run whm/cpanel, same issue, the arcade breaks with skip-networking enabled.

MrZeropage 10-29-2018 08:33 AM

Which mySQL-versions are you using that cause the problem?

snakes1100 10-29-2018 08:46 AM

mariadb 10.2, on all 3 servers i tested with.

Tested another whm/cpanel server with the original test forum for 3.8 that we did before you released 2.7.5, same issue on it with the way you're calling the db connection, also running maraidb 10.2

goxy63 10-30-2018 07:41 AM

Received email about update, for a second I was very happy thinking that we will have this great mod for VB5 but....

x iJailBreak x 10-30-2018 12:36 PM

Quote:

Originally Posted by goxy63 (Post 2597091)
Received email about update, for a second I was very happy thinking that we will have this great mod for VB5 but....

It could likely be ported, if MrZeropage wanted to do so.

MrZeropage 10-30-2018 02:00 PM

As far as I know, vB5 is not providing such deep integrated Plugin/Hook-System, to be more secure and less adaptable. Right now I don't have vB5, so maybe anyone could tell me details about that (PN please).


All times are GMT. The time now is 06:09 AM.

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.08757 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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