Print Page | Close Window

Mysql ODBC 5.3 error

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=31719
Printed Date: 08 December 2021 at 6:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mysql ODBC 5.3 error
Posted By: BritBOT
Subject: Mysql ODBC 5.3 error
Date Posted: 05 October 2021 at 12:43pm
I am trying to install WebWiz for the first time, on Win 2012, IIS8, and get this error on the database
I use Mysql 8 and have both ODBC 5.3 32 bit and ODBC 8 64 bit installed.
The ODBC drivers are in use for both and I have added my new database name in MySql Schemas and an ODBC 5.3 32 bit connection which tests ok for both ANSI and Unicode versions.
Neither seems to work with the WebWiz setup though

An Error Occurred Connecting to the Database

Error details:-
Microsoft OLE DB Provider for ODBC Drivers
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified




Replies:
Posted By: BritBOT
Date Posted: 05 October 2021 at 3:25pm
Changing the code in setup_db_con_test.asp to and using 5.3 ANSI

'Set the connection string to the database
'adoCon.connectionstring = strCon
response.Write(strCon)
adoCon.Open "dsn=databrsforum"
    
'Set an active connection to the Connection object
'adoCon.Open

produces this error

Error details:-
-2147467259 Microsoft OLE DB Provider for ODBC Drivers
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

which seems to indicate that your code doesn't like the driver.
Help please

The strCon that produced the first error reported above contained
Driver={MySQL ODBC 5.3 ANSI Driver};Port=3306;Option=3;Server=104.217.253.203;User ID=xxx;Password=xxx;Database=databrsforum;
which looks right .


Posted By: BritBOT
Date Posted: 06 October 2021 at 8:38am
Testing again this morning, with NO changes to the ODBC - 5.3 ANSI in both User and System DSN, the test connection worked from the setup but on clicking next, got the same error as yesterday.

Strangely, though the test is positive even when there is nothing in the username or password fields.
Please see screenshots here  http://%20brstrnc.com/forum/webwiz1.jpg - https://brstrnc.com/forum/webwiz1.jpg  and -  https://brstrnc.com/forum/webwiz2.jpg - https://brstrnc.com/forum/webwiz2.jpg


Posted By: WebWiz-Bruce
Date Posted: 06 October 2021 at 1:04pm
The error means that the MySQL Database Driver cannot be found.

You want to place the application pool for the website running Web Wiz Forums in 32 bit mode to use MySQL.

You then want to install the MyODBC x86 (32 bit drivers), start with the latest MySQL 5.3 and work backward when installing as installing MySQL 5.3 last will remove all the previous versions.

I would also advise using Microsoft SQL Server over MySQL as it works much better with Microsoft's Classic ASP, and can handle much larger forums than MySQL can.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: BritBOT
Date Posted: 06 October 2021 at 2:15pm
Thanks Bruce
As I use ODBC 8 64 bit for the rest of the site, I added a new 32bit application pool and then added the application to the main website.
The setup proceeded successfully and it looks as if it will do us very nicely.

Next questions,
1. can I have more than one administrator (as opposed to group admins)?
2. even after changing my admin password to what I think is a secure one, when I login it says it is not secure.  (included upper/lower case, number, special char)
3. it looks as though a newbie is allowed in immediately. Is there a way to approve new requests to join?


Posted By: WebWiz-Bruce
Date Posted: 06 October 2021 at 2:52pm
1. There is a built in admin account hardcoded, but you can add additional admin accounts that have the same rights.

You can also create moderators that have rights in the forums but can not access the backend admin system.

2. Try a longer password, it might be too short.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: WebWiz-Bruce
Date Posted: 06 October 2021 at 2:56pm
3. Yes you can enable vetting from the email section in the admin area. Once enabled the admins will need to vet new users to activate their accounts.

You can also use the forum permissions system so new users only have access to certain forums, read-only access to some forums but not others, or forums that are hidden to all but selected groups.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: BritBOT
Date Posted: 07 October 2021 at 3:46pm
Thanks for you help - much appreciated.

1. Solved
2. Tried a very long unique password and still showing insecure.  Looking at the code, I couldn't find anywhere that turned off the class="errorTable" in admn_menu.asp
3. Found the activation now thanks.  I had also found member_approve in tblsetupoptions and set that to true,  but only after adding a primary key to the table so it was not read only.  Actually will probably upload our current member list and then add them when they join the Society so they will be setup immediately.

Next, unfortunately
4. Tried many times to use the Existing Membership API, but even using the same tab to go from my login response to the forum which are both in the same domain, the session Id's are different, so it's not picking up the 3 session variables.  Could this be because it is a different application pool?


Posted By: WebWiz-Bruce
Date Posted: 11 October 2021 at 9:07am
4. The Existing Membership API uses ASP Session which require both the website where the session variable are set and Web Wiz Forums are both in the same application pool.

If you are using different websites and/or application pools there is also the XML HTTP API that can work across websites, domains, and applications pools.

https://www.webwiz.net/web-wiz-forums/kb/xml-http-api.htm" rel="nofollow - https://www.webwiz.net/web-wiz-forums/kb/xml-http-api.htm


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: BritBOT
Date Posted: 11 October 2021 at 12:03pm
Yes, and because I have had to use ODBC 5.3 32 bit for your code, there has to be a different application as we established earlier. 

However, the httpAPI seems to require the admin name and password to be sent to it which exposes them, even if in hidden fields. Not good IMHO.
Even if I store them in a session variable, they would still be exposed.
Is there a way of automatically logging in without that?

Your demo does return a cookie, but I'm afraid I haven't seen anywhere yet that says how that might be used to login.

Apologies if this is repeated, I thought I had posted this before your forum went down.




Posted By: WebWiz-Bruce
Date Posted: 11 October 2021 at 6:56pm
The existing member API is the easiest to use, but as ASP sessions only work within the same website/application pool you would need to find a way to have your website and forum run in the same website/application pool for it to work.

I highly recommend that you use SQL Server for the backend database which also supports 64-bit application pools. MySQL does not work very well as the backend database and we only maintain support for mySQL due to legacy reasons.

Regarding the XML HTTP API. This is intended to be used in backend server side code and should never be exposed client side.

If you are going to use the XML HTTP API you would need to write your own server side code that sends an XML request to the forums API, which then responds with an XML response that you would parse in your server side code.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: BritBOT
Date Posted: 12 October 2021 at 8:51am
Thanks, appreciate the advice but with all my sites using MySql, not going to change for this.

However, I am using the XML HTTP API and successfully parsing the response which gives the cookie.  My question is what do I do with that?  I can't see any documentation on how to use that to login. Presumably the cookie code needs to be redirected somewhere. Please advise.
Would it be possible for you to give me a code example please?


Posted By: WebWiz-Bruce
Date Posted: 12 October 2021 at 11:16am
You would parse the XML to get the CookieName, CookieKey, and CookieData. 

This would be used to set a cookie in the users web browser which can then be read by the forum to login the user.

You can then re-create the same cookie as the forum would create when someone logs in to the forum.

The CookieName would be the name of the cookie you create, the CookieKey will be the cookie key usually UID, and the Cookie Data is the data you set for the cookie.

If the cookie is set on the same domain as the forum then you don't need to worry about browser security as the forum will be able to read the cookie and use this to login the user.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter


Posted By: BritBOT
Date Posted: 19 October 2021 at 7:41am
Thanks for your help.



Print Page | Close Window

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