As a novice (who's loving Zope!) I'm having a terrible time trying to get Zope1.10.2 on NT with IIS to connect to MS SQL with a Z ODBC connection. Previously I had no problem getting Zope 1.9/ZopeHTTPServer to connect to MS SQL via Z ODBC. Recently I upgraded to 1.10.2 without a hitch, and was able to run it with IIS 4.0 after putting the (PCGI executable?) MYZOPE.exe in /InetPub/scripts/ and turning off in IIS both Basic Authentication and NT Challenge/Response as I read here in the list. My problem now is that when I try to open my db connection (exactly the same connection that was working with 1.9 & ZopeHTTPServer) I get the following error from IIS:
HTTP Error 400 400 Bad Request Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
In trying to figure out what's going on I've noticed a couple things. First, and I think most illustrative, if I try to add a new Z ODBC connection, none of my ODBC sources are showing up in the available list (except the default 'LocalServer, SQL Server') - whereas if I run my 1.9 Zope with ZopeHTTPServer all my ODBC connections show up just fine. Also, running my new 1.10.2 Zope/IIS with the faulty db connection side by side with the functioning 1.9/ZopeHTTPServer, I printed our the environment variables of both and noticed some differences - USERPROFILE's are Default User vs. Administrator, and the 1.9/ZopeHTTPServer contains variables not contained in the 1.10.2/IIS environ: HOMEPATH, TEMP, USERNAME, HOMEDRIVE, USERDOMAIN, PROMPT, LOGONSERVER, TMP. I attempted to set at least USERDOMAIN in the 1.10.2/IIS environ, with no luck. I've read all the posts from the list that I could find dealing with IIS and ODBC, but couldn't find anything with info on this type of trouble. Have I made a boneheaded mistake and started to look in the wrong places for the fix? Any help/info/pointers would be hugely appreciated as I continue to bang my head on my keyboard hoping that I'll soon clear this hurdle and get back to having fun with Zope! Thanks! Jay
At 18:31 04/03/99 , Jay Ashton wrote:
My problem now is that when I try to open my db connection (exactly the same connection that was working with 1.9 & ZopeHTTPServer) I get the following error from IIS:
HTTP Error 400 400 Bad Request Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.
I have exactly the same problem with an Access database, same error. I'll file a bug report. -- M.J. Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
At 05:31 PM 3/4/99, Jay Ashton wrote:
In trying to figure out what's going on I've noticed a couple things. First, and I think most illustrative, if I try to add a new Z ODBC connection, none of my ODBC sources are showing up in the available list (except the default 'LocalServer, SQL Server') - whereas if I run my 1.9 Zope with ZopeHTTPServer all my ODBC connections show up just fine.
Also, running my new 1.10.2 Zope/IIS with the faulty db connection side by side with the functioning 1.9/ZopeHTTPServer, I printed our the environment variables of both and noticed some differences - USERPROFILE's are Default User vs. Administrator, and the 1.9/ZopeHTTPServer contains variables not contained in the 1.10.2/IIS environ: HOMEPATH, TEMP, USERNAME, HOMEDRIVE, USERDOMAIN, PROMPT, LOGONSERVER, TMP. I attempted to set at least USERDOMAIN in the 1.10.2/IIS environ, with no luck.
I think at least this part of your problem may be due to the fact that Zope is running as a different user under IIS than it is under ZopeHTTPServer. My guess is that it can't see your datasources since they weren't created as 'System' datasources. Check under the windows ODBC control panel and make sure your DSNs appear under 'system dsn', not 'user dsn'. -Amos
At 09:11 AM 3/4/99 -0800, you wrote:
At 05:31 PM 3/4/99, Jay Ashton wrote:
In trying to figure out what's going on I've noticed a couple things. First, and I think most illustrative, if I try to add a new Z ODBC connection, none of my ODBC sources are showing up in the available list (except the default 'LocalServer, SQL Server') - whereas if I run my 1.9 Zope with ZopeHTTPServer all my ODBC connections show up just fine.
Also, running my new 1.10.2 Zope/IIS with the faulty db connection side by side with the functioning 1.9/ZopeHTTPServer, I printed our the environment variables of both and noticed some differences - USERPROFILE's are Default User vs. Administrator, and the 1.9/ZopeHTTPServer contains variables not contained in the 1.10.2/IIS environ: HOMEPATH, TEMP, USERNAME, HOMEDRIVE, USERDOMAIN, PROMPT, LOGONSERVER, TMP. I attempted to set at least USERDOMAIN in the 1.10.2/IIS environ, with no luck.
I think at least this part of your problem may be due to the fact that Zope is running as a different user under IIS than it is under ZopeHTTPServer. My guess is that it can't see your datasources since they weren't created as 'System' datasources. Check under the windows ODBC control panel and make sure your DSNs appear under 'system dsn', not 'user dsn'.
-Amos
Yes! This was exactly what was causing the error. I added a new 'System DSN' which then showed up under IIS, and now I've got a shiny new and perfectly functional Z ODBC Database Connection. Much thanks! - Jay PS - Don't know if this info is helpful, but I noticed that (after I set up a valid System DSN) when my attempt to add a new Z ODBC DB Connection in my IIS/1.10.2 environ was flawed for whatever reason I would receive the cryptic 'HTTP Error 400 - Bad Request' from IIS. After some very quick poking around I noticed that even after selecting a valid dsn, flaws such as trying to add a connection with an ID already in use, or entering an invalid connection string would give this 400 error - whereas in my ZopeHTTPServer/1.9 environ I would receive relevant and helpful error messages in such situations... Wish I knew more about how to help fix...
At 18:47 05/03/99 , Jay Ashton wrote:
PS - Don't know if this info is helpful, but I noticed that (after I set up a valid System DSN) when my attempt to add a new Z ODBC DB Connection in my IIS/1.10.2 environ was flawed for whatever reason I would receive the cryptic 'HTTP Error 400 - Bad Request' from IIS. After some very quick poking around I noticed that even after selecting a valid dsn, flaws such as trying to add a connection with an ID already in use, or entering an invalid connection string would give this 400 error - whereas in my ZopeHTTPServer/1.9 environ I would receive relevant and helpful error messages in such situations... Wish I knew more about how to help fix...
I did notice today that IIS 4.0 seems to be the cullprit. Whenever Zope returns a 400 error (like 'sorry, an error occured') IIS mangles that into the 400 Bad Request error. This means the traceback is also gone. *grmbl*. Just try and add a Principia Draft and not specify an ID, and compare this to the message returned when using ZopeHTTPServer. I think I'll switch to ZServer. Maybe this should go into the FAQ... I'll cc to ZDP BTW, I hereby retract the bug I reported to the Zope Collector regarding ZODBC connections being broken. I forgot to fill in the ID :|. IIS mangles the returned errormessage. What is the procedure for retracting bug reports? mail support@digicool.com? -- M.J. Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (3)
-
Amos Latteier -
Jay Ashton -
Martijn Pieters