The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Database connection unsuccessful! - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27)
+--- Thread: Database connection unsuccessful! (/showthread.php?tid=1428)



Database connection unsuccessful! - W11B2349 - 04-09-2019

Brand new installation of 4.4

I was able to connect to my remote MySQL server when using my own PHP applications, however when I attempt to install userspice it's saying I can't connect. 

Currently I'm using a web server and a separate MySQL server, both of which are using Windows Server 2016.

Is there a good way to go about debugging this? Thanks in advance!


RE: Database connection unsuccessful! - Brandin - 04-10-2019

This is an issue with your server's configuration, more than likely your installation does not allow external connections on port 3306.


RE: Database connection unsuccessful! - W11B2349 - 04-10-2019

attached a screenshot, I have port 3306 port open for an inbound rule. Notably I do not have one for outbound. Is it possible that might be needed? But as I stated at the start I AM able to connect to this server remotely via just writing a php connection string, but would love any ideas as to what the issue could be, or a good way to find out what the issue could be.        

Thanks


RE: Database connection unsuccessful! - Brandin - 04-10-2019

The server that is connecting outbound (remotely) to another MySQL server also requires Port 3306 to be open.


RE: Database connection unsuccessful! - W11B2349 - 04-10-2019

Good call to check that as well, I did not have an outbound rule from the webserver. I went ahead and set one up though, and it didn't have any effect. attached screenshot.


RE: Database connection unsuccessful! - Brandin - 04-10-2019

Only other thing I can think of is if you don't have the PDO module loaded? What version PHP are you using? MySQL? Are you doing this on Xampp? How did you compile your server features?


RE: Database connection unsuccessful! - W11B2349 - 04-10-2019

When I look at the first step to check the server settings are set up correctly, it says PDO is available and lit in green. However since you mentioned it specifically I checked my phpinfo page and found that there were no PDO drivers listed. I added:

extension=php_pdo.dll
extension=php_pdo_mysql.dll

to my php.ini file and this appears to have helped, but now I'm getting a bunch of errors when trying to actually run the queries (see attached.)

nevermind, it looks like some of the files got uploaded to the database previously. So I dropped the table and made it new again, and it worked with no problems. Thank you for your help!


RE: Database connection unsuccessful! - Brandin - 04-11-2019

Glad to hear we were able to resolve this with loading the PDO. I will look further into why the installer says PDO is available so we can make sure to validate this properly on all installations. I may contact you in the future to help debug this.

Brandin.


RE: Database connection unsuccessful! - mudmin - 04-11-2019

(04-10-2019, 10:55 PM)W11B2349 Wrote: When I look at the first step to check the server settings are set up correctly, it says PDO is available and lit in green. However since you mentioned it specifically I checked my phpinfo page and found that there were no PDO drivers listed. I added:

extension=php_pdo.dll
extension=php_pdo_mysql.dll

to my php.ini file and this appears to have helped, but now I'm getting a bunch of errors when trying to actually run the queries (see attached.)

nevermind, it looks like some of the files got uploaded to the database previously. So I dropped the table and made it new again, and it worked with no problems. Thank you for your help!

Have you double checked to make sure that those tables are not in the db? I'm wondering if it worked the first time and you didn't know it.