[Zope] Access Problem - external method and aquisition

2001-01-24 Thread Bill Welch

Some time ago, I set up a site with SiteAccess and ZClient to pass through
a request to legacy php a la Mamey's 'Serving PHP/Perl from Zope'.  Works
great, lasts a long time.

I recently added Membership and restricted access to the folder. The
AccessRule works and publishing of index_html starts, as before. Upon
attempting to execute the external method that contains the ZClient,
however, I get a basic auth window. The problem seems to be that
aq_inContextOf returns 0 for the external method when it's called from
Products/LoginManager/LoginManger.py:84, thereby causing allowed to return
0, and raising the unauth exception at
AccessControl/ZopeSecurityPolicy.py:183. Works fine for DTML methods
called within index_html. Any ideas?

Zope 2.2, linux, PTK 0.9, Membership 0.7.8

Bill.



___
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] MySQLDA and MySQL-python - patch needed?

2001-01-11 Thread Bill Welch

I haven't been following this thread, so I apologize in advance for any
redundancy.

Several weeks ago I had an existing mysql fail as you describe after I
upgraded mysqldb in /usr/lib/python. I fixed it by moving
ZMySQLDA/MySQLdb-0.1.2/_mysqlmodule.so up one level as described in README.txt.

Bill.

On Thu, 11 Jan 2001 [EMAIL PROTECTED] wrote:

 From Zope management database connection Test tab, on valid SELECT queries
 it tells me that there was no data matching my query. On invalid SELECT
 queries (ones on nonexistent tables or columns) Zope raises the correct
 error originating from MySQL, such as "Error Value: (1146, "Table
 'somedatabase.sometable' doesn't exist")". The trial queries I am testing
 through Zope all work from the MySQL command line so I know they do in fact
 return data. It appears that error messages are making it back to Zope from
 MySQL but real query results are not.


___
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] MySQLDA and MySQL-python - patch needed?

2001-01-11 Thread Bill Welch

A binary distribution comes with python built-in so that it will run
without the installer having to also go get python. PYTHONPATH is the key
to understanding module sharing. Unless you (or the packager) change
something, a binary Zope uses only the modules in the built-in python (or,
at least, has the built-in lib/python first in PYTHONPATH). In the same
vein, the two pythons don't share modules unless you change somemthing,
e.g. PYTHONPATH (or maybe both their PYTHONPATHs end in
/usr/local/python). Just to double check what's going on in your Zope, use
this code to create an external method and visit it with your browser.

import sys

def sysPath(self):
buff = ''
for dir in sys.path:
buff = '%s\n%s' % (buff, dir)
return buff

Bill.

On Thu, 11 Jan 2001 [EMAIL PROTECTED] wrote:

 dependencies here. Also I am confused on a basic piece of Zope
 configuration: my box has its own python and Zope has its own python, why
 two and are they sharing modules? If you want to add a module for both
 installs of python do I have to install in both? If I install a python
 module in my box's python can Zope's python find and use it? I am confused
 on this basic question.



___
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] Authentication problems on FreeBSD with Apache

2001-01-11 Thread Bill Welch

First off, bypass apache and go straight to zope - typically port 8080.
Did you make note of the superuser name and password the installation
script produced? If not, use zpasswd.py to create a new one. I'm presuming
that you're using 2.2.x. Don't forget to create a manager user and switch
to it after you get logged in as the superuser. Search on zope.org for
'apache'.

Bill.

On Thu, 11 Jan 2001, Drew Sanford wrote:

 I have recently installed Zope on FreeBSD running the Apache web server. 
 When I attempt to access the management page from 
 http://my.web.server/cgi-bin/Zope.cgi I get authentication failures. I'm 
 sure there are things that I've missed in what I've seen, and the 
 section on running Zope with Apache in the manual isn't done yet. Can 
 anyone point me towards some of the known issues here as far as what 
 someone clueless about Zope but reasonably familiar with Apache might 
 need to do to get authentication working?
 
 
 ___
 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] zclassReverse problem

2001-01-08 Thread Bill Welch

I get back exactly nothing, no 'Not Found', no classes/attributes. I
believe that I've installed correctly. When I ask for a product that
doesn't exist, I get a traceback that starts in Extensions/zclassInfo.py.

I've tried in on Membership, LoginManager, ZPatterns, Poll, Etailer, and
zCommerce. Zope 2.2.2, linux.

Bill.

On Sat, 6 Jan 2001, Philipp Auersperg wrote:

 ZclassReverse consists of two parts, the client part in ObjectDomain
 and the server part that extracts the class infos on the Zope side.
 
 That means that the methods provided in the zclassReverse folder
 expose internals of your ZClasses, they DONT BREAK ANYTHING in your
 Zope since the methods exposed in the zclassReverse folder just are
 read-only.
 
 the 'invalid syntax' error orrurs if something goes wrong when you call the server 
part.
 
 you can check that manually if you type the following url into your
 browser (fill in your server,port and product):
 
 http://yourserver:8080/zclassInfo/getClassInfos?product=QSurvey
 
 When you get a collection of classes and yttriutes it works, in your
 case Zope returns it's 'Not found' screen.
 
 Solution:
 check if you have installed the server part of ZClassReverse which consists of:
 1. zclassInfo.py that has to be copied into your Extensions folder
 2. import zclassInfo.zexp into your Zope root folder
 
 When that works you should be able to reverse your product, let me
 hear if it worked for you
 
 thanls and good luck
 phil
 
 -- Original Message --
 From: Bill Welch [EMAIL PROTECTED]
 Date: Fri, 5 Jan 2001 11:47:29 -0500
 
 in the moment dont install ZClassReverse on production machines since for now 
 the client module comunicates unauthorized to Zope, but I will be working on 
 it as I'll have time.
 
 Does this mean it breaks something or that it won't work? Is this the source 
 of my 'invalid syntax' error?
 
 Bill.
 
 


___
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 Picture of Zope, The Fish

2000-12-27 Thread Bill Welch

Zope is no more named after a fish, much less an undistinguished fish,
than python is named after a snake. I can see how you might invent a
branding around coincidence, but I think we can do better.

What animal is going on the O'Reilly book?

Bill.

On Tue, 26 Dec 2000, Takashi Veikko Linzbichler wrote:

 Well, I've got another picture of a zope, maybe I'll try in the next few
 days ...


___
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] is it possible to import from Excel

2000-12-27 Thread Bill Welch

Gadfly is a distinct product, www.chordate.com/gadfly.html, so you can, at
least, write python to insert data directly into gadfly. You can get the
data out of Excel through COM or export to csv.

Bill.

On Wed, 27 Dec 2000, K H Subrahmanyan wrote:

 Now we have developed some database using gadfly in zope.
 Actually there are some datum which are there in Excel. I would like to know
 is it possible to import all that datum from Excel to zope database, instead
 of giving all the data to zope manually.



___
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] SiteAccess / SUPPRESS_ACCESSRULE bad (urgent)

2000-12-27 Thread Bill Welch

Sounds like something's wrong with your apache conf. Please show us what
that looks like. I'm running a similar setup on Debian, too, and it works
fine.

Bill.

On Wed, 27 Dec 2000, Edwin Martin wrote:

 Hello,
 
 I'm running an Zope website behind an Apache proxy.
 
 Because Zope is running on port 9673, some links pointed to
 this port and the URL showed mydomain:9673...


___
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] The meaning of Zope

2000-12-26 Thread Bill Welch

Here's what some Americans think it means. From ARTFL Project, Webster's
1913 Unabridged at
http://humanities.uchicago.edu/forms_unrest/webster.form.html

Zope (?), n. [G.] (Zoöl.) A European fresh-water bream (Abramis ballerus).

for completeness:

Bream (?), n. [OE. breme, brem, F. br\'88me, OF. bresme, of German origin;
cf. OHG. brahsema, brahsina, OLG. bressemo, G. brassen. Cf. Brasse.]
1. (Zoöl) A European fresh-water cyprinoid fish of the genus Abramis,
little valued as food. Several species are known.

Cyp"ri*noid (s?p"r?-noid), a. [Gr. a kind of carp + -oid.] (Zoöl.) Like
the carp (Cyprinus). -- n.  One of the Cyprinidae, or Carp family, as the
goldfish, barbel, etc.

On Tue, 26 Dec 2000, Pierre-Julien Grizel wrote:

 Paul, can you give us the actual meaning of "Zope" in Britain ?


___
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] LoginManager - logging out

2000-12-20 Thread Bill Welch

Inspired by Jim Washington's recent post re 'Anonymous user', I was
reminded of a previous post in which someone suggested
http://garbage:x@yourSite would also clear the browser's credential.
Much faster and works in IE and Konqueror, but not Navigator or lynx. Very
easy to test, too.

first,
http://yourSite/manage
and login
then
http://garbage:x/yourSite/debug
and check other/AUTHENTICATED_USER

On Tue, 19 Dec 2000, Bill Welch wrote:

 Not true, depends on the browser. My tests indicate that Navigator and IE
 both trash the existing good credential with the garbage one and you're
 really logged out. Konqueror and lynx seem to hang on to the last
 successful authentication and this method doesn't log you out.


___
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] LoginManager - logging out

2000-12-20 Thread Bill Welch

Up to this point, I've been talking about mechanisms for you, personally,
to log out to switch between developer and user roles for testing. 
Clearly, these mechanisms aren't appropriate for the users of your site.

I think LoginManager isn't the only choice, but I can't say, off hand,
what the other choices are.

Bill.

On Wed, 20 Dec 2000, Mohan Baro wrote:

 for me I need to log out completely.
 similar to what they do at ZOPE.ORG (login/logout)

 In fact I wouldn't mind a form based login system similar to zope.org
 
 Mohan.
 
 what you guys are saying is that
 1) using standard authentication ( I have a problem with logout)
 2) and I must use LoginManager + ZPatterns
 



___
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] LoginManager - logging out

2000-12-19 Thread Bill Welch

On Tue, 19 Dec 2000, Tim Cook wrote:

 Mohan Baro wrote:
  
  Thanks,
  
  I have tried it.
  
  dtml-raise type="Unauthorized"
  Logout!!
  /dtml-raise
  
  I guess it logs me out. But it also gives me a login dialog box  it does
  not accept any of the account. So I cannot log back in! Why?
  

The login dialog is the reauthentication opportunity that's your browser's
response to the 'Unauthorized' exception and that's normal. Don't know why
you can't log back in. Works for me in Navigator, IE, and Konqueror. Lynx
displayed an opportunity to reauthenticate once, and then only showed the
exception after that.

 I'm not sure WHY it won't accept your username at this point.
 BUT, it doesn't really logout you out either. If you hit the back
 button a couple of times you'll notice that you are still logged
 in.  The only way to logout using standard authentication is to
 close the browser.

Not true, depends on the browser. My tests indicate that Navigator and IE
both trash the existing good credential with the garbage one and you're
really logged out. Konqueror and lynx seem to hang on to the last
successful authentication and this method doesn't log you out.

Hitting the back button doesn't tell you anything about what credential
your browser is sending to the server. Try visiting a privileged page
after going back or look at the request that's actually being sent. Try
using this one line method (I call mine 'debug'):

dtml-var REQUEST

After visting yourSite/logout and trying to login as a garbage user at the
reauthentication opportunity (blanking the user name seems to work fine),
visit yourSite/debug. Check other/AUTHENTICATED_USER, Navigator and IE
show 'Anonymous User', Konqueror and lynx show the last good user.

Bill.



___
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] LoginManager - logging out

2000-12-18 Thread Bill Welch

 authentication and that the browser caches the credential. This means
 unless you shut down your browser, whatever you do, you are back to
 square one.

Besides shutting down your browser, you trash its credential. Create a
simple DTML method that raises the 'Unauthorized' exception. Direct your
brower to that method. The browser will, in some form or manner, request
that you authenticate again. Now the important part, don't cancel the
reauthentication! Type in some garbage user name and password and send it.
Your brower will give you another chance to authenticate, but this one you
cancel and you're back to being anonymous as far as Zope is concerned.

Bill.


___
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] passwords TTW - security hole?

2000-12-18 Thread Bill Welch

AFAIK, inputs of type password are sent to the server as plain text. In
Login Manager, for example, that would mean that passwords are exposed
every time someone logs in. In User Folder, the passwords would be exposed
whenever they're changed.

If my interpretation is correct, then it seems to me to be a call for
out-of-the-box ssl support in zope.

Bill.


___
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] LoginManager - logging out

2000-12-18 Thread Bill Welch

this is my logout DTML method

dtml-raise type="Unauthorized"
Logout!!
/dtml-raise

On Mon, 18 Dec 2000, Mohan Baro wrote:

 Can you please give an example of this code or method?
 
 Mohan.


___
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] AW: [Zope] error by adding Poll

2000-12-18 Thread Bill Welch

Please note that the method is addItem, not manage_addItem.

The current convention is to untar in the zope installation directory.
For example, /usr/bin/zope. The files in the tar have a relative path -
lib/python/Products. Other than that, yes - untar and restart.

Bill.

On Mon, 18 Dec 2000, Kaeidinejad, Shahram wrote:

 Hi Bill,
 
 i changed into itemAdd.dtml from
  form action="manage_addSamplePollItem" method="POST"
 to
 form action="manage_addItem" method="POST"
 
 but i get the same error like this:
Cannot locate object at:
 http://192.168.190.238:23456/Test_Folder/manage_addProduct/Poll/manage_addIt
 em 
 
 how can i use Hotfix_2000-12-8?
 i untared it into Products directory and restart zope. 
 how can i have to do it correct?






___
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] adding Mail Host also legacy, broken by Hotfix_2000-12-08

2000-12-18 Thread Bill Welch

In SiteAccess, the legacy name and the method name are the same, so
references to the legacy name still work.

Bill. 

On Mon, 18 Dec 2000, Aleksander Salwa wrote:

 On Mon, 18 Dec 2000, Bill Welch wrote:
 
  Just for the record.
 
 As I grepped through sources, I see that SiteAccess (2.0.0b4)
 also uses 2-argument legacy mechanism :(
 
 Anyway: why it still works ?
 I have Hotfix_2000-12-08 installed and I still can add new SiteRoots.


___
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] error by adding Poll

2000-12-15 Thread Bill Welch

Manage_addSamplePollItem is a 'legacy' mapped to addItem (see
Poll/__init__.py) and Hotfix_2000-12-8 shuts down the legacy mechanism. I
went into itemAdd.dtml changed it to use addItem directly.

Bill.

On Fri, 15 Dec 2000, Kaeidinejad, Shahram wrote:

 Hi 
 i install Poll-0.7.1 and try to add it.
 but i get an erro like this:
 
 Cannot locate object at:
  
 http://192.168.190.238:23456/Test_Folder/manage_addProduct/Poll/manage_addSa
 mplePollItem
 
 
 Traceback (innermost last): File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 187, in
 publish File /dgn-devel01/opt/Zope-2.2.4/lib/python/Zope/__init__.py, line
 221, in zpublisher_exception_hook File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 162, in
 publish File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/BaseRequest.py, line 366,
 in traverse File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/HTTPResponse.py, line 539,
 in debugError NotFound: (see above) 
 
 what do i false?
 
 bye
 
 shahram
 
 
 ___
 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] site structure

2000-12-14 Thread Bill Welch

Well, just put them there. The head section is in standard_html_header,
open it up and add your script section.

Bill.

On Thu, 14 Dec 2000, Farrell, Troy wrote:
 Though, I have a difficult situation:  If I understand correctly, definition
 of JavaScript functions belongs in the head tags.  Does anyone know how to
 do this?


___
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] Broken LoginManager - Can't get it to install

2000-12-13 Thread Bill Welch

The source for DynPersist is in a sub-directory of ZPatterns. You have to
go in and compile it.

On Wed, 13 Dec 2000, Mohan Baro wrote:

 I can seem to figure out what wrong here.
 
 I have ZPatterns installed already 0.4.3b2
 
 This is the latest LoginManager 0.8.8b1
 
 LoginManager Import Traceback
 Traceback (innermost last):
   File "/usr/share/zope/lib/python/OFS/Application.py", line 397, in
 import_products
 product=__import__(pname, global_dict, global_dict, silly)
   File "/usr/share/zope/lib/python/Products/LoginManager/__init__.py", line
 1, in ?
 import LoginManager, LoginMethods, UserSources
   File "/usr/share/zope/lib/python/Products/LoginManager/LoginManager.py",
 line 7, in ?
 from Products.ZPatterns.PlugIns import PlugInGroup
   File "/usr/share/zope/lib/python/Products/ZPatterns/__init__.py", line 1,
 in ?
 import Rack, Specialists, Customizers, AttributeProviders,
 SheetProviders
   File "/usr/share/zope/lib/python/Products/ZPatterns/Rack.py", line 9, in ?
 from DataSkins import DataSkin
   File "/usr/share/zope/lib/python/Products/ZPatterns/DataSkins.py", line 1,
 in ?
 from DynPersist import DynPersist
 ImportError: No module named DynPersist
 
 
 
 ___
 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] Re: [Zope-ZEO] ZEO_CLIENT

2000-12-07 Thread Bill Welch

ZEO_CLIENT is a parameter of z2.py to let a zope instance know it's a
client of a central ZEO and to not try to install products. Add to you
invocation of z2.py

Did you change the custom_zodb.py of the instance to connect a
ClientStorage at the host and port that you started ZEO on?

Bill.

On Thu, 7 Dec 2000, Kaeidinejad, Shahram wrote:

 Hi Monty,
 
 I have a stupid question.
 Where and how can i define the ZEO_CLIENT?
 I installed on the same mashine zope-2.2.4 and zeo-0.4.0.
 I read the README.txt from ZEO and make it but I think I don't understand at
 all.
 There isn't any interaction between ZEO and zope.
 can you help me, Please?
 
 bye
 
 Shahram
 
 
 ___
 Bug reports, feature requests, etc. go in the ZEO Tracker:
 http://www.zope.org/Products/ZEO/Tracker
 
 Conversations etc. can take place in the Wiki:
 http://www.zope.org/Products/ZEO/Wiki
 
 Zope-ZEO maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-zeo
 


___
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] META Tags in Zope Documents

2000-12-06 Thread Bill Welch

The robot, like any other user of your site, will only see the html that
results from zope rendering the code you write. No viewer of the rendered
html can tell how it was put together, so there is nothing to consider.

Bill.

On Wed, 6 Dec 2000, David Legg wrote:

 Hello,
 
 I am currently embedding meta tags into documents within the Zope
 environment. At the moment the meta tags are in the standard_html_header
 file and embedded within index_html and other documents.
 
 Are there any issues with embedding meta data this way when a search engine
 spiders the site? Will the search engine pick up the contents of dtml-var
 standard_html_header or just the literal document itself, or is there
 anything else to consider?
 
 Thanks in advance,
 
 David
 
 
 ___
 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] Another Zope E-Commerce Site Online

2000-12-06 Thread Bill Welch

I found the shopping cart interesting. Did you start with an existing
package or write it from scratch? Are you willing to share it?

Bill.


___
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] Another Zope E-Commerce Site Online

2000-12-06 Thread Bill Welch

Maybe you just looked at the catalog and didn't notice what's in the
checkout. Having spent the past month setting up a site with Etailer, I
would have to completely disagree with you. If Brad started with Etailer
(I suspect he did, the checkout sequence has an Etailer look), it would
have taken a lot of hard core programming, not graphical work, to get to
where he is in 5 days.

1) Etailer doesn't support separate billing and shipping addresses

2) ETailer doesn't support a shipping fee, much less shipping alternatives

3) Etailer doesn't do taxes.

Adding even one of the above features means touching a lot of python,
management dtml, and user dtml.

4) Etailer sorts options alphabetically. 

5) Etailer uses the variable name as the label on forms, i.e. Firstname in
CheckOut. Makes for ugly shipping address vs billing address forms unless
you extend the required_properties code to support labels. More python,
management dtml, and user dtml.

Nothing wrong with Etailer, but there's a lot to Brad's site that Etailer
doesn't handle.

Bill.

On Thu, 7 Dec 2000, Terry Kerr wrote:

 Hi,
 
 Looks good.  5 days eh?.  I think one graphics artist could have done it
 in less than two days using Etailer (e-tailer.adroit.net)...except for the
 Wampum bit...I am hoping someone will add this in soon.
 
 terry
 
 Brad Clements wrote:
 
  Just announcing this new e-commerce zope based site.
 
  http://www.adirondackcraft.com



___
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] Possible disaster upgrading to 2.2.4

2000-11-28 Thread Bill Welch

On Tue, 28 Nov 2000, Jonathan Cheyne wrote:
 Ah, I tried reinstalling zddiscussions, no joy, i tried deleting
 zdiscussions but when you restart zeop it reinstalls the two products as
 broken. 

You have to delete it from lib/python/Products as well, but it's a red
herring for the real issue (see below). 

 i tried a new install of 2.2.4 then copy across my data.fs bits and untar
 various products in use on the site, but, exactly the same message. so it
 may not be th eupgrade but something in 2.2.4 itself that my data.fs
 dislikes.

No, it's your data.fs that's the problem. It's been corrupted the same way
several others have been the past few months (ZDiscussions is suspiciously
overrepresented as the pickled data in the traceback). See the 'Is data.fs
corrupted' thread.

Bill.





___
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] off toic, but... ange-ftp only works as unix root

2000-11-17 Thread Bill Welch

even though I can ftp into zope from unix root and non-root. As unix
non-root, ange-ftp asks for password and then hangs emacs. Does respond to
C-g. Same zope user in all cases. The obvious problem is some file or port
permission, but I'm hoping someone can show me the way instead of me going
for another bushwhack. Debian woody, emacs 20.7.2. Any ideas?

Bill.


___
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] Is data.fs corrupted?

2000-11-09 Thread Bill Welch

Eyeballing my problem Data.fs (I kept a copy), I see something different
than you describe.

What I take to be the root object (OID 0) refers to a record in what
appears to an instance of something to do with PTK (OID 57). A separate
record in the PTK related instance (PRI) refers to a record in what seems
to be the ZDiscussions *ZClass*, not an instance of ZDiscussions.
Interesting that the first (and problem) record of the PRI has the next
OID after that of the last OID of the ZClass. Could it have orginally been
part of the ZDiscussions install? I don't remember when I installed what.

See snippets of dump and tranlyzer at end of message. N.B., the Data.fs is
from an Intel machine (you have to swap bytes on the hex side to read it
correctly).

I tried the reinstall, delete instances method with no improvement. It
didn't seem to me that truncating would have helped me either, considering
that I would have had to truncate back to and including the root :-).

I recovered by exporting all my objects, starting a new ZODB, and
importing my objects. 

Bill.

On Thu, 9 Nov 2000, Chris McDonough wrote:

 But problems may happen when an application places instances into the ZODB
 of non-web-manageable, non-builtin objects as attributes of normal Zope
 objects.  If these instances aren't cleaned up in the process of the
 deletion of whatever bit of Python code created them, they're "orphaned".
 When they're orphaned, some application code may attempt to initialize the
 object's instance (for whatever reason) in order to make use of them, and
 because the ZODB can't find the class of the instance, it complains.  It
 complains by raising an exception.  Zope's supposed to catch this and do the
 right thing, but it evidently doesn't sometimes.
 
 You can "fix it" by restoring whatever class the instance depends on and
 subsequently use the debugger to delete the instance from the ZODB.  But
 I've had it happen to me where it was just easier to truncate the
 FileStorage I was working on than figure out exactly what was going on.
 This is bad.

TID: 33140200A4749F8 @ 69694 obs 1 len 274 (status 'p') By [Zope]
"Added Globals"
OID: 0 len 204
2, 57

0069680 7d0b 0c71 2e75    e404 3103  .}q.u..1
0069696 1f40 b8f5 08b6    1a01 0070  @.p.
0069712  000d 4100 6464 6465 4720 6f6c 6162  .Added Globa
0069728 736c     3103 1f40 b8f5  ls.1@...
0069744 08b6       0100  
0069760 3e10     cc00 2828 0b55  ...((U.
0069776 6550 7372 7369 6574 636e 7165 5501 5011  Persistenceq.U.P
0069792 7265 6973 7473 6e65 4d74 7061 6970 676e  ersistentMapping
0069808 0271 7174 4e03 2e74 717d 5504 5f0a 6f63  q.tq.Nt.}q.U._co
0069824 746e 6961 656e 7172 7d05 0671 5528 5f0a  ntainerq.}q.(U._
0069840 6170 6b63 745f 6d69 7165 4707 cb41 1497  pack_timeq.GA...
0069856 5662 9cc2 0b55 7041 6c70 6369 7461 6f69  bV..U.Applicatio
0069872 716e 2808 0855    0200 0971  nq.(U.q.
0069888 5528 4f0f 5346 412e 7070 696c 6163 6974  (U.OFS.Applicati




TID: 3374475482BCF4C @ 3769401 obs 2 len 648 (status 'p') By [Zope]
"Installed product DemoPortal"
OID: 137f len 456
1377, 43ed, 43f3, 4431
135e, 43f0, 4389, 1568
442e, 1565
OID: 57 len 65
137f



3769392 002e   a100 036a 4437 4875 cf2b  j.7DuH+.
3769408 004c   0200 7090  1c00   Lp..
3769424 6e49 7473 6c61 656c 2064 7270 646f 6375  Installed produc
3769440 2074 6544 6f6d 6f50 7472 6c61    t DemoPortal
3769456  7f13 3703 7544 2b48 4ccf    .7DuH+.L
3769472     3900 3984    .9.9
3769488   c801 2828 0555 5442 6572 7165  ..((U.BTreeq
3769504 5501 4206 6375 656b 7174 7402 0371 744e  .U.Bucketq.tq.Nt
3769520 282e 5528 2a19 3337 6962 7071 4941 5132  .((U.*73biqpAI2Q
3769536 6144 6932 504b 7469 3576 6737 3d3d 0471  Da2iKPitv57g==q.
3769552 1955 432a 5677 2f42 6536 7550 6f33 656b  U.*CwVB/6ePu3oke
3769568 4f41 7973 4668 4342 3d51 713d 5505 2a19  AOsyhFBCQ==q.U.*
3769584 614d 6d73 636b 4c45 6977 5851 5833 7669  MasmkcELwiQX3Xiv
3769600 3353 556d 7751 3d3d 0671 1955 592a 502f  S3mUQw==q.U.*Y/P
3769616 694c 6f65 5854 6164 6e4a 3871 7672 6f4c  LieoTXdaJnq8rvLo
3769632 3358 3d67 713d 5507 2a19 6659 4932 6744  X3g==q.U.*Yf2IDg
3769648 5879 4c70 5346 6e2f 6270 316e 6c37 4135  yXpLFS/npbn17l5A
3769664 3d3d 0871 1955 632a 354a 7161 3463 6a36  ==q.U.*cJ5aqc46j
3769680 3570 634c 494c 5a38 5a6a 5471 3d51 713d  p5LcLI8ZjZqTQ==q
3769696 5509 2a19 356a 5a36 6f41 444e 5354 6b2f  .U.*j56ZAoNDTS/k
3769712 4772 5330 4330 7363 415a 3d3d 0a71 1955  rG0S0CcsZA==q.U.
3769728 6a2a 3647 3263 7848 4251 734c 4a6b 3153  *jG6c2HxQBLskJS1
3769744 7730 6c61 6e4f 3d77 713d 550b 2a19 5773  0walOnw==q.U.*sW
3769760 5133 6b78 466a 5156 4e50 4d4b 7555 3042  3QxkjFVQPNKMUuB0
3769776 3762 

Re: [Zope] Is data.fs corrupted?

2000-11-08 Thread Bill Welch

I think it is ZODB corruption. See my post of a couple of weeks ago for
suggestions for recovery.

This the fourth example of ZClass related DB corruption that I've seen in
the past six weeks. In my own brush with this, it seemed to be triggered
by uninstalling and reinstalling products.

Bill.

On Wed, 8 Nov 2000, Chris McDonough wrote:

 In your start script, set the STUPID_LOG_FILE environment variable to the
 path of a file to which you want log messages to be sent (before 'start'
 calls z2.py).  Then review the log file.  You'll probably get more clues as
 to what is going wrong, allowing you to fix the problem.
 

  Error Type: Could not load oid ={, pickled data in traceback info may
  contain clues
  Error Value: None


___
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] Is data.fs corrupted?

2000-11-08 Thread Bill Welch

In my case, I couldn't import DemoPortal.zexp or Wizard.zexp from PTK
because oid 1377 was already in use. The pickle dump that followed
contained references to ZDiscussions, which I had deleted some time
before.

After deleting the offending products and their directories, restarting
zope, and packing, I ran tranalyzer -r on my problem Data.fs. I found that
the problem oid was in this transaction:

"/Control_Panel/Products/manage_importObject

import into /var/lib/zope/var/Data.fs from
/var/lib/zope/import/ZDiscussions.zexp"

referred to by this transaction:

"Installed product DemoPortal"

in turn, referred to by this tranaction:

"Added Globals"

I think ZODB corruption when I see a record in one product refer to
a record in an independent product and when the transaction of a deleted
product doesn't go away.

On Wed, 8 Nov 2000, Chris McDonough wrote:

  I think it is ZODB corruption.
 
 This is very unlikely.  What makes you think this?



___
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] Is data.fs corrupted?

2000-11-08 Thread Bill Welch

Here's my evidence. A record (OID 0) in the "Added Globals" transaction
refers to a record (OID 57) in the "Installed product DemoPortal"
transaction.

From tranalyzer -r

TID: 33140200A4749F8 @ 69694 obs 1 len 274 (status 'p') By [Zope]
"Added Globals"
OID: 0 len 204
2, 57

TID: 3374475482BCF4C @ 3697235 obs 2 len 648 (status 'p') By
[Zope]
"Installed product DemoPortal"
OID: 137f len 456
1377, 43ed, 43f3, 4431
135e, 43f0, 4389, 1568
442e, 1565
OID: 57 len 65
137f

On Wed, 8 Nov 2000, Chris McDonough wrote:

 Transactions are only tangentially related to this issue (I'm not sure how
 the "Added globals" transaction 'referred to' the "Installed product
 DemoPortal" transaction in your example, BTW).


___
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] Need win32 dll for DynPersist !

2000-11-06 Thread Bill Welch

I bounced him the one I got from Itamar a couple weeks ago.


___
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] Disabling SiteAccess/SiteRoot ..

2000-11-04 Thread Bill Welch

Try this:

http://www.your-site.com/full/path/site-root/_SUPPRESS_SITEROOT/manage

On Sat, 4 Nov 2000, [Windows-1252] Jørgen Skogstad wrote:

 Of course I did something wrong. ;) I need to disable the SiteRoot


___
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] newbie

2000-11-04 Thread Bill Welch

New security measure in 2.2 - you only login as superuser (with the name
and the password the install script gave you) long enough to create
another user as manager. Out of the box, Zope doesn't use OS
security. Also look at zpasswd.py.

 tutorial, I get a message something like superuser cannot own object.


___
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] how do I get rid of 'ghost' objects in Data.fs

2000-10-31 Thread Bill Welch

I had a similar problem a month ago with PTK and ZDiscussions and I
consider this to be corruption of the ZODB not related to the particular
products. You might be able to fix it by going into the DB directly
through python;

stop zope 

start python in zope/lib/python

'import Zope, ZServer; root = Zope.app(); dir(root)' and dig around from
there

I didn't know that trick at the time, so I fixed it by:

exporting my objects from the root folder (fortunately, I'm virtual
hosting and I only had to export a couple of folders)

stopping zope

replacing Data.fs with Data.fs.in

starting zope

importing my objects


On Tue, 31 Oct 2000, Tony McDonald wrote:

 Hi all,
 I've been trying to install EventFolder into a Zope 2.2.1 system. 
 I've followed the instructions (I wouldn't be writing here if I 
 hadn't! :) and keep getting an error message;
 
   Error type:  Could not load oid 
 ÷, pickled data in traceback info maycontain clues
   Error value: None
 


___
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] ssl w/ modrewrite

2000-10-30 Thread Bill Welch

Please say what Port, Listen, and VirtualHost directives you have in
place. I think that's really where the trouble.

On Sun, 29 Oct 2000 [EMAIL PROTECTED] wrote:

 but it works as typed in the server withour CRs.) I added modssl, but
 when I go in on an https I get the original apache root page, and can
 only access zope at https://address/cgi-bin/Zope . Furthermore, since


___
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] Z2.log question

2000-10-19 Thread Bill Welch

The classic unix trick for emptying a open file is

cp /dev/null Z2.log

On Thu, 19 Oct 2000, George Osvald wrote:

 Can I safely delete Z2.log file and replace it with an empty one?


___
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] Fw: mysqldb

2000-10-13 Thread Bill Welch

In Debian, this library is in a separate packge.

On Fri, 13 Oct 2000, Dale Lance wrote:

 anyone know where mysqlclient is supposed to be?


___
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] ZODB question: get older object versions without undo

2000-10-10 Thread Bill Welch

A work around is to pack the DB regularly
(Control_Panel/Database_Management).

On Tue, 10 Oct 2000, Philipp Auersperg wrote:

 2.Is it possible ( or will be ) to define ZODB objects for which updates are done by 
overwriting


___
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] improvement to ZEO/Zope how-to

2000-10-05 Thread Bill Welch

Thanks, kedai, for putting this together - it really helped.
Now for an improvement - please note that custom_zodb.py needs
to go in INSTANCE_HOME, which is not necessarily the same as
the Zope installation directory.


___
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] 'Offline' mailhost

2000-10-04 Thread Bill Welch

Techniques for effeciently sending a message to a large number of
recipients are covered extensively in majordomo documentation -
www.greatcircle.com/majordomo. Also check out
ftp://cs.utk.edu/pub/moore/bulk_mailer

Bill.

On Wed, 4 Oct 2000, Chris Withers wrote:

  Also you could send just one message to all the recipients instead of
  sending individual messages.
 
 Urm, they could be pretty unfriendly mail messages if they're being sent
 to a coupla thousand people. The bandwidth dcoming out of your server
 alone would be far higher than it needed to be :-(


___
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] Re: [Zope-PTK] Cannot import DemoPortal.zexp

2000-09-22 Thread Bill Welch

Bet you can't import Wizard.zexp either and the traceback shows the
identical pickled data.

I'm battling a very similar problem and so far I think it's subtle
corruption of the ZODB having to do with ZDiscussion. Note that the
pickled data contains references to ZDiscussion. The pickled data in my
traceback also contains references to ZDiscussion, although it's a
different oid (\023w) and, therefore, record. There're no ZDiscussion
records in DemoPortal.zexp or Wizard.zexp.

At one point, after the nth time removing and reinstalling ZDBase, etal;
DemoPortal and Wizard appeared *without me importing them*. I removed and
reinstalled everything one more time (bad move!). DP and W disappeared and
now import gives Duplicate Class Id.

I think your import actually worked, but ran over somehow and crashed
before the prodcuts could be registered.

I'm in the midst of analyzing my Data.fs. Fsrecover doesn't find any
problems. Tranalyzer has a couple of bugs with versions that I'm working
through. I'll let you know.

Bill.

On Fri, 22 Sep 2000 [EMAIL PROTECTED] wrote to zope-PTK:

   File /usr/local/zope/lib/python/ZODB/Connection.py, line 154, in __getitem__
 (Info: ('\000\000\000\000\000\000\034\315',
 
'(cExtensionClass\012ExtensionClass\012q\001(U\006ZDItemq\002(cZClasses.ZClass\012PersistentClass\012q\003cProducts.ZDBase.ZDiscussions\012ZDItem\012q\004cOFS.SimpleItem\012SimpleItem\012q\005tq\006}q\007(U\004iconq\010UWControl_Panel/Products/ZDiscussion
 
s/ZDTopic/propertysheets/methods/ZDItem%20/ziconImageq\011U\012_p_changedq\012K\001U\007__doc__q\013U\021ZDiscussions
 
Itemq\014U\006_p_oidq\015U\010\000\000\000\000\000\000\002Lq\016U\011meta_typeq\017U\021ZDiscussions
 
Itemq\020U\016propertysheetsq\021(U\010\000\000\000\000\000\000\034\320q\022(NU\010\000\000\000\000\000\000\034\314q\023Qtq\024tq\025QU\012index_htmlq\026cZClasses.Method\012MW\012q\027NRq\030}q\031U$_ZClassMethodPermissionMapperMethod_q\032(U\010\000\000
 
\000\000\000\000\034\321q\033(U\016OFS.DTMLMethodq\034cOFS.DTMLMethod\012DTMLMethod\012q\035tq\036tq\037QsbU\016manage_optionsq
 
(}q!(U\005labelqquot;U\012Propertiesq#U\006actionq$U\025manage_propertiesFormq%u}qam!
 !
 
p;(U\005labelq\'U\010Securityq(U\006actionq)U\015manage_accessq*u}q+(h\'U\004Viewq,h)U\012index_htmlq-utq.U\012ziconImageq/(U\010\000\000\000\000\000\000\034\322q0(U\011OFS.Imageq1cOFS.Image\012Image\012q2tq3tq4QU\022__ac_permissions__q5)U\011_p_serialq6U
 
\010\0030\226a\274;\204\314q7U\012__module__q8U\031*73biqpAI2QDa2iKPitv57g==q9utq:t.N.'))
 Could not load oid Í, pickled data in traceback info may contain
 clues: (see above)
 
 --



___
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] How do I connect to a db from a PythonMethod?

2000-09-20 Thread Bill Welch

I have this in an ExternalMethod and it works fine:

  import MySQLdb
  conn = MySQLdb.Connection(user='', passwd='y', db='zzz')

In a PythonMethod, it fails because of the import restriction. What's the
easiest way to get around this. I'm not getting anything out of the
documentation in PythonMethods/ModuleSecurityInfo because it never says
where the code snippets should actually go.


___
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] ANN: Serving PHP/Perl from Zope update

2000-09-07 Thread Bill Welch

Last bug. Promise.

# user might not have signed in yet
try:
  username, password = req._authUserPW()
except:
  username = password = None




___
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] ANN: Serving PHP/Perl from Zope update

2000-09-06 Thread Bill Welch

I had to dig a level deeper to support phorum (www.phorum.org), a PHP
message board app.  Here's my update to handle cookies, redirection, POST
variables, and relative links. I'm new to python, so if I've done anything
awkwardly, please let me know the more elegant way. 

First, a patch to Client.py - first part doesn't die on redirects and
returns (instead of raising 'Redirect') so cookies and base can be set,
second part opens a hole to pass headers into Client (for cookies)

224c224
 if ec==200: return (headers,response)
---
 if ec==200 or ec==302: return (headers,response)
342,344c342,344
 def call(url,username=None, password=None, **kw):
 
 return apply(Function(url,username=username, password=password), (), kw)
---
 def call(url,username=None, password=None, headers={}, **kw):
 F = apply(Function, (url, (), None, username, password, None), headers)
 return apply(F, (), kw)

Then there's the rewrite of the code in the how-to. Here's the whole thing
(I use just one .py)

site = 'http://www.carbonecho.com/zforum'

from string import join
def DirectToPHP( self ):
if self.REQUEST.path:
# Build up a list of what is contained in self.REQUEST.path since
# you are going to redirect the user to /PHPContent/index_html. Start
# by adding the way you can access the PHP tree outside of Zope
originalRequestPath = [site]
# keep the original path to override base when serving
origPath = []
# is the user asking for a php script?
if self.REQUEST.path[0][-4:] == '.php': # I use .php, not .php3

# pop paths of REQUEST.path until its empty
while self.REQUEST.path:
# Remember the path components before you pop them
# hang on to passed in path to set as base when served
originalRequestPath.append( self.REQUEST.path[-1] )
origPath.append( self.REQUEST.path[-1] )
self.REQUEST.path.pop()

# Create a full url to pass to index_html
phpScript = join( originalRequestPath, '/' )
origScript = join( origPath, '/' )
# Is there a query string being passed to the script also?
if self.REQUEST.environ.has_key('QUERY_STRING'):
phpScript = phpScript + '?' + self.REQUEST.environ['QUERY_STRING']
origScript = origScript + '?' + self.REQUEST.environ['QUERY_STRING']

# self.REQUEST.path is now empty so the user is going to be
# directed to /forum/index_html. That method needs to
# know what the original request is, so pass it a REQUEST
# variable
self.REQUEST.set('phpScript', phpScript)
self.REQUEST.set('origScript', origScript)
# you also may want to redirect image requests to the PHP tree
elif self.REQUEST.path[0][-3:] in ['gif', 'png', 'jpg']:
originalRequestPath = [site]
while self.REQUEST.path:
originalRequestPath.append(self.REQUEST.path[-1])
self.REQUEST.path.pop()

# This is an image, so give it to a DTMLMethod that will
# just serve up images
self.REQUEST.path.append('ServeImage')
self.REQUEST.set('imagePath', join(originalRequestPath, '/'))

from ZPublisher import Client
from string import split

def ServePHP(self, username=None, password=None):
req = self.REQUEST

if req.environ.has_key('HTTP_COOKIE'):
headers = {'Cookie' : req.environ['HTTP_COOKIE']}
else:
headers = {}

if req.environ['REQUEST_METHOD'] == 'POST':
rTuple =  apply(Client.call, (req['phpScript'], username, password, headers), 
req.form)
else:
rTuple = Client.call(req['phpScript'], username, password, headers)

resp = req['RESPONSE']
for cookie in rTuple[0].getallmatchingheaders('Set-Cookie'):
cookie = cookie[:-1]
apply(resp.setHeader, split(cookie, ':', 1))

# not a particularly strong test, maybe Client should pass back status 
if rTuple[0].has_key('location'):
# override base so that relative references work
resp.base = rTuple[0]['location']
raise 'Redirect', resp.base

#override base so that relative references work
resp.base = 'http://www.carbonecho.com/forum/' + req['origScript']

return rTuple[1]

from ZPublisher import Client

def ServeImage(self):
return Client.call(self.REQUEST['imagePath'])[1]




___
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] ANN: Serving PHP/Perl from Zope update

2000-09-06 Thread Bill Welch

Got authorization to work!

First, another patch to Client.py to raise 'Unauthorized' when 401 is
returned by PHP/Perl:

after line that starts with

   if ec==200

add

   if ec==401:
  raise 'Unauthorized'

Second, numerous changes to the external method that makes the request and
receives the response. Here's the whole thing

def ServePHP(self):
req = self.REQUEST
(username, password) = req._authUserPW()

headers = {}
if req.environ.has_key('HTTP_COOKIE'):
headers = {'Cookie' : req.environ['HTTP_COOKIE']}
if req.environ.has_key('HTTP_USER_AGENT'):
headers = {'User-Agent' : req.environ['HTTP_USER_AGENT']}

if req.environ['REQUEST_METHOD'] == 'POST':
rTuple =  apply(Client.call, (req['phpScript'], username, password, headers), 
req.form)
else:
rTuple = Client.call(req['phpScript'], username, password, headers)

resp = req['RESPONSE']
# the first element of the return tuple is dervied from rfc822
for cookie in rTuple[0].getallmatchingheaders('Set-Cookie'):
cookie = cookie[:-1] # remove \n - is there an idiom for this?
apply(resp.setHeader, split(cookie, ':', 1))

# not a particularly strong test, maybe Client should pass back status
if rTuple[0].has_key('location'):
# override base so that relative references work
resp.base = rTuple[0]['location']
raise 'Redirect', resp.base

#override base so that relative references work
resp.base = 'http://www.carbonecho.com:10080/forum/' + req['origScript']

return rTuple[1]



___
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] ANN: Serving PHP/Perl from Zope update

2000-09-06 Thread Bill Welch

oops!

that should be

username, password = req._authUserPW()




___
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] ANN: Serving PHP/Perl from Zope update

2000-09-06 Thread Bill Welch

oops, again :-(

headers = {}
if req.environ.has_key('HTTP_COOKIE'):
headers['Cookie'] = req.environ['HTTP_COOKIE']
if req.environ.has_key('HTTP_USER_AGENT'):
headers['User-Agent'] = req.environ['HTTP_USER_AGENT']

Also on my member page - http://zope.org/Members/billw/morePHP



___
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] Ad banners in Zope anyone ?

2000-09-05 Thread Bill Welch

Check out the How-To athttp://www.zope.org/Members/Mamey/PHP. Doesn't
handle redirection, authorization, or cookie passing, but it's a
start. If you need the above mentioned features, I'll be posting my update
by the end of the week.

Bill.

On Sat, 2 Sep 2000, Jason Cunliffe wrote:

 - Can one run PHP from inside of Zserver/ZODB easily?
 - How would to do that?
 - Is anyone using Zope for Ad Banner services??
 - What would would make it a good or bad choice?


___
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 redirect of an url in Python

2000-09-01 Thread Bill Welch

Both this one line python method:

raise 'Redirect', 'http://www.zope.org'

and this DTML method

dtml-raise type="Redirect"
http://www.zope.org
/dtml-raise

work.

P. S. the double quotes around Redirect in the DTML method are
significant. With single quotes, it shows up as an error named Redirect

Bill.

On Fri, 1 Sep 2000, Kapil Thangavelu wrote:

 in python you have to raise a redirect, search the lists for exact
 syntax 
 something along the lines of
 
   raise Redirect "url"


___
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] is dtml-unless someIndirectVariable possible ?

2000-08-27 Thread Bill Welch

Try

dtml-unless "_['myPropName']"






___
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] (no subject)

2000-08-14 Thread Bill Welch

I'm having trouble with nested dtml-in. The outer ZSQL returns the
coordinates of a zip code as zlat and zlong. The inner ZSQL takes
zlat and zlong as well as Range and Otype as arguments.  

When I run it I get
  Error Type: Bad Request
  Error Value: ['zlat', 'zlong']

If I hardwire the inner one with just zlat and zlong, I get
  Error Type: Bad Request
  Error Value: ['Range', 'Otype']

If I hardwire the inner one with all four keyword arguments it runs fine.

Here're the relevant lines from my DTML Doc:

dtml-in zipCoord
  dtml-var Rangedtml-var zlatdtml-var zlongdtml-var Otype
  dtml-in orgZipRadius

Trace line prints fine when all four arguments are hardwired or inner ZSQL
is commented out.

Bill.


___
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] Problem with nested dtml-in

2000-08-14 Thread Bill Welch

I'm having trouble with nested dtml-in. The outer ZSQL returns the
coordinates of a zip code as zlat and zlong. The inner ZSQL takes
zlat and zlong as well as Range and Otype as arguments.  

When I run it I get:
  Error Type: Bad Request
  Error Value: ['zlat', 'zlong']

If I hardwire the inner one with just zlat and zlong, I get:
  Error Type: Bad Request
  Error Value: ['Range', 'Otype']

If I hardwire the inner one with all four keyword arguments it runs fine.

Here're the relevant lines from my DTML Doc:

dtml-in zipCoord
  dtml-var Rangedtml-var zlatdtml-var zlongdtml-var Otype
  dtml-in orgZipRadius

Trace line prints fine when all four arguments are hardwired or inner ZSQL
is commented out.

Bill.



___
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] Can't get ZClient to work, zope 2.2.0

2000-08-11 Thread Bill Welch

hit http://zope.carbonecho.com/forum/sepServe to see the error
('expecting read-only buffer...')

here's the external function:

from ZPublisher import Client

def ServePHP(url='http://www.yahoo.com', username='bill', password='xyz'):
print 'Sep Serving ' + str(url) 
return Client.call(url, username, password) [1]






___
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 )