Print Page | Close Window

forum can't log into the database

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=30449
Printed Date: 31 March 2026 at 11:59am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: forum can't log into the database
Posted By: billiam777
Subject: forum can't log into the database
Date Posted: 20 August 2012 at 12:13am
This error comes up when going to the forum page or any page including admin

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the Forum Administrator.

Support Error Code:- err_mySQL_db_connection
File Name:- database_connection.asp
Forum Version:- 10.03

Error details:-



Replies:
Posted By: Scotty32
Date Posted: 20 August 2012 at 11:06am
Do you have the relevant permissions set on the database?

For example the database may be configured to only allow local traffic (localhost) and you are connecting externally (ie IP Address or Hostname)?


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: billiam777
Date Posted: 20 August 2012 at 4:13pm
I checked and its not set for localhost.  I also verified that some coldfusion pages I wrote can access the same database.


Posted By: IanSmithISA
Date Posted: 20 August 2012 at 5:08pm
Good afternoon,

I don’t know if this is an officially supported  route or if you are confident enough, but what I would do is modify the file

YourForum\database\database_connection.asp

and change

If Err.Number <> 0 Then               Call errorMsg("An error has occurred while connecting to the database.", "db_connection", "database_connection.asp")

to
                If Err.Number <> 0 Then               Call errorMsg("An error has occurred while connecting to the database.", Err.Description, "database_connection.asp")

Note the loss of quotes in the new value.

On my version this is line 165, this may give you a more informative error message.

Bye

Ian


Posted By: billiam777
Date Posted: 20 August 2012 at 5:18pm
Thank you Ian...I changed the code and it didn't give me much more info.

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the Forum Administrator.

Support Error Code:- err_mySQL_
File Name:- database_connection.asp
Forum Version:- 10.03

Error details:-
ADODB.Connection


Posted By: billiam777
Date Posted: 20 August 2012 at 5:20pm
By the way, I am the host so if I need to make a change to something on the server I can do it...but like I said...I can access the database with coldfusion.


Posted By: IanSmithISA
Date Posted: 20 August 2012 at 5:39pm
Good evening,

I see that there is no error description anymore, which does mean that you changed the relevant thing. :-)

Support Error Code:- err_mySQL_

I would have expected now some thing like

Support Error Code:- err_mySQL_[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifiedrn a

The database driver should have returned some text describing the error but has returned an empty string.

You could replace err.Description with err.Number and Google the returned code, it will be something like -2147467259, but this might be pretty generic.

Beyond this I have no more ideas, I am new to having a WebWiz forum and am still learning my way around the internals.

I wouldn't assume that Cold Fusion is accessing the database in the same way as Web Wiz though.

Bye

Ian


Posted By: WebWiz-Bruce
Date Posted: 21 August 2012 at 9:30am
Did you get an error during the database setup using the setup wizard?


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: billiam777
Date Posted: 21 August 2012 at 3:48pm
Originally when I installed it last year it installed fine.  Then it stopped working on that server.  I had to move the site to a new server anyway so I did that and it doesn't work on the new one either.  I also tried upgrading to version 10.11 and the upgrade wouldn't work because it gave the same error.

I'm using a Windows 2008 R2 server now with IIS 7.5


Posted By: WebWiz-Bruce
Date Posted: 21 August 2012 at 4:07pm
It is a very strange error message that you are getting, normally there would be more information.

I would suggest reinstalling the latest myODBC 3.51 driver on the server, if that does not work install the myODBC 5.1 driver and run the install/setup wizard again to make sure the database is up to date and using the correct driver.

To have the install/setup wizard run update the files in the 'database' folder with the original files from the download from our website.

Another thing to check is that you are running the websites application pool that the forum is running in, in 32bit mode. Many drivers and other ASP components do not work in 64bit mode.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: billiam777
Date Posted: 21 August 2012 at 7:10pm
I can't change the application pool to 32 bit mode because when I do .asp files don't work at all.  Plesk has already looked at it and determined it must be running in 64 bit mode.  Although I did try this and sure enough the asp code didn't run.

I have tried both myODBC 3.51 and 5.1 drivers and while the plesk panel says they work and can connect they don't in web wiz for some reason.

I noticed in my database_settings.asp it has this line uncommented:
strDatabaseType = "mySQL"    'MySQL 4.1 or MySQL 5.x

and this one too:
strDbPathAndName = Server.MapPath("databasewwForum.mdb")  'This is the path of the database from the applications location

Does this matter?


Posted By: billiam777
Date Posted: 21 August 2012 at 7:11pm
I also have this setting in my database_settings.asp
strSQLServerName = "localhost" 'Holds the name of the SQL Server (This is the name/location or IP address of the SQL Server)


Posted By: WebWiz-Bruce
Date Posted: 21 August 2012 at 8:00pm
Web Wiz Forums needs to run in a 32bit mode application pool. As you are using 64bit application pools then this is why it is not running.

Classic ASP will run when the application pool is in 32bit mode. If it is not running in 32bit mode then there is an issue with your server that needs fixing.

Microsoft recommend that you run app pools in 32bit mode as you get better performance and memory management.

We host many thousands of websites on our servers that run Classic ASP, ASP.NET and PHP and all websites run in 32bit application pools.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: billiam777
Date Posted: 21 August 2012 at 8:09pm
If I go into the plesk(default)(2.0)(pool) and change "Enable 32-bit applications" to "true", then run the forums I get this error.

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.




Posted By: billiam777
Date Posted: 21 August 2012 at 8:25pm
I just tried a test_mysql.asp page and it was able to connect to mysql with asp.  I will try creating a new application pool


Posted By: billiam777
Date Posted: 21 August 2012 at 8:40pm
Creating a new application pool for this with 32-bit causes asp to not work at all....grrr....

Ok I'm going to see if plesk can fix the environment so this will run.


Posted By: WebWiz-Bruce
Date Posted: 21 August 2012 at 9:17pm
Why would you contact Plesk? The issue with ASP not working in 32 bit app pools would be a configuration issue within IIS and not to do with the control panel you are running.

You should also be running each website in it's own application pool. Your forum website should not be running in the same app pool as Plesk.

The settings that you need to change are in IIS not Plesk. To start with in the IIS Manager check under the ISAPI and CGI Restrictions that ASP is allowed.

You should also edit ASP settings in IIS to send errors to the browser, and then edit the Error Pages in IIS to 'Detailed Errors'. You will then get a descriptive error message that will point to the exact issue rather than the generic 500 Internal server error that you are getting.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: billiam777
Date Posted: 23 August 2012 at 2:18am
Its finally working now. 

I told the plesk engineers what you told me about 32-bit vs 64-bit and they changed the plesk(2.0) application pool in IIS, which the forum website used, to "enable 32-bit applications".  But it hosed up pretty much all the websites on that server that used php, asp and coldfusion.  So I put that setting back to "false".

In the meantime they checked all their settings for .asp pages and finally said its a problem with your application. 

However, just for grins I decided to test it more.  I had already created in the plesk interface 3.51 and 5.1 MyODBC drivers and tested them with no success so I tried again.  I changed the variable strMyODBCDriver in database_settings.asp to "5.1" and got an "access denied" error when trying to access the forum, so I changed the variable to "3.51" and voila!  It works fine!

The plesk engineers must have reset something in their search to fix .asp pages.  And by the way its running in 64-bit mode.


Posted By: WebWiz-Bruce
Date Posted: 23 August 2012 at 10:15am
You should not be placing all your websites in the same application pool as a badly behaving app will then take down all your websites.

Place Web Wiz Forums in it's own application pool, not the default  plesk(2.0) application pool, and then change the application pool to 32bit mode. This will allow various components for features like uploading files and images, email components, etc. to work, as many are 32bit only.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net