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

Can't connect to database #512

Open
MabelVanA opened this issue Oct 6, 2023 · 2 comments
Open

Can't connect to database #512

MabelVanA opened this issue Oct 6, 2023 · 2 comments

Comments

@MabelVanA
Copy link

I'm not sure this is an appropriate question on this forum, but here goes..
I've been wrestling with this problem for over 8 hours now - so I'm pretty desperate for help.
I have an old-fashioned 'home' setup; with a well functioning (windows10) server running several wordpress sites. Now I want everything to move to a new computer. Trying to avoid any issues with upgrades, I simply:

  • installed SQL-server (12) using the same (downloaded) setup-package I used for the current server (default instance, same password) and restored the wordpress database from a backup;
  • copied the files in ...\inetpub\wwwroot\MyBlog;
  • copied the files in ...\PHP (to a different location, but i adjusted php.in for this)
  • added, with IIS manager, a handler for *.php pointing to the new location of the PHP files.
    Finally, I downloadeed and installed the wonderful 'PHP for IIS' applet for IIS-manager which assures me the PHP installation is fine; bringing up phpinfo.php from localhost confirms that (as far as I can see, at least): both the sections 'sqlsrv' and 'pdo_sqlsrv' show up.

And yet my webbrowser confronts me with "Error establishing a database connection".
I'm at a loss here; has anyone any ideas?
Hans
PS: I also verified, by making a DSN, that the local SQL-server can be reached using tcp/ip.

@patrickebates
Copy link
Member

Have you confirmed that the TCP port for SQL Server is open? I've seen that a couple of times.

@MabelVanA
Copy link
Author

@patrickebates Funy you should say that since I worried about it. For some reason or other the SQL package I used, SQLEXPRWT_x86_ENU.exe, did not contain the sql configuration manager so I can't verify the protocols used directly, but I did successfully make a (working) DSN using tcp/ip as client protocol.
I suppose I could upgrade sql-server to get hold of this 'configuration manager' but so far I've been striving to keep things exactly as they are on my running server right now.
Hans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants