[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/ integrate Z3 ZPT into Z2

2005-12-08 Thread Andreas Jung
Log message for revision 40643:
  integrate Z3 ZPT into Z2
  

Changed:
  A   Zope/branches/ajung-zpt-integration/

-=-
Copied: Zope/branches/ajung-zpt-integration (from rev 40642, Zope/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/ integrate Z3 ZPT into Z2

2005-12-08 Thread Jim Fulton

That was quick. Go Andreas!

Andreas Jung wrote:

Log message for revision 40643:
  integrate Z3 ZPT into Z2
  


Changed:
  A   Zope/branches/ajung-zpt-integration/

-=-
Copied: Zope/branches/ajung-zpt-integration (from rev 40642, Zope/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins



--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ quick'n dirty Z3 ZPT integration, we can edit and render....

2005-12-08 Thread Andreas Jung
Log message for revision 40645:
  quick'n dirty Z3 ZPT integration, we can edit and render
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt

-=-
Modified: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-08 20:07:43 UTC (rev 40644)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-08 20:36:03 UTC (rev 40645)
@@ -21,19 +21,48 @@
 from Globals import DTMLFile, ImageFile, MessageDialog, package_home, 
Persistent
 from zLOG import LOG, ERROR, INFO
 from OFS.SimpleItem import SimpleItem
+import AccessControl
 from AccessControl import getSecurityManager
 
 from zope.pagetemplate.pagetemplate import PageTemplate 
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 
-class ZPT(PageTemplate):
+class ZPT(SimpleItem, PageTemplate):
 Zope wrapper for Page Template using TAL, TALES, and METAL
 
 meta_type = 'ZPT'
 
+manage_options = (
+{'label':'Edit', 'action':'pt_editForm',
+ 'help': ('PageTemplates', 'PageTemplate_Edit.stx')},
+{'label':'Test', 'action':'ZScriptHTML_tryForm'},
+) \
++ SimpleItem.manage_options \
+
+security = AccessControl.ClassSecurityInfo()
+
 def __init__(self, id, text=None, content_type=None):
 self.id = str(id)
 
+security.declareProtected('View', '__call__')
+security.declareProtected('View', 'view')
+def view(self):
+view 
+return self()
+
+security.declareProtected('Change Page Templates',
+  'pt_editAction', 'pt_setTitle', 'pt_edit',
+  'pt_upload', 'pt_changePrefs')
+def pt_editAction(self, REQUEST, title, text, content_type, expand):
+Change the title and document.
+
+print text
+print content_type
+self.pt_edit(text, content_type)
+message= 'done'
+return self.pt_editForm(manage_tabs_message=message)
+
+
 pt_editForm = PageTemplateFile('www/ptEdit', globals(),
__name__='pt_editForm')
 

Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt   
2005-12-08 20:07:43 UTC (rev 40644)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt   
2005-12-08 20:36:03 UTC (rev 40645)
@@ -10,7 +10,7 @@
 button.
 /p
 
-form action=manage_addPageTemplate method=post 
+form action=manage_addZPT method=post 
  enctype=multipart/form-data
 table cellspacing=0 cellpadding=2 border=0
   tr

Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt  
2005-12-08 20:07:43 UTC (rev 40644)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt  
2005-12-08 20:36:03 UTC (rev 40645)
@@ -39,8 +39,10 @@
 /div
 /td
 td align=left valign=top colspan=2
+!--
   a href=source.html tal:condition=here/htmlBrowse HTML source/a
   a href=source.xml tal:condition=not:here/htmlBrowse XML source/a
+--
   br
   input type=hidden name=expand:int:default value=0
   input type=checkbox value=1 name=expand:int
@@ -49,6 +51,8 @@
 /td
   /tr
 
+  span tal:content=python: context.pt_errors(None) /
+!--
   tr tal:define=errors here/pt_errors tal:condition=errors
 tal:block define=global body python:here.document_src({'raw':1})/
 td align=left valign=middle class=form-labelErrors/td
@@ -57,6 +61,7 @@
 pre tal:content=python:modules['string'].join(errors, '\n')errors/pre
 /td
   /tr
+--
 
   tr tal:define=warnings here/pt_warnings tal:condition=warnings
 td align=left valign=middle class=form-labelWarnings/td

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Re: zLOG deprecation?

2005-12-08 Thread Chris Withers

Philipp von Weitershausen wrote:


See below :). Of course, you don't have to deprecate zLOG instantly.


How else do you stop people still following the old patterns ;-)


I'm happy to sign up for this, but can't promise when it'll happen...


So let's schedule it for Zope 2.10 then :).


OK, I promise, I will try, even if only to stop Jens whining ;-)


and the custom zLOG logging level constants could
be wrapped in a deprecation warnings (zope.deprecation.deprecate)


How would I do this? Can you give me an example?


Use the doctests, Luke :). Anyway, here's an example:
http://svn.zope.org/Zope3/trunk/src/zope/i18nmessageid/__init__.py?rev=39525view=auto

It shows how to wrap stuff in deprecation proxies using 
zope.deprecation.deprecate(). Then
any access to these objects (e.g. importing) will trigger a warning. It also 
demonstrates
how to temporarily turn off those deprecation warnings, for example when you're 
using
deprecated stuff for internal use, such as still supporting old import 
locations (as in
this case).


Great, that's the bit I was looking for...

OK, I will try, but I can't make any definite problems. I'll take a 
branch of the trunk and get going on it, but if anyone else is thinking 
of adding new code that uses zLOG, please don't ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Tracking long-running requests

2005-12-08 Thread Chris Withers

Sidnei da Silva wrote:

On Wed, Dec 07, 2005 at 10:13:36PM +0100, Dieter Maurer wrote:
| And, as we speak about replacing Zope2's ZPublisher
| by Zope3's Publisher, the old Zope2 ZPublisher will
| probably not grow such hooks any more -- but hopefully,
| the Zope3 Publisher will signal corresponding events.

It already fires events at those places, if I'm not mistaken.


It being Zope 2 or Zope 3's publisher?

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Tracking long-running requests

2005-12-08 Thread Sidnei da Silva
On Thu, Dec 08, 2005 at 09:23:47AM +, Chris Withers wrote:
| Sidnei da Silva wrote:
| On Wed, Dec 07, 2005 at 10:13:36PM +0100, Dieter Maurer wrote:
| | And, as we speak about replacing Zope2's ZPublisher
| | by Zope3's Publisher, the old Zope2 ZPublisher will
| | probably not grow such hooks any more -- but hopefully,
| | the Zope3 Publisher will signal corresponding events.
| 
| It already fires events at those places, if I'm not mistaken.
| 
| It being Zope 2 or Zope 3's publisher?

Does any released Zope 2 version have events support?

Obviously it == Zope 3.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope tests: 8 OK

2005-12-08 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Wed Dec  7 12:01:01 2005 UTC to Thu Dec  8 12:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:13:24 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003738.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:14:54 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003739.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:16:24 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003740.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:17:54 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003741.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:19:24 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003742.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:20:54 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003743.html

Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:22:24 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003744.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Wed Dec  7 22:23:54 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003745.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Logging changes in ZEO break zeoup.py

2005-12-08 Thread Jens Vagelpohl

Hi all,

In Zope 2.7 I'm using zeoup.py to check on a ZEO server. This script  
can be run from anywhere as long as the PYTHONPATH is set correctly.


For Zope 2.8.4, the ZEO logging has been switched to use the logging  
module. This leads to an error when running zeoup.py now:



CRITICAL - zeoup status 1: No handlers could be found for logger  
ZEO.zrpc.Connection(C)

ClientDisconnected


Can anyone advise me how to make this work under Zope 2.8.4?

jens

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Logging changes in ZEO break zeoup.py

2005-12-08 Thread Tim Peters
[Jens Vagelpohl]
 In Zope 2.7 I'm using zeoup.py to check on a ZEO server. This script
 can be run from anywhere as long as the PYTHONPATH is set correctly.

 For Zope 2.8.4, the ZEO logging has been switched to use the logging
 module. This leads to an error when running zeoup.py now:

 
 CRITICAL - zeoup status 1: No handlers could be found for logger
 ZEO.zrpc.Connection(C)
 ClientDisconnected
 

The logging module is just trying to drive you mad by saying someone
is _trying_ to log a CRITICAL problem, but I'm not going to show it to
you.  This is an informative msg, not an exception.  It looks like
you've got pieces of stdout and stderr scrambled together there, BTW.

 Can anyone advise me how to make this work under Zope 2.8.4?

I expect zeoup.py needs to be changed.  I did a similar thing for
runzeo.py some time ago, and I bet the latter's
setup_default_logging() method could be mostly reused.

To get unstuck quickly, try adding just this:

import logging
logging.basicConfig()

That always helps me in a pinch, but I never understood why (neither
why logging insists that you call _something_ before it will stop
annoying you, nor why the docs that seem to claim that logging will
itself call basicConfig() (if you don't) appear to be telling fibs).
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Logging changes in ZEO break zeoup.py

2005-12-08 Thread Jens Vagelpohl


On 8 Dec 2005, at 22:57, Tim Peters wrote:

To get unstuck quickly, try adding just this:

import logging
logging.basicConfig()

That always helps me in a pinch, but I never understood why (neither
why logging insists that you call _something_ before it will stop
annoying you, nor why the docs that seem to claim that logging will
itself call basicConfig() (if you don't) appear to be telling fibs).



Thanks a lot Tim, I'll try that tomorrow!

jens

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] Re: zdsock

2005-12-08 Thread John Poltorak
On Wed, Dec 07, 2005 at 09:02:11AM -0500, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Chris Withers wrote:
  Tres Seaver wrote:
  
  You have confused the server socket (which is set in the http-server
  section) with the daemon control socket (set in runner in the
  zeo.conf file;  not currently settable in zope.conf).  The control
  socket has to be a Unix-domain socket.  John is asking to surface an
  existing zdaemon feature (already used in zeo.conf) within zope.conf.
  
  
  Ah, okay. How does this work on windows?
 
 zdaemon / zopectl *don't* work on windows.
 
  What's wrong with the default name?
 
 Th the original poster's case, his OS requires that Unix-domain sockets
 have mangled names.

All I'm asking for at the moment is how to take advantage of what are 
supposed to be existing options of setting the socket name to something 
other than the default 'zdsock'.

Presumably someone created the the '-s' option to zdctl for exactly this 
purpose.

 
 
 Tres.
 - --
 ===
 Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.1 (GNU/Linux)
 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
 iD8DBQFDlutj+gerLs4ltQ4RAic1AJ9wJJp10xx/HJnPbKaRYNHtM05VvACgmyem
 6w5fCXtXVKkdbTLYLMPjgBU=
 =rhQt
 -END PGP SIGNATURE-


-- 
John



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


Re: [Zope] Erase acl_users

2005-12-08 Thread Infor Gates
There is zpasswd.py in the bin directory. Use it to
create an emergency user.

Good luck.

--- [EMAIL PROTECTED] wrote:

 Hello,
 I have a problem. I erase object acl_users in root
 directory and now I can´t login in zope. Zope have
 site error on http://locahost:8080/
 
 An error was encountered while publishing this
 resource. 
 
 Error Type: AttributeError
 Error Value: acl_users
 
 it´s possible create object acl_users?
 
 Hlavounek
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] dtml-tree (urlparam)

2005-12-08 Thread Ulla Theiss

Dear list,

many thanks for the link to a little bit more documentation of 
dtml-tree. Unfortunately the parameter of interest (urlparam - Since 
Zope 2.2??) is not mentioned there.


Meanwhile I found in the Zope-Bible (Chapter 4, Page 115): The use of 
this attribute [urlparam] is somewhat limited because Zope simply passes 
along whatever string you specify as the value for the urlparam 
attribute. Expressions, and therefore the dynamic insertion of 
variables, are not possible with this attribute under the current 
version of Zope.  ;-(


The first question is clear now, but the second one becomes more and 
more important:


Does anybody have an idea to work around the problem?

Again, many, many thanks in advance,
Ulla.


Jonathan wrote:


Have you looked at this:

http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.15.html


Jonathan

- Original Message - From: Ulla Theiss [EMAIL PROTECTED]
To: Zope Mailing List zope@zope.org
Sent: Wednesday, December 07, 2005 4:50 PM
Subject: [Zope] dtml-tree (urlparam)



Dear list,

I have a problem using dtml-tree.

The page which contains a dtml-tree should show a dynamic parameter, 
passed with to url calling the dtml-tree-page.


page_with_dtml_tree?myparam=yup

Before expanding or collapsing the tree, everything works fine.

But if I expand or collapse it, this parameter is forgotten.

I found the dtml-tree-parameter urlparam, which is included in the 
expanding and collapsing widget links.

dtml-tree urlparam=myparam=abc

This works fine with hard coded strings.

* But my string is dynamic! *
How can I pass it?

dtml-tree urlparam=myparam=dtml-var myparam produced  
syntax-errors.


Has somebody an idea, how to pass it - or how to work around the 
problem?


Many thanks in advance,
Ulla.


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







___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: zdsock

2005-12-08 Thread Chris Withers

Tres Seaver wrote:

Ah, okay. How does this work on windows?



zdaemon / zopectl *don't* work on windows.


oh, my OS is broken *schniff*


What's wrong with the default name?


Th the original poster's case, his OS requires that Unix-domain sockets
have mangled names.


...and so is his ;-)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Adding TextIndexNG 3.1.1 error

2005-12-08 Thread Chris Withers

Tres Seaver wrote:

Talking of 2.8.5...how about a 2.8.5 release before X-mas (around
December, 20th)?


+1.


+1 too :-)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Hooks for methods other than GET/POST on port 80?

2005-12-08 Thread Chris Withers

Roman Susi wrote:
Even if it is in my code, it is still too bad to get down the whole Zope 
server. Also, it was confirmed as a bug.


Where and who by?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Erase acl_users

2005-12-08 Thread Chris Withers

[EMAIL PROTECTED] wrote:

Hello,
I have a problem. I erase object acl_users in root directory and now I can´t 
login in zope. Zope have site error on http://locahost:8080/

An error was encountered while publishing this resource. 


Error Type: AttributeError
Error Value: acl_users

it´s possible create object acl_users?


Yes, read doc/SECURITY.TXT in your Zope software home, you need to set 
up and emergency user in an 'access' file...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Can HTTP and WebDAV share port 80?

2005-12-08 Thread Max M

Michael Dexter wrote:


Hello,

It appears that Apache and IIS put both HTTP and WebDAV/HTTP traffic 
over the same port. Can Zope do the same? Why? Why not?


What I usually do is to create a RewriteRule in apache, that rewrites to 
the dav port.


RewriteRule ^/webdav(.*) 
http://localhost:1981/VirtualHostBase/http/www.example.com:80/plone_instance/VirtualHostRoot/_vh_webdav/$1 
[P,L]


So that the webdav port can be gotten to at:

http://www.example.com:80/webdav


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope 2.8.4 install on Suse

2005-12-08 Thread Harry Forster
Thanks to all for the very quick response to my request for help.  This is the 
backbone of the open source community.

I have been using Zope 2.6 on windows for years and wanted to update and move 
to a Suse 9.0 machine. I downloaded Zope 2.8.4-final tgz.

I originally had Python 2.4 but switched to Python 2.3.5 after reading the 
Zope notes. When I did the configure, make, install for Zope I got the 
message:

The Python interpreter you are using does not appear to have the 'zlib'
library module installed.  For Zope to be able to run, you must install a
Python interpreter which includes the zlib module, or install the zlib library
into your Python interpreter manually.  The file which represents the library
is named 'zlib.so' (UNIX) or 'zlib.dll' (Windows) and is typically located in
the 'lib-dynload' directory of your Python's library directory.  Some
Python packagers ship the zlib module as a separate installable binary. If you
are using a system-provided Python installation, you may want to look for
a 'python-zlib' package (or something like it) and install it to make the
Python zlib module available to Zope.

This lead me to believe that I needed to install zlib which I did.  This lead 
to the same message.  I then found that what I may need is zlib-devel.  I had 
Python-zlib_2.2. I could not find a zlib-devel to match it nor a zlib to 
match the zlib to match the zlib-devels that I could find.  

I decided that the problem really lay with Python so I changed to 
ActivePython-2.4.2-248.  Same message.  There appears to be a disconnect 
between Python, Zope, and Suse.

I have Zope 2.6.0 running on the same machine but this is what I have on 
windows.  I am very content to stay with 2.6.0 and get off of windows and 
onto Linux but feel it is time to upgrade.  Maybe I should just be happy with 
the exit from Windows.

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


Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Asad Habib
Hello. The PHP script that I use relies on a path to locate the HTML file 
on the file system and since the DTML document is a Zope object, it does 
not have access to that. I also tried using a Zope File object as well as 
a DTML document that is part of a Local File System. Using a Zope File 
object does not work since the ouput of a rendered DTML document is text 
and providing the PHP script a Zope File filled with plain text does not 
work. The same goes for a DTML document that is part of a Local File 
System, once the document is rendered it is plain text.


- Asad


On Thu, 8 Dec 2005, Robert (Jamie) Munro wrote:


Asad Habib wrote:


Hello. I have a DTML document which contains some DTML, but mostly HTML. I
want to save the HTML contents of this DTML document once it is rendered by 
Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. this 
document will only contain HTML offcourse and must be since it will be used 
by a PHP script). Is there a way to do this so every time the former 
changes, the latter is updated as well? Any help would be appreciated. 
Thanks.


How does the PHP read the file? Why can't PHP read the file through the web, 
where it will be rendered.


Robert Munro

Ps. ZPT is a replacement for DTML, and is no help with your problem.



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Robert (Jamie) Munro

Asad Habib wrote:

Hello. The PHP script that I use relies on a path to locate the HTML 
file on the file system and since the DTML document is a Zope object, 
it does not have access to that. I also tried using a Zope File object 
as well as a DTML document that is part of a Local File System. Using 
a Zope File object does not work since the ouput of a rendered DTML 
document is text and providing the PHP script a Zope File filled with 
plain text does not work. The same goes for a DTML document that is 
part of a Local File System, once the document is rendered it is plain 
text.


Normally in PHP if you replace the file path with a URL starting http:// 
(or ftp:// etc.) it will fetch the file from the web instead of the file 
system, no problem.


Robert Munro

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Jonathan
if you want to create an html file on the file system (which is a rendered 
version of a dtml method), you could use something like wget 
(http://www.gnu.org/software/wget/wget.html).  Give wget the url to the dtml 
method and it will create an html file on the filesystem (which you can then 
access via your php routines). You could even create an external method 
which invokes wget - you could then call this external method from the same 
routine which creates/modifies your dtml method, so that the html file on 
the file system stays in sync with the dtml method.


hth

Jonathan

- Original Message - 
From: Asad Habib [EMAIL PROTECTED]

To: Robert (Jamie) Munro [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Thursday, December 08, 2005 9:34 AM
Subject: Re: [Zope] Saving a Rendered DTML Document


Hello. The PHP script that I use relies on a path to locate the HTML file 
on the file system and since the DTML document is a Zope object, it does 
not have access to that. I also tried using a Zope File object as well as 
a DTML document that is part of a Local File System. Using a Zope File 
object does not work since the ouput of a rendered DTML document is text 
and providing the PHP script a Zope File filled with plain text does not 
work. The same goes for a DTML document that is part of a Local File 
System, once the document is rendered it is plain text.


- Asad


On Thu, 8 Dec 2005, Robert (Jamie) Munro wrote:


Asad Habib wrote:

Hello. I have a DTML document which contains some DTML, but mostly HTML. 
I
want to save the HTML contents of this DTML document once it is rendered 
by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. 
this document will only contain HTML offcourse and must be since it will 
be used by a PHP script). Is there a way to do this so every time the 
former changes, the latter is updated as well? Any help would be 
appreciated. Thanks.


How does the PHP read the file? Why can't PHP read the file through the 
web, where it will be rendered.


Robert Munro

Ps. ZPT is a replacement for DTML, and is no help with your problem.



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




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z-2.8.4 Install trouble on RedHat Enterprise 3

2005-12-08 Thread Sam Moore


On Dec 7, 2005, at 3:10 PM, Dieter Maurer wrote:


Sam Moore wrote at 2005-12-6 16:59 -0500:

...

copying zope/component/tests/__init__.py - myhomedirectory/
Zope-2.8.4-final/build-base/python-2.4/build-lib/zope/component/ 
tests
error:myhomedirectory/Zope-2.8.4-final/build-base/python-2.4/ 
build-

lib/zope/component/tests/__init__.py: Operation not permitted


Apparently, copying zope/component/tests/__init__.py
to myhomedirectory/Zope-2.8.4-final/build-base/python-2.4/build-
lib/zope/component/tests/__init__.py
fails.


Well no, actually - the file gets copied! i checked.
But make stops at that point.


It is likely that the copying process wants to modify permissions
and/or access times and that this raises the Operation not permitted
error.


That sounds reasonable, but if I'm root (or the owner of the  
directory, for that matter) at the time I run make, what else can I  
do to get out of it?


Does the whole directory need to be world-writable?



--
Dieter



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Asad Habib

Hello. Thanks for your input. I tried doing this but it didn't work.

- Asad


On Thu, 8 Dec 2005, Robert (Jamie) Munro wrote:


Asad Habib wrote:

Hello. The PHP script that I use relies on a path to locate the HTML file 
on the file system and since the DTML document is a Zope object, it does 
not have access to that. I also tried using a Zope File object as well as a 
DTML document that is part of a Local File System. Using a Zope File object 
does not work since the ouput of a rendered DTML document is text and 
providing the PHP script a Zope File filled with plain text does not work. 
The same goes for a DTML document that is part of a Local File System, once 
the document is rendered it is plain text.


Normally in PHP if you replace the file path with a URL starting http:// (or 
ftp:// etc.) it will fetch the file from the web instead of the file system, 
no problem.


Robert Munro



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z-2.8.4 Install trouble on RedHat Enterprise 3

2005-12-08 Thread Sam Moore


On Dec 8, 2005, at 9:51 AM, Sam Moore wrote:



On Dec 7, 2005, at 3:10 PM, Dieter Maurer wrote:


Sam Moore wrote at 2005-12-6 16:59 -0500:

...

copying zope/component/tests/__init__.py - myhomedirectory/
Zope-2.8.4-final/build-base/python-2.4/build-lib/zope/component/ 
tests
error:myhomedirectory/Zope-2.8.4-final/build-base/python-2.4/ 
build-

lib/zope/component/tests/__init__.py: Operation not permitted


Apparently, copying zope/component/tests/__init__.py
to myhomedirectory/Zope-2.8.4-final/build-base/python-2.4/ 
build-

lib/zope/component/tests/__init__.py
fails.


Well no, actually - the file gets copied! i checked.
But make stops at that point.


It is likely that the copying process wants to modify permissions
and/or access times and that this raises the Operation not  
permitted

error.


That sounds reasonable, but if I'm root (or the owner of the  
directory, for that matter) at the time I run make, what else can I  
do to get out of it?


Does the whole directory need to be world-writable?


Just answered my own question - this doesn't help.





--
Dieter



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



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope refusing to serve our large files (180M+)

2005-12-08 Thread Chris Wilton
Hi all,

Sure someone's probably come across something similar, but I couldn't
find anything in the archives: our zope is refusing to allow download
of files greater than around 170M through the http server. We have a
number of db dumpfiles we want people to be able to access. We are
running Zope 2.7.0 with an Apache front (reverse-proxy, as our zope is
on a non-standard port) on a linux2.4 kernel (mosix) with bags of
memory; the apache end is fine - the zope installation is local and I
am using the port number with all the same problems.

1) I can download a 170M file but not a 180M file through the http
server. With the larger file request we get a 500 error in the trace
log. The download box pops up but nothing is actually downloaded.

2) I can reach both through the ftp server but transfer rate is
ridiculous (1.7Kb/sec) for a University lan.

3) Even if I could find out why ftp transfer is so slow and sort it, I
seem unable to grant a non-manager read access to a LocalFS object:
the properties don't stick when I change them, and Zope creates the
link to the local directory with user Zope, group Zope, permissions
660, hence although managers can reach the files, nothing is reachable
for an 'anonymous' user (I created a special user for ftp and gave
only access to the specific directories, before you voice concerns!)

I don't know all the ins and outs of Zope and there's probably
something obvious I haven't done, but any help greatly appreciated,
it's been driving me mad. I guess another option is to use our apache
front for secure ftp access, but I wanted everything tidy, and besides
I don't have root privileges on the server.

Thanks in advance,
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope refusing to serve our large files (180M+)

2005-12-08 Thread Paul Winkler
On Thu, Dec 08, 2005 at 05:58:34PM +0200, Chris Wilton wrote:
 Hi all,
 
 Sure someone's probably come across something similar, but I couldn't
 find anything in the archives: our zope is refusing to allow download
 of files greater than around 170M through the http server. We have a
 number of db dumpfiles we want people to be able to access. We are
 running Zope 2.7.0 with an Apache front (reverse-proxy, as our zope is
 on a non-standard port) on a linux2.4 kernel (mosix) with bags of
 memory; the apache end is fine - the zope installation is local and I
 am using the port number with all the same problems.
 
 1) I can download a 170M file but not a 180M file through the http
 server. With the larger file request we get a 500 error in the trace
 log. The download box pops up but nothing is actually downloaded.

If there's a 500 error in the trace or access log, there should
be something in your error_log too.  Traceback please?
 
 2) I can reach both through the ftp server but transfer rate is
 ridiculous (1.7Kb/sec) for a University lan.

Very poor speed with blobs is a known problem with zope's built-in FTP
server.  Almost nobody ever spends any time improving zope's FTP
support, since so many of us never use it :-\

2.7.0 is getting quite old, so you might do well to look at the
changelog for more recent versions of zope and see if there's
any FTP-related improvements in there. I haven't been paying
attention to that.
 
 3) Even if I could find out why ftp transfer is so slow and sort it, I
 seem unable to grant a non-manager read access to a LocalFS object:
 the properties don't stick when I change them, 

LocalFS doesn't support properties at all AFAIK.

 and Zope creates the
 link to the local directory with user Zope, group Zope, permissions
 660, hence although managers can reach the files, nothing is reachable
 for an 'anonymous' user (I created a special user for ftp and gave
 only access to the specific directories, before you voice concerns!)

You're talking about Zope permissions and filesystem permissions
in the same sentence, and the two have *nothing* to do with 
each other, so I can't quite parse the above.
 
-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope refusing to serve our large files (180M+)

2005-12-08 Thread Chris Wilton
Hi, thanks for the reply.

  1) I can download a 170M file but not a 180M file through the
  http server. With the larger file request we get a 500 error in
  the trace log. The download box pops up but nothing is actually
  downloaded.

 If there's a 500 error in the trace or access log, there should
 be something in your error_log too.  Traceback please?

None. Zippo. Squat. I've turned on 'ALL' logging in zope.conf for all
logs. All I get is a simple entry in the Z2.log thus:
128.214.209.35 - cwilton [08/Dec/2005:18:38:46 +0300] GET
/dali/downloads/180M.tar HTTP/1.1 500 272  Opera/8.5 (X11; Linux
i686; U; en-GB)

And an equally unhelpful entry in the trace log:
--
2005-12-08T18:45:23 B 1131651340 2005-12-08T18:45:23 GET
/dali/downloads/180M.tar
--
2005-12-08T18:45:23 I 1131651340 2005-12-08T18:45:23 0
--
2005-12-08T18:45:24 A 1131651340 2005-12-08T18:45:24 500 272
--
2005-12-08T18:45:24 E 1131651340 2005-12-08T18:45:24
--

Nothing at all in our error log (stderr and stdout for zope process
redirected to logfile) or the event log.

Thanks for the advice on ftp; I might look at newer Zopes, but we'd
rather not have to use zope's ftp (for reasons including those you
pointed out), as our content should be reachable through the http
server; I'd rather tackle that problem.

 LocalFS doesn't support properties at all AFAIK.
Bummer. Anyhow, see above about wanting to avoid ftp...

  and Zope creates the link to the local directory with user Zope,
  group Zope, permissions 660 ...
 You're talking about Zope permissions and filesystem permissions
 in the same sentence ...
Sorry, that was a bit muddled, what I meant was when I list dir
contents using ftp, I see my LocalFS object listed there with 'owner'
Zope, 'group' Zope, and mods 660 as far as ftp is concerned. The
security settings in zope are the ones that I seem unable to change
for a LocalFS object. Well, they're clickable, but the changes don't
seem to stick. Again, bummer, but again, I was hoping it'd be
unnecessary...

Any obvious config settings I might be missing?

Thanks,
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope refusing to serve ... i am an idiot

2005-12-08 Thread Chris Wilton
Whoops. Sorry.
Error log tells me it's a 'no space left on device' error:

2005-12-08T19:33:30 ERROR(200) SiteError
http://ekhidna.biocenter.helsinki.fi/dali/downloads/180M.tar/index_html
Traceback (most recent call last):
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/Publish.py,
line 100, in publish
request, bind=1)
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/mapply.py, line
88, in mapply
if debug is not None: return debug(object,args,context)
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/Publish.py,
line 40, in call_object
result=apply(object,args) # Type scr to step into published object.
  File /data/backup/Zope-2.7.0/lib/python/OFS/Image.py, line 384, in
index_html
RESPONSE.write(data.data)
  File /data/backup/Zope-2.7.0/lib/python/ZServer/HTTPResponse.py,
line 190, in write
t.write(data)
IOError: [Errno 28] No space left on device

I assume this means there's a max cache size set somewhere. There's
plenty of room left on our fs (hundreds of GB) so Zope isn't being
allowed to use it at the moment. I'm asuming this is a Zope rather
than local filesystem issue, but maybe I'm wrong; if it is a Zope
issue, how I can increase standard cache size? We're not using a cache
manager, yet...

Thanks for your patience,
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope refusing to serve ... i am an idiot

2005-12-08 Thread Tim Peters
[Chris Wilton]
 Whoops. Sorry.
 Error log tells me it's a 'no space left on device' error:

 2005-12-08T19:33:30 ERROR(200) SiteError
 http://ekhidna.biocenter.helsinki.fi/dali/downloads/180M.tar/index_html
 Traceback (most recent call last):
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/Publish.py, line 100, 
 in publish
request, bind=1)
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/mapply.py, line 88, in 
 mapply
if debug is not None: return debug(object,args,context)
  File /data/backup/Zope-2.7.0/lib/python/ZPublisher/Publish.py, line 40, in 
 call_object
result=apply(object,args) # Type scr to step into published object.
  File /data/backup/Zope-2.7.0/lib/python/OFS/Image.py, line 384, in 
 index_html
RESPONSE.write(data.data)
  File /data/backup/Zope-2.7.0/lib/python/ZServer/HTTPResponse.py, line 190, 
 in write
t.write(data)
 IOError: [Errno 28] No space left on device

 I assume this means there's a max cache size set somewhere. There's
 plenty of room left on our fs (hundreds of GB) so Zope isn't being
 allowed to use it at the moment. I'm asuming this is a Zope rather
 than local filesystem issue, but maybe I'm wrong; if it is a Zope
 issue, how I can increase standard cache size? We're not using a cache
 manager, yet...

None of the above ;-)  It's most likely that your temp directory is
mounted on a small partition.  Trying setting the envar TMPDIR to
point at a directory on a large partition before starting Zope. 
That is, you're not running into a cache size problem, you're running
into that Zope is creating a large temp file on a partition without
enough space to hold it.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope refusing to serve ... i am an idiot

2005-12-08 Thread Chris Wilton
  I assume this means there's a max cache size set somewhere.
  There's plenty of room left on our fs (hundreds of GB) so Zope
  isn't being allowed to use it at the moment. I'm asuming this
  is a Zope rather than local filesystem issue, but maybe I'm
  wrong; if it is a Zope issue, how I can increase standard cache
  size? We're not using a cache manager, yet...

 None of the above ;-)  It's most likely that your temp directory is
 mounted on a small partition.  Trying setting the envar TMPDIR to
 point at a directory on a large partition before starting Zope.
 That is, you're not running into a cache size problem, you're
 running into that Zope is creating a large temp file on a partition
 without enough space to hold it.

Heh, it worked a treat!
Blinkered as I was, I never thought to check the system temp dir;
df-ing our filesystem tells me that today there is only 174M free on
the root partition, where default /tmp is. That magical figure
explains why I was able to download a 170M file but not a 180M file.
Sorted.

Big big thanks,
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.8.4 install on Suse

2005-12-08 Thread Harry Forster
Jens I am sorry to say that I have compiled all software on this machine.  I 
have done so so that I would not have confusion due to different compilers.  
I think that there is a problem with the manner in which I compile Python or 
compile usingPython.  Python has a zlib.so in its distribution but somehow it 
is not getting through to the compilation of Zope.  There must be something 
about compiling Python or compiling using Python that I do not understand.  I 
think it has something to do with the zlib module.  Either the zlib module 
should be made a part of Python at the time I compile Python or the  compiler 
should be told to use the zlib module at the time I compile Zope.

The zlib module is included in the Zope 2.6 distribution which is the reason 
that I have no trouble installing and using 2.6.

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


Re: [Zope] Zope 2.8.4 install on Suse

2005-12-08 Thread Jens Vagelpohl


On 8 Dec 2005, at 18:46, Harry Forster wrote:

Jens I am sorry to say that I have compiled all software on this  
machine.  I
have done so so that I would not have confusion due to different  
compilers.
I think that there is a problem with the manner in which I compile  
Python or
compile usingPython.  Python has a zlib.so in its distribution but  
somehow it
is not getting through to the compilation of Zope.  There must be  
something
about compiling Python or compiling using Python that I do not  
understand.  I
think it has something to do with the zlib module.  Either the zlib  
module
should be made a part of Python at the time I compile Python or  
the  compiler

should be told to use the zlib module at the time I compile Zope.

The zlib module is included in the Zope 2.6 distribution which is  
the reason

that I have no trouble installing and using 2.6.


Python will compile its zlib if it finds the suitable headers and  
libraries on the hosts system. Check to see if you have all zlib and  
zlib-devel packages installed. There is no magic flag to set, just  
configure/make/make install will pick up on and use zlib. The only  
other thing I could think of would be if you're not using the  
interpreter you think you are using.


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] roles argument to validate/ authorize

2005-12-08 Thread Gaute Amundsen

Can anyone tell me what the argument roles to the methods validate and  
authorize is supposed to be? 

This is sort of a followup to the thread about exUserFolder that Andrew Milton 
got stuck answering all on his own (thanks :-), but I have a feeling there is 
a more general explanation...

The reason I ask is that I suspect that a previous developer has done 
something that has made roles contain 'Anonymous user' when it should not, 
and that this interferes with the propper functioning of login at our sites.

Among other things we have our own virtual host system, and several products 
including document types, so there is scope for a lot of things to 
interfere... However, while no longer being a newbee at this, I have not yet 
been able, to find a way to unravel where the roles argument originate, and 
who could have touched it..

Regards.

Gaute Amundsen

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


Re: [Zope] Zope refusing to serve our large files (180M+)

2005-12-08 Thread Dieter Maurer
Chris Wilton wrote at 2005-12-8 17:58 +0200:
Sure someone's probably come across something similar, but I couldn't
find anything in the archives: our zope is refusing to allow download
of files greater than around 170M through the http server.

We already served larger files via ZServer/HTTPServer.

Zope delivers such large files via a temporary file.
Are you sure that the disk area for temporary files is large enough?

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Erase acl_users

2005-12-08 Thread Dieter Maurer
[EMAIL PROTECTED] wrote at 2005-12-7 20:14 +0100:
I have a problem. I erase object acl_users in root directory and now I can´t 
login in zope. Zope have site error on http://locahost:8080/

An error was encountered while publishing this resource. 

Error Type: AttributeError
Error Value: acl_users

it´s possible create object acl_users?

Access your Zope via an interactive interpreter (it must not be running
as a server or you need ZEO).
Under *nix, you use bin/zopectl debug for this.
If necessary, search the archive for a batch script that does this under
Windows.

In the interpreter call:

   app.manage_addUserFolder()
   app.acl_users._doAddUser('yourManager', 'hisPassword', ['Manager'],())
   get_transaction().commit()

Exit the interpreter.

You have again a UserFolder with
Manager 'yourManager' and password 'hisPassword'.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Broken Pipe Error

2005-12-08 Thread Asad Habib
Hi Dieter. Thanks for the input. Why would the reader die, though? I am 
running Mac OS X Tiger, if that helps any. Thanks.


- Asad


On Thu, 8 Dec 2005, Dieter Maurer wrote:


Asad Habib wrote at 2005-12-7 16:47 -0500:

I am using Maik Jablonski's python script to convert from html to pdf in
conjunction with the htmldoc product. FYI, I am running Mac OS X
Tiger. When I run the script, I get the following error which is being
generated by line 20 of the script:

IOError: [Errno 32] Broken pipe


This means that you try to write into a pipe when the reading end
of this pipe was closed (probably because the reader died).

--
Dieter


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Dan Pozmanter



Is this a known 
issue?
Any TextIndexNG3 
indexes I create clear on restart,
and do not 
repopulate.
___

Daniel PozmanterSiteworx, 
Inc.

"Festina Lente" - Gaius 
Julius

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


Re: [Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Andreas Jung



--On 8. Dezember 2005 15:40:10 -0500 Dan Pozmanter [EMAIL PROTECTED] wrote:


Is this a known issue?
Any TextIndexNG3 indexes I create clear on restart,
and do not repopulate


Proof it.

-aj

pgplrUPGYmocT.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Dan Pozmanter
I guess that's a no, this is not a known issue.

I'll look into this further, just checking to see if
someone had been down this path before.
___
 
Daniel Pozmanter
Siteworx, Inc.
 
Festina Lente - Gaius Julius

-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 08, 2005 3:43 PM
To: Dan Pozmanter; zope@zope.org
Subject: Re: [Zope] TextIndexNG3 clears on restart?



--On 8. Dezember 2005 15:40:10 -0500 Dan Pozmanter [EMAIL PROTECTED]
wrote:

 Is this a known issue?
 Any TextIndexNG3 indexes I create clear on restart, and do not 
 repopulate

Proof it.

-aj
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Dan Pozmanter
Ok, here are steps to reproduce:

Ingredients:
1 copy of TextIndexNG3, with appropriate files edited for non plone
usage.
1 copy of zope, sans plone, cmf.
run this on either freebsd or windows.

Steps:
1.  Add a Zcatalog.
2.  Add one ZCTextIndex (say, index on id or title).
3.  Add one TextIndexNG3 (index on title or id).  Be sure to turn on
stemming.
4.  Fill up the catalog using find objects.
5.  Verify the counts for each index.
6.  Restart Zope.
7.  Take a second gander at those counts.  One of them should now be
'0'.

___
 
Daniel Pozmanter
Siteworx, Inc.
 
Festina Lente - Gaius Julius

-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 08, 2005 3:43 PM
To: Dan Pozmanter; zope@zope.org
Subject: Re: [Zope] TextIndexNG3 clears on restart?



--On 8. Dezember 2005 15:40:10 -0500 Dan Pozmanter [EMAIL PROTECTED]
wrote:

 Is this a known issue?
 Any TextIndexNG3 indexes I create clear on restart, and do not 
 repopulate

Proof it.

-aj
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Dan Pozmanter
Changing the storage from default to term_frequencies seems to fix the
problem.
___
 
Daniel Pozmanter
Siteworx, Inc.
 
Festina Lente - Gaius Julius

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Dan Pozmanter
Sent: Thursday, December 08, 2005 4:20 PM
To: Andreas Jung; zope@zope.org
Subject: RE: [Zope] TextIndexNG3 clears on restart?

Ok, here are steps to reproduce:

Ingredients:
1 copy of TextIndexNG3, with appropriate files edited for non plone
usage.
1 copy of zope, sans plone, cmf.
run this on either freebsd or windows.

Steps:
1.  Add a Zcatalog.
2.  Add one ZCTextIndex (say, index on id or title).
3.  Add one TextIndexNG3 (index on title or id).  Be sure to turn on
stemming.
4.  Fill up the catalog using find objects.
5.  Verify the counts for each index.
6.  Restart Zope.
7.  Take a second gander at those counts.  One of them should now be
'0'.

___
 
Daniel Pozmanter
Siteworx, Inc.
 
Festina Lente - Gaius Julius

-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 08, 2005 3:43 PM
To: Dan Pozmanter; zope@zope.org
Subject: Re: [Zope] TextIndexNG3 clears on restart?



--On 8. Dezember 2005 15:40:10 -0500 Dan Pozmanter [EMAIL PROTECTED]
wrote:

 Is this a known issue?
 Any TextIndexNG3 indexes I create clear on restart, and do not 
 repopulate

Proof it.

-aj
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZSQL batching with dtml-in

2005-12-08 Thread Ed Colmar
Do ZSQL methods communicate with the dtml-in call and understand the 
size attribute?


for example, in this dtml-in statement:
dtml-in SQL_get_large_list size=20 start=query_start
/dtml-in

Will the database be queried for all results, and only have 20 
displayed, or will the database just return the 20 that are needed?


Thanks for the insight!

-Ed
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZSQL batching with dtml-in

2005-12-08 Thread David H

Ed Colmar wrote:

Do ZSQL methods communicate with the dtml-in call and understand the 
size attribute?


for example, in this dtml-in statement:
dtml-in SQL_get_large_list size=20 start=query_start
/dtml-in

Will the database be queried for all results, and only have 20 
displayed, or will the database just return the 20 that are needed?


Thanks for the insight!

-Ed
___


Ed,
Just add a Z Search Interface to a folder that can acquire your zSQL 
method(s).  I think it will create a sample of what you want to do in 
either ZPT or DTML.  Then you can experiment.


You can use the advanced tab to tell zSqL methods how many data 
records to download per get and how many to cache.


David

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZSQL batching with dtml-in

2005-12-08 Thread Tino Wildenhain
Am Donnerstag, den 08.12.2005, 13:46 -0800 schrieb Ed Colmar:
 Do ZSQL methods communicate with the dtml-in call and understand the 
 size attribute?

Not really.

 for example, in this dtml-in statement:
 dtml-in SQL_get_large_list size=20 start=query_start
 /dtml-in
 
 Will the database be queried for all results, and only have 20 
 displayed, or will the database just return the 20 that are needed?

Well, this depends (in theory at least :) on the database
adaptor. It could just fetch the results up to 20 but
usually it will just fetch all and cut the batch
out of it. This isnt so bad as it seems because
you can have the ZSQL Method cache the result so
the database isnt asked any time.

You dont need DTML for batching. There is a batch
module you can use in python scripts as well
(and with ZPT)

HTH
Tino

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


[Zope] Zope Foundation IRC - Reminder #2

2005-12-08 Thread Rob Page

Hello everyone:

I wanted to send a final reminder about the upcoming
IRC to discuss the formation of the Zope Foundation.
Hope to see you there!

  o IRC: We have scheduled the following IRCs to
 discuss the docs in real time:

 Who: Zope Community
 What: IRC to discuss Zope Foundation formation
   documents.
 Where:  #zope on irc.freenode.net

 When:  #1:  Fri, Dec 9, 730a - 9a (US/EST)
#2:  Tue, Dec 20, 730a - 830a (US/EST)

US/EST is GMT-5.

Update:  We've received a suggestion to move the
second IRC to later in the day to ensure that
we provide reasonable participation windows for
some US/West Coast timezones.  This seems
reasonable so with a little discussion on the IRC
tomorrow we'll likely move the second IRC to:

 o Tue, Dec 20, 1p (US/EST) GMT-5.

Regards,
Rob

--
Rob Page   V: 540 361 1710
Zope Corporation   F: 703 995 0412
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: roles argument to validate authorize

2005-12-08 Thread Andrew Milton
+---[ Gaute Amundsen ]--
| 
| Can anyone tell me what the argument roles to the methods validate and  
| authorize is supposed to be? 

Roles should be the list of roles required for access. If no roles are passed
the security mechanism is supposed to query the object for the roles needed
for access...

| The reason I ask is that I suspect that a previous developer has done 
| something that has made roles contain 'Anonymous user' when it should not, 
| and that this interferes with the propper functioning of login at our sites.

That in and of itself isn't a problem. The 'View' permission e.g. could
require 'Anonymous user', 'Manager', or 'Owner' roles..

However, if a USER has the Anonymous role, that could be causing an issue...

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


Re: [Zope] resolving conflict errors

2005-12-08 Thread Dennis Allison
On Fri, 14 Oct 2005, Chris McDonough wrote:

 Dennis Allison asked:

  What data does Zope store in the ZODB when an object is evaluated?
 
 None that you don't tell it to.  Typically conflict errors are a result
 of two threads calling code which changes the same object at the same
 time, but nothing that Zope does under the hood causes it; it is
 always caused by application code.
 
 One exception to this rule is conflict errors raised when using Zope
 sessions.  It's not actually an exception to the rule, but programmers
 are shielded from the fact that sessions store data in ZODB when you use
 the session API (e.g. REQUEST.SESSION).  The sessioning machinery needs
 to manage housekeeping info whenever the API is used to expire old
 sessions and create new ones, so although it may not look like you are
 writing to the ZODB when you use sessions (even to read data out of
 them), you potentially are. 
 
 Zope 2.8 has a ZODB that support multiversion concurrency control, which
 eliminates a certain class of conflict errors (read conflict errors), so
 if you are getting a lot of these, and you can get away with using 2.8,
 I'd suggest doing so.

The problem I am trying to resolve appears to be load related.  The
observed symptom is that (some) session variables spontaneously disappear.  
There appears to be some connection to conflicts, but the exact mechanism
and the relationship is not yet clear.

BTW, when I first began trying to resolve this problem, we were running 
Zope 2.7.6.  We moved to Zope 2.8,4 to take advantage of the later ZODB. 
That move was a good one, but it has cause some migration pain.

The session problem has been with us forever, at least since Zope 2.5.0.  
They are Heisenbugs and appear apparently randomly.  Detailed logs should 
help some, but so far have not brought joy.

So, I've been looking through the code trying to find places where some 
infrequent event could cause the problem.   

Chris pointed out that session variables can cause conflict errors (both
read-read and read-write)  when the session API is used.  I've been trying
to explore that interface and have not yet found all the pieces.  Some
hints to the reader would help.

I see where HTTPRequest manages the Zope user interface to the
session variables which includes a mechanism for lazy access--the
dictionary _lazies provides a list of callables.  When a variable is
accessed, it is promoted to Request by executing the callable and storing
the value.  The _lazies entry corresponding to the session variable is
deleted.  What I have not been able to find is where this is maintained
in a persistent fashion.  Can someone provide a pointer?








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


Re: [Zope] resolving conflict errors

2005-12-08 Thread Chris McDonough

On Dec 8, 2005, at 9:29 PM, Dennis Allison wrote:


On Fri, 14 Oct 2005, Chris McDonough wrote:

The problem I am trying to resolve appears to be load related.  The
observed symptom is that (some) session variables spontaneously  
disappear.
There appears to be some connection to conflicts, but the exact  
mechanism

and the relationship is not yet clear.


It's hard to know what's happening here, obviously.



So, I've been looking through the code trying to find places where  
some

infrequent event could cause the problem.

Chris pointed out that session variables can cause conflict errors  
(both
read-read and read-write)  when the session API is used.  I've been  
trying

to explore that interface and have not yet found all the pieces.  Some
hints to the reader would help.


If you mean the session API, that's defined in modules within  
Products/Sessions and Products/Transience.



I see where HTTPRequest manages the Zope user interface to the
session variables which includes a mechanism for lazy access--the
dictionary _lazies provides a list of callables.  When a variable is
accessed, it is promoted to Request by executing the callable and  
storing

the value.  The _lazies entry corresponding to the session variable is
deleted.


Sorry, I'm not sure what this means.  Are you describing what happens  
in the REQUEST.set_lazy code or are you describing a symptom of a  
problem?



  What I have not been able to find is where this is maintained
in a persistent fashion.  Can someone provide a pointer?


I'm not sure what this means either, sorry!  Where what is maintained  
in a persistent fashion?


Sorry to not be more helpful on this go-around. ;-)

- C

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] TextIndexNG3 clears on restart?

2005-12-08 Thread Andreas Jung



--On 8. Dezember 2005 16:25:16 -0500 Dan Pozmanter [EMAIL PROTECTED] wrote:


Changing the storage from default to term_frequencies seems to fix the
problem.


Nothing I can reproduce...it works perfectly independent of the used storage
or stemmer settings.

-aj

pgpcjS94K9Cid.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Hooks for methods other than GET/POST on port 80?

2005-12-08 Thread Roman Susi

Chris Withers wrote:


Roman Susi wrote:

Even if it is in my code, it is still too bad to get down the whole 
Zope server. Also, it was confirmed as a bug.



Where and who by?



At Zope.org issue tracker by ajung. However, it is not seen as it is 
security related.




Chris



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Hooks for methods other than GET/POST on port 80?

2005-12-08 Thread Andreas Jung



--On 9. Dezember 2005 08:04:04 +0200 Roman Susi [EMAIL PROTECTED] wrote:


Chris Withers wrote:


Roman Susi wrote:


Even if it is in my code, it is still too bad to get down the whole
Zope server. Also, it was confirmed as a bug.



Where and who by?



At Zope.org issue tracker by ajung. However, it is not seen as it is
security related.


I did not confirm it as bug. I said that it is possibly a bug but nothing
that worries me so much.

-aj

pgp7yU5ll28wi.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )