Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Lost Database connection #350

Open
mrmav3n opened this issue May 16, 2019 · 5 comments

Comments

@mrmav3n
Copy link

commented May 16, 2019

Stand alone sql and iis on the same server
Upgraded from 1.9.6 to 2.20
Updated Php to 7.27 in iis
Updated to the Microsoft Drivers 5.3 for PHP v7.2 for SQL Server in IIS.
tried removing symbols from the password for the sql account
tried making sql account sa
At a total loss as what to do next.
Existing site lost its ability to connect to the database.

Fatal error: Uncaught Error: Call to undefined function mysql_error() in C:\inetpub*\wp-includes\wp-db.php:3437 Stack trace: #0 C:\inetpub*\wp-includes\wp-db.php(1606): wpdb->bail('

Error estab...', 'db_connect_fail') #1 C:\inetpub*****************\wp-includes\wp-db.php(647): wpdb->db_connect() #2 C:\inetpub\brandnewbusinesses.com\wp-includes\load.php(414): wpdb->__construct(', 'wp_database', 'localhost') #3 C:\inetpub**************************\wp-settings.php(120): require_wp_db() #4 C:\inetpub***\wp-config.php(100): require_once('C:\inetpub\bran...') #5 C:\inetpub*\wp-load.php(37): require_once('C:\inetpub\bran...') #6 C:\inetpub*\wp-blog-header.php(13): require_once('C:\inetpub\bran...') #7 C:\inetpub********\index.php(17): require('C:\inetpub\bran...') #8 {main} thrown in C:\inetpub*\wp-includes\wp-db.php on line 3437

@patrickebates

This comment has been minimized.

Copy link
Member

commented May 16, 2019

First things first, drop version 2.1.1 on there and see if that clears up the immediate problem.

@mrmav3n

This comment has been minimized.

Copy link
Author

commented May 16, 2019

I rolled the server back to backup from early this morning and its back now but at the 1.9.6 level.
I guess it would be nice to have some sort matrix of what versions need what php and driver and cache software.

@patrickebates

This comment has been minimized.

Copy link
Member

commented May 16, 2019

I'm still looking for the path which took you into those functions in the first place. They existed in 2.1.1 but should not be accessible.

As for matching PHP and SqlSrv, I recommend using the Web Platform Installer from MS. It does a very good job of helping you align everything.

@mrmav3n

This comment has been minimized.

Copy link
Author

commented May 16, 2019

I do use the web platform installer for all those installs.
As for my path.
I downloaded the latest zip of the 2.2.0 and overwrote the folder.....not before backing it up.
when it came up i had the database connection error. Researched and updated php to 7.2.7 then updated the matching drivers and cache software via the web platform installer
then tried everything else i mentioned.
But yea was a royal mess

@A-Matt

This comment has been minimized.

Copy link

commented Oct 8, 2019

Wanted to bring this back up again mainly due to the small outage our internet had and constantly getting the error.
image
Here is the full image of the issue.

Looking back there seems to be 2 other instances of fixes before for it.
Alter new MySQL error handling to conform to our MSSQL standards and Handle MSSQL Server errors in a similar fashion MySQL errors were han…
This looks like simple the code for handling errors has changed since 2014 and hasn't been updated to change back into SQL format.

This looks to be a simple fix using sqlsrv_errors().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.