RE: [Zope] MySQL and Zope struggles

2000-10-18 Thread Baker, Dennis [sjmr]

What about one sql method:

select @noteid:=note_id from artist where dtml-sqltest artist_id type=int
dtml-var sql_delimiter 
update note set notes =dtml-sqlvar notes type=string
 where note_id = @noteid



-Original Message-
From: Richard Moon [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 2:48 AM
To: [EMAIL PROTECTED]
Subject: [Zope] MySQL and Zope struggles


I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL 
(Why ? - because I've got a kind offer of free hosting if I use MySQL).

MySQL offers a limited set of features and is missing, among other things, 
the ability to use subqueries - so for example in PostgreSQL you can say

update note set notes =dtml-sqlvar notes type=string
 where note_id =
 (select note_id from artist where dtml-sqltest artist_id type=int)

and in MySQL you can't.

If you were working in a traditional programming environment you could 
overcome this by splitting the above into two parts - a select to retrieve 
the value of note_id from the artist table followed by an update of the 
note table using the returned value of note-id.

For example

select note-id into note-id-var from artist where artist-id = 23;
update note set notes = 'asdasda' where note-id = note-id-var;

The problem is that in Zope I believe you can't use a returned value within 
an SQL Method,  so the above code would fail. The only way I can see to do 
the above is to have two separate SQL Methods, one for the select, 
returning the note-id-var and another for the update. This is very clumsy.

I was wondering if anyone could tell me if there was a better way.

Many thanks


Richard

Richard Moon
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Two questions regarding SQL

2000-10-18 Thread Baker, Dennis [sjmr]

Dunno if someone replied to this,  but try GUF.  Let's you roll your own
authentication.  There is a howto out there for using GUF with an SQL
server.

-Original Message-
From: //www.alomega.com/ [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 3:02 PM
To: [EMAIL PROTECTED]
Subject: [Zope] Two questions regarding SQL


Hey 2 everyone:

I have two questions.

1) I need to authenticate my Zope users against a 
Sybase SQL database.

2) I need to make my Zope ODBC database connection 
object use (i.e. connect with) the user and password of 
the AUTHENTICATED_USER because security is at the 
database level, for tables and stored procedures.

How do I do that?  Any pointers?  LoginManager did not 
work for zope 2.2.2 here.  Besides, the new Z ODBC 
connection form only lets me specify an ODBC dsn or a 
connection string.  And as I understand, the connection 
string is the same for ALL zope users that use that 
object.

Any practical solutions to the problem #2?  Will I have 
to connect to the DB as DBA?  If that's the case, I'll 
have to go with PHP.

I'm sorry for my former HTML postings.  Won't happen 
again.


Thanks in advance.

--
   Universidad Federico Santa Maria - Campus Guayaquil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] SQLSession Chokes on Hyphens (-), Spaces, and punctuation

2000-09-19 Thread Baker, Dennis [sjmr]

I'm using SQLSession to manage sessions on my zope site.  I need to store
member ID's which may or may not contain hyphens,  or short sentences
describing a diagnosis which usually includes one or more spaces.
SQLSession accepts the item,  but the next page it tries to load comes up
with "improper padding" and errors out on the SQLSession code.  

HELP !!


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] A Better Way (Stupid DTML code)

2000-07-25 Thread Baker, Dennis [sjmr]


 -Original Message-
 From: Andy McKay [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 24, 2000 6:52 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope] A Better Way (Stupid DTML code)
 
 
 Okay now im really curious what does min-provid tell you, I 
 had a quick
 rummage through the docs and couldnt see any reference to this.

From the DTML users guide...
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.7.3.html

Basically it does what it says,  gives you the minimum of a value from a
dtml-in list.

 
 - Original Message -
 From: "Bill Anderson" [EMAIL PROTECTED]
 To: "Baker, Dennis [sjmr]" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, July 24, 2000 6:40 PM
 Subject: Re: [Zope] A Better Way (Stupid DTML code)
 
 
  "Baker, Dennis [sjmr]" wrote (quote rearranged to be *after* the
  previous message, as it should be:):
 
-Original Message-
From: Andy McKay [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 21, 2000 5:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [Zope] A Better Way (Stupid DTML code)
   
   
Other smug answers include:
- dont put - in your SQL methods
- use your SQL to give the variable a different name
- use python
  
   I suppose my smug reply would be that min- is a 
 variable generated
 by
   dtml-in,  I didn't pick the variable name.
  
 
  Touche'
 
 
  Bill
 
  --
  Do not meddle in the affairs of sysadmins, for they are 
 easy to annoy,
  and have the root password.
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] A Better Way (Stupid DTML code)

2000-07-24 Thread Baker, Dennis [sjmr]

I suppose my smug reply would be that min- is a variable generated by
dtml-in,  I didn't pick the variable name.  

 -Original Message-
 From: Andy McKay [mailto:[EMAIL PROTECTED]]
 Sent: Friday, July 21, 2000 5:27 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope] A Better Way (Stupid DTML code)
 
 
 Other smug answers include:
 - dont put - in your SQL methods
 - use your SQL to give the variable a different name
 - use python
 
 - Original Message - 
 From: "Phil Harris" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; "Dennis Baker" [EMAIL PROTECTED]
 Sent: Friday, July 21, 2000 4:29 PM
 Subject: Re: [Zope] A Better Way (Stupid DTML code)
 
 
  dtml-in SQL_list_providers
dtml-if "_.int(_['min-provid'])  2"
  dtml-if sequence-start
h3Search for Member Information/H3
dtml-var MemberSearchForm
  /dtml-if
/dtml-if
  /dtml-in
  
  - Original Message - 
  From: Dennis Baker [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, July 22, 2000 12:08 AM
  Subject: [Zope] A Better Way (Stupid DTML code)
  
  
   Ok,  there has to be a better way of doing this,  I just 
 want to show a
   dialog if there minimum value of a field is lower than 
 20,000.  This is
   the only way I could figure out to do this,  Python seems 
 to choke on
   variables with Hyphens so I have to use the dtml-let  
 It works but
   it's a STUPID way to do things.
   
   
   dtml-in SQL_list_providers
 dtml-let min_provid=min-provid
   dtml-if "min_provid  '2'"
 dtml-if sequence-start
   h3Search for Member Information/H3
   !-- ** Show the Member Search Form **  --
   dtml-var MemberSearchForm
 /dtml-if
   /dtml-if
 /dtml-let
   /dtml-in
   
   
   ___
   Zope maillist  -  [EMAIL PROTECTED]
   http://lists.zope.org/mailman/listinfo/zope
   **   No cross posts or HTML encoding!  **
   (Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
  
  
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
  
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Squid and SSL

2000-07-12 Thread Baker, Dennis [sjmr]

No, But I do have Apache with ProxyPass and SSL running just great,  I'm
actually running RedHat's SecureSite Server but I've heard it runs very well
in conjunction with the Open SSL Modules.  Sorry a bit off topic.

 -Original Message-
 From: Ragnar Beer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 12, 2000 1:05 PM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Squid and SSL
 
 
 Howdy!
 
 Has anybody already successfully tried squid-2.4-DEVEL2 with the SSL 
 patch from squid.sourceforge.net to make Squid an SSL-frontend for 
 Zope?
 
 browser --https- squid --http- zserver
   internet localhost
 
 --Ragnar
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] ProxyPass Problems

2000-06-28 Thread Baker, Dennis [sjmr]

The idea was to have http://mysite.org go to one part of my site,  and
https://mysite.org go to a different section of my page.  When you request a
page using http:// the request comes in on port 80 is non-encrypted html.
https:// requests go to port 443,  and are encrypted.  So the idea is to
have Apache ProxyPass the secure pages (Port 443) to the Secured pages.  All
better now... I didn't pay attention to the existing VirtualHosts in
httpd.conf and paid for it.

 -Original Message-
 From: Peter Sabaini [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 27, 2000 6:12 AM
 To: Baker, Dennis [sjmr]
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [Zope] ProxyPass Problems
 
 
 
 i dont know much about ssl but wouldn't you want to pass / --
 https:// instead of / -- http:// ?
 but then again i dont know a thing about ssl...
 peter
 
 
 On Mon, 26 Jun 2000, Baker, Dennis [sjmr] wrote:
 
 :I'm having a problem with getting ProxyPass and SSL to work. 
  I followed the
 :How-to on Using Apache with ZServer,  and unfo's How-To on
 :Apache+ZServer+SSL.  And my setup is nearly identical to the 
 one listed on
 :the howto.  I have my main site in the root of my Zope 
 Setup,  and My SSL
 :site is in a subdirectory of the root called SecureSite.  
 :
 :After setting up the ProxyPass Directives in Apache (I have 
 the httpd.conf
 :section attached below) and Adding the SiteRoot objects on 
 Zope I can access
 :the main Site at http://mysite.org,  but if I try to access
 :https://mysite.org my web browser hangs until it times out.  
 Also,  it
 :becomes impossible to browse the SecureSite Folder unless I 
 delete the
 :SiteRoot Object. 
 :
 :It appears to be some kind of Apache issue,  however I can't 
 figure out why
 :it won't connect,  the directives are almost identical to 
 the ones on the
 :Howto.  Any Suggestions ??
 :
 :  Snippet from httpd.conf  ---
 :NameVirtualHost 206.171.167.101:80
 :
 :VirtualHost 206.171.167.101:80
 :ServerAdmin [EMAIL PROTECTED]
 :ServerName mysite.org
 :ProxyPass / http://mysite.org:8080/
 :ProxyPassReverse / http://mysite.org:8080/
 :ProxyPass /misc_ http://mysite.org:8080/misc_
 :ProxyPass /p_ http://mysite.org:8080/p_
 :/VirtualHost
 :
 :NameVirtualHost 206.171.167.101:443
 :
 :VirtualHost 206.171.167.101:443
 :ServerAdmin [EMAIL PROTECTED]
 :ServerName mysite.org
 :ProxyPass / http://mysite.org:8080/SecureSite/
 :ProxyPassReverse / http://mysite.org:8080/SecureSite/
 :ProxyPass /misc_ http://mysite.org:8080/misc_
 :ProxyPass /p_ http://mysite.org:8080/p_
 :/VirtualHost
 :
 :  End Snippet 
 :
 :Dennis Baker
 :Information Systems Manager, St. Joseph's Medical Resources 
 :
 :
 :___
 :Zope maillist  -  [EMAIL PROTECTED]
 :http://lists.zope.org/mailman/listinfo/zope
 :**   No cross posts or HTML encoding!  **
 :(Related lists - 
 : http://lists.zope.org/mailman/listinfo/zope-announce
 : http://lists.zope.org/mailman/listinfo/zope-dev )
 :
 
 -- 
 
 _
 peter sabaini, mailto: [EMAIL PROTECTED]
 -
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Version Paradox

2000-06-14 Thread Baker, Dennis [sjmr]

Help !! 

I've inadvertently created a version paradox.  I created a version and
joined it,  then I realized that I did a stupid naming mistake I tried to
UNDO the creation of the version.  It allowed me to undo the creation of the
version,  however I was in the version at the time,  and now I am stuck in
the version and cannot get out.  I cannot create a version of the same name
and delete it either.  I am stuck.  HELP !!

How can I exit a version that doesn't exist?  


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )