Re: [Zope] Problem On Rebuild
Ya know, I don't think that's the solution this other fella had, because the index page still shows the dir structure, but I can probably figure a way around that, and your solution is as elegant as it is simple. Thanks! Tony -Original Message- From: [EMAIL PROTECTED] To: zope@zope.org Sent: Mon, 5 Mar 2007 3:48 PM Subject: Re: [Zope] Problem On Rebuild On Mon, Mar 05, 2007 at 02:11:45PM -0500, [EMAIL PROTECTED] wrote: > -Original Message- > From: [EMAIL PROTECTED] > To: zope@zope.org; [EMAIL PROTECTED] > Sent: Mon, 5 Mar 2007 2:19 PM > Subject: Re: [Zope] Problem On Rebuild > > > >I missed the beginning of this thread so i don't know if i missed something relevant, but url rewriting in general is often done within >the front-end web server (eg. Apache). > > Logical, but this isn't done at the Web server. These sites go > through Pound, which is a reverse proxy, then are actually served by > Zope itself. > > Then again, perhaps they're rewritten in Zope's Web server! Where > would that be, for 2.7.8? Most likely you have a Virtual Host Monster instance, with some configuration on the Mappings tab. See http://www.plope.com/Books/2_7Edition/VirtualHosting.stx -- 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 ) AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] repeating folder in url
On 5-Mar-07, at 11:58 AM, Andreas Jung wrote: These URLs all show the same content although there is only one dir1 folder: /dir1/ /dir1/dir1/ /dir1/dir1/dir1/ The behavior is correct. Absolutely. But we've found (as I presume the original poster found) that it can be problematic in certain cases. For us one of those cases is where user generated content (and links) abound. Our users can have problems with HTML even in a WYSIWYG editor, let alone understanding Zopeisms like acquisition. In such cases, I've made sure the template used to deliver this content checks the requested URL against the absolute URL and redirects (and then logs and emails) when such a indiscretion occurs. Edward Pollard Information Technology | WEB Team University of Lethbridge. ___ 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] Problem On Rebuild
On Mon, Mar 05, 2007 at 02:11:45PM -0500, [EMAIL PROTECTED] wrote: > -Original Message- > From: [EMAIL PROTECTED] > To: zope@zope.org; [EMAIL PROTECTED] > Sent: Mon, 5 Mar 2007 2:19 PM > Subject: Re: [Zope] Problem On Rebuild > > > >I missed the beginning of this thread so i don't know if i missed something > >relevant, but url rewriting in general is often done within >the front-end > >web server (eg. Apache). > > Logical, but this isn't done at the Web server. These sites go > through Pound, which is a reverse proxy, then are actually served by > Zope itself. > > Then again, perhaps they're rewritten in Zope's Web server! Where > would that be, for 2.7.8? Most likely you have a Virtual Host Monster instance, with some configuration on the Mappings tab. See http://www.plope.com/Books/2_7Edition/VirtualHosting.stx -- 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 )
Re: [Zope] Problem On Rebuild
-Original Message- From: [EMAIL PROTECTED] To: zope@zope.org; [EMAIL PROTECTED] Sent: Mon, 5 Mar 2007 2:19 PM Subject: Re: [Zope] Problem On Rebuild >I missed the beginning of this thread so i don't know if i missed something >relevant, but url rewriting in general is often done within >the front-end web >server (eg. Apache). Logical, but this isn't done at the Web server. These sites go through Pound, which is a reverse proxy, then are actually served by Zope itself. Then again, perhaps they're rewritten in Zope's Web server! Where would that be, for 2.7.8? TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] repeating folder in url
--On 5. März 2007 14:33:09 -0500 Thomas Bennett <[EMAIL PROTECTED]> wrote: These URLs all show the same content although there is only one dir1 folder: /dir1/ /dir1/dir1/ /dir1/dir1/dir1/ The behavior is correct. My thoughts have been its related UnrestrictedTraversal, acquisition, or something else but not sure where to change or if it can be changed? I've seen this before but it has pretty much been a non issue but now the campus is setting up a Google Search Appliance and the indexing mechanism seems to be attempting to traverse this pattern into infinite recursion. Likely your messing up your site with relative urls. Use absolute urls instead. -aj pgppUVwgINoTf.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 )
[Zope] repeating folder in url
I know this has been addressed before but after searching the WEB half a day Friday I only found one related item although not directly related to my situation and it said search the archives. Zope Version (Zope 2.6.1 (binary release, python 2.1, linux2-x86), python 2.1.3, linux2) Python Version 2.1.3 (#1, Sep 19 2002, 13:15:46) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] System Platform linux2 (I am moving everything to a new server and upgrading all software this week) Situation: These URLs all show the same content although there is only one dir1 folder: /dir1/ /dir1/dir1/ /dir1/dir1/dir1/ My thoughts have been its related UnrestrictedTraversal, acquisition, or something else but not sure where to change or if it can be changed? I've seen this before but it has pretty much been a non issue but now the campus is setting up a Google Search Appliance and the indexing mechanism seems to be attempting to traverse this pattern into infinite recursion. Since beginning this email I have found a contributing issue: In a directory say /dir1/dir2/dir3 a page in dir3 has a relative link to ../dir2. This may be the issue totally but is there an easy way to prevent this from performing as Zope allows it to, aside from horse whipping the person that created that page. Thanks, Thomas -- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III P O Box 32026 University Library Boone, North Carolina 28608 (828) 262 6587 If it's not as simple as possible to try it, then the barrier to entry is too high. Library Systems Help Desk: http://www.library.appstate.edu/help/ ___ 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] Problem On Rebuild
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, March 05, 2007 1:15 PM Subject: Re: [Zope] Problem On Rebuild You're running Zope with a different Python version/binary than the one used to compile and install Zope. Trible check that. I will; however, upon re-thinking this, it would be much better to know what file he edited, then edit the same. Does anyone have an idea what file one would edit in the Zope distro to capture the URL request and rewrite it, both on the way in and on the way out. I missed the beginning of this thread so i don't know if i missed something relevant, but url rewriting in general is often done within the front-end web server (eg. Apache). Jonathan ___ 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] Problem On Rebuild
-Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 1:36 PM Subject: Re: [Zope] Problem On Rebuild >You're running Zope with a different Python version/binary than the one used >to compile and install Zope. Trible check that. I will; however, upon re-thinking this, it would be much better to know what file he edited, then edit the same. Does anyone have an idea what file one would edit in the Zope distro to capture the URL request and rewrite it, both on the way in and on the way out. TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] Problem On Rebuild
--On 5. März 2007 12:27:32 -0500 [EMAIL PROTECTED] wrote: /usr/local/zope/278/lib/python/DocumentTemplate/cDocumentTemplate.so: Undefined symbol "PyUnicodeUCS2_DecodeLatin1" You're running Zope with a different Python version/binary than the one used to compile and install Zope. Trible check that. -aj pgpYvop2ku8ev.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 )
[Zope] Problem On Rebuild
Hi; I'm building out a new server and trying to import all the functionality from the old OS-corrupted server. The Web site built on this server have a directory structure that's easy for identifying stuff but makes for long URLS: example.com/dir1/dir2/dir3/dir4/index.pt They're always the same dirs and they appear on every page of every site. The sysadmin before me had a neat little script buried somewhere that made those dirs disappear when they posted to a browser. That's important for SEO, since the SEs only go a couple dirs deep. But I'll be darned if I know where this guy put that script! I tried to tarball his old Zope build-out and unpack and use it, but I got this error: Error: The object named by "DBTab.ClassFactories.autoClassFactory" could not be imported Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/datatypes.py", line 106, in importable_name package = __import__(n, g, g, component) File "/usr/local/zope/278/lib/python/DBTab/ClassFactories.py", line 18, in ? import OFS.Uninstalled File "/usr/local/zope/278/lib/python/OFS/__init__.py", line 14, in ? import Products.ReplaceSupport.AdvancedPatch File "/usr/local/zope/instance1/Products/ReplaceSupport/__init__.py", line 17, in ? import Handlers File "/usr/local/zope/instance1/Products/ReplaceSupport/Handlers/__init__.py", line 30, in ? from Globals import package_home File "/usr/local/zope/278/lib/python/Globals.py", line 23, in ? import Acquisition, ComputedAttribute, App.PersistentExtra, os File "/usr/local/zope/278/lib/python/App/PersistentExtra.py", line 14, in ? from class_init import default__class_init__ File "/usr/local/zope/278/lib/python/App/class_init.py", line 14, in ? from AccessControl.PermissionRole import PermissionRole File "/usr/local/zope/278/lib/python/AccessControl/__init__.py", line 16, in ? import DTML File "/usr/local/zope/278/lib/python/AccessControl/DTML.py", line 18, in ? from DocumentTemplate import DT_Util File "/usr/local/zope/278/lib/python/DocumentTemplate/__init__.py", line 22, in ? from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile File "/usr/local/zope/278/lib/python/DocumentTemplate/DocumentTemplate.py", line 112, in ? from DT_String import String, File File "/usr/local/zope/278/lib/python/DocumentTemplate/DT_String.py", line 17, in ? from DT_Util import ParseError, InstanceDict, TemplateDict, render_blocks, str File "/usr/local/zope/278/lib/python/DocumentTemplate/DT_Util.py", line 42, in ? from cDocumentTemplate import InstanceDict, TemplateDict, \ ImportError: /usr/local/zope/278/lib/python/DocumentTemplate/cDocumentTemplate.so: Undefined symbol "PyUnicodeUCS2_DecodeLatin1" I'm not sure if I should even be trying that, but I thought maybe he put the script in there, since I can't find it as a prod. or anything else through the ZCMI. Ideas? TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] Zope modules
On 3/5/07, Ron Miller <[EMAIL PROTECTED]> wrote: We just installed Zope 2.10, but we're not seeing Versions as an option in the product Add drop-down list. The Pearl Script option is not there either. What do we need to do to get these on the list? The Zope Book indicates that these come standard with the base product. Do we need to install a different version? Or add some modules, if so, from where? Perl scripts died a painless death a long time ago. Versions were removed in 2.8, mostly because the implementation was seriously broken. -- Martijn Pieters ___ 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: checking DNS resolving?
Forgive me, please, I've send email to a wrong list! ___ 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] checking DNS resolving?
Hi friends, Currently I know one way to monitor DNS server - monitor bind by tcp port that has only two state - up or down. But is there any way to check where is DNS is not only listen on some port, but able to resolve queries? I know that check_http can check if page accessible for http server and it should be like that, but for DNS server. So there two general question: 1. Is there built-in function for such task or maybe there somewere exist ready to use plugin/script? 2. If above is not True! What is general rules for writing addon script? What data I should get and procsess and what data I should return? How this data should be formatted (general rules), how I should proccess different events and cases, what return code for each of case and so on... 3. Can somebody give me general advices about how I should accomplish above task? Thanks for any advices! ___ 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 modules
Version were removed in Zope 2.8. See doc/CHANGES.txt. -aj --On 5. März 2007 09:52:04 -0500 Ron Miller <[EMAIL PROTECTED]> wrote: Hi, We just installed Zope 2.10, but we're not seeing Versions as an option in the product Add drop-down list. The Pearl Script option is not there either. What do we need to do to get these on the list? The Zope Book indicates that these come standard with the base product. Do we need to install a different version? Or add some modules, if so, from where? Any help would be appreciated. Thanks, -- Ron Miller -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope & Plone development, Consulting pgpjfZ34msIpp.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 )
[Zope] Zope modules
Hi, We just installed Zope 2.10, but we're not seeing Versions as an option in the product Add drop-down list. The Pearl Script option is not there either. What do we need to do to get these on the list? The Zope Book indicates that these come standard with the base product. Do we need to install a different version? Or add some modules, if so, from where? Any help would be appreciated. Thanks, -- Ron Miller ___ 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] ZMySQLDA Problem
setenv Thanks! Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 8:38 AM Subject: Re: [Zope] ZMySQLDA Problem --On 5. März 2007 07:35:19 -0500 [EMAIL PROTECTED] wrote: > Thank you for giving me that command, unfortunately, "export" is not > found on my system (?). ># export LD_LIBRARY_PATH=/usr/local/lib/mysql/ > export: Command not found. ># find / -name export ># > you might read about the unix basics...setting an environment variable depends on the type of your shell. I have no idea which shell your using. Reading the man page of your shell and Goggle should give you an answer *wink*. -aj AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] datetime format
Andreas Jung schrieb: ... And I would not use it much because you loose all type information and the ability to sort accordingly and calculate with the values. Better format them just for output - which would be in python code. It depends on the usecase..if you don't have to deal with different date format it is handy to convert it on the RDBMS level..otherwise you have to write something like No, you would do that in your formatter class or at least in the python script preparing the values for the template. Regards 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 )
Re: [Zope] ZMySQLDA Problem
--On 5. März 2007 07:35:19 -0500 [EMAIL PROTECTED] wrote: Thank you for giving me that command, unfortunately, "export" is not found on my system (?). # export LD_LIBRARY_PATH=/usr/local/lib/mysql/ export: Command not found. # find / -name export # you might read about the unix basics...setting an environment variable depends on the type of your shell. I have no idea which shell your using. Reading the man page of your shell and Goggle should give you an answer *wink*. -aj pgpPDbn3Zsenf.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] ZMySQLDA Problem
Thank you for giving me that command, unfortunately, "export" is not found on my system (?). # export LD_LIBRARY_PATH=/usr/local/lib/mysql/ export: Command not found. # find / -name export # Is there another command? FreeBSD 6.2 TIA, Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 8:29 AM Subject: Re: [Zope] ZMySQLDA Problem --On 5. März 2007 07:26:10 -0500 [EMAIL PROTECTED] wrote: ># find / -name libmysqlclient_r.so.15 > /usr/local/lib/mysql/libmysqlclient_r.so.15 ># find / -name bdist.freebsd-6.2-RELEASE-i386 > /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 ># ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ ># > > It would appear that indeed libmysqlclient_r.so.15 is in fact to be found > in the /usr/local/lib/mysql dir. So that would appear to not be the > issue. Next, you state that it might not be found in its environment, and > tell me I should try adding it "using the LD_LIBRARY_PATH environment > variable". Okay, but could you be more specific? How exactly do I do > that? Or, where is a resource to learn how to do it? TIA, > Tony > > export LD_LIBRARY_PATH=/path/to/libdir1:/path/to/libdir2: -aj AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] ZMySQLDA Problem
--On 5. März 2007 07:26:10 -0500 [EMAIL PROTECTED] wrote: # find / -name libmysqlclient_r.so.15 /usr/local/lib/mysql/libmysqlclient_r.so.15 # find / -name bdist.freebsd-6.2-RELEASE-i386 /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 # ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ # It would appear that indeed libmysqlclient_r.so.15 is in fact to be found in the /usr/local/lib/mysql dir. So that would appear to not be the issue. Next, you state that it might not be found in its environment, and tell me I should try adding it "using the LD_LIBRARY_PATH environment variable". Okay, but could you be more specific? How exactly do I do that? Or, where is a resource to learn how to do it? TIA, Tony export LD_LIBRARY_PATH=/path/to/libdir1:/path/to/libdir2: -aj pgpYYaWHIb0EJ.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] ZMySQLDA Problem
# find / -name libmysqlclient_r.so.15 /usr/local/lib/mysql/libmysqlclient_r.so.15 # find / -name bdist.freebsd-6.2-RELEASE-i386 /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 # ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ # It would appear that indeed libmysqlclient_r.so.15 is in fact to be found in the /usr/local/lib/mysql dir. So that would appear to not be the issue. Next, you state that it might not be found in its environment, and tell me I should try adding it "using the LD_LIBRARY_PATH environment variable". Okay, but could you be more specific? How exactly do I do that? Or, where is a resource to learn how to do it? TIA, Tony -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; zope@zope.org Sent: Mon, 5 Mar 2007 8:19 AM Subject: Re: [Zope] ZMySQLDA Problem --On 5. März 2007 07:14:41 -0500 [EMAIL PROTECTED] wrote: > __bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not > found, required by "_mysql.so" Traceback (most recent call last): This is also self-speaking. The mysql client libaries are either not installed or can't be found. Check if the file is installed properly. If yes, try to extend the library search path of the dynamic linker using the LD_LIBRARY_PATH environment variable. -aj AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] ZMySQLDA Problem
--On 5. März 2007 07:14:41 -0500 [EMAIL PROTECTED] wrote: __bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not found, required by "_mysql.so" Traceback (most recent call last): This is also self-speaking. The mysql client libaries are either not installed or can't be found. Check if the file is installed properly. If yes, try to extend the library search path of the dynamic linker using the LD_LIBRARY_PATH environment variable. -aj pgpclFmWPZ6Z3.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 )
[Zope] ZMySQLDA Problem
Traceback (most recent call last): File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope/instance1/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/local/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 7, in ? File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not found, required by "_mysql.so" Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ? run() File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in start_zope starter.startZope() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in startZope Zope.startup() File "/usr/local/zope/278/lib/python/Zope/__init__.py", line 47, in startup _startup() File "/usr/local/zope/278/lib/python/Zope/App/startup.py", line 45, in startup OFS.Application.import_products() File "/usr/local/zope/278/lib/python/OFS/Application.py", line 650, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope/instance1/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/local/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 7, in ? File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not found, required by "_mysql.so" # find / -name libmysqlclient_r.so.15 /usr/local/lib/mysql/libmysqlclient_r.so.15 # find / -name bdist.freebsd-6.2-RELEASE-i386 /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 # ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ # So, evidently, there isn't even a dir named "egg" under the given dir in which to look for said file! What do? TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] safe read-only access to acquisition parent objects
Hello, I have build a Plone product which allows users to enter a piece of Python code. This way, users can easily define their own actions without changing the product source code. Those pieces of code are executed using the exec Python command. The problem is that nothing prevents the user to access any other object in the ZODB (using getParentNode, or traverse) and to modify it (as far as the user is allowed to use the method which runs his piece of code, AccessControl will not check his permission during the execution itself). So my first idea was to cut all the acquisition chain: I replace self with aq_base(self) just before running the piece of code, and there is no way to access anything outside the current object itself. It is OK, but my product contains some methods which use Plone portal tools (like MailHost, portal_membership), and I would like to offer the ability to use those methods in the user defined pieces of code. Of course, as I remove the acquisition chain, those methods doesn't work. So my question is: is there a way to provide a read-only access to the current object's acquisition parents ? I thought about different ways: - can we "lock" an object in the ZODB ? - can we build a read-only proxy to an object ? - can we make a temporary copy of an object that will be stored in the ZODB ? (regarding that point, I know how to do it, but I am not sure about the performances...) Any suggestion ? Regards, Eric BREHAULT ___ 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] Pounding Python Eggs
--On 5. März 2007 06:26:30 -0500 [EMAIL PROTECTED] wrote: Hi; "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_re sources.py", line 846, in extraction_error raise err pkg_resources.ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/root/.python-eggs' The Python egg cache directory is currently set to: /root/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. The error message is self-speaking. You don't have permission to write into /root/.python-eggs. Perhapse setuptools wants to create the directory first if it does not exists. The solution is also included with the error message. -aj pgpGyq8Dq7kXC.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 )
[Zope] Pounding Python Eggs
Hi; I'm trying to install ZMySQLDA on a new server I'm building. I got this error: Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ? run() File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in start_zope starter.startZope() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in startZope Zope.startup() File "/usr/local/zope/278/lib/python/Zope/__init__.py", line 47, in startup _startup() File "/usr/local/zope/278/lib/python/Zope/App/startup.py", line 45, in startup OFS.Application.import_products() File "/usr/local/zope/278/lib/python/OFS/Application.py", line 650, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope/instance1/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/local/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 7, in ? File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 4, in __bootstrap__ File "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_resources.py", line 799, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_resources.py", line 1228, in get_resource_filename self._extract_resource(manager, self._eager_to_zip(name)) File "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_resources.py", line 1249, in _extract_resource real_path = manager.get_cache_path( File "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_resources.py", line 880, in get_cache_path self.extraction_error() File "/usr/local/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg/pkg_resources.py", line 846, in extraction_error raise err pkg_resources.ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/root/.python-eggs' The Python egg cache directory is currently set to: /root/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. Well, I don't have any .python-eggs file anywhere...nor on my old server either, that has ZMySQLDA functioning just fine (that is, if "find / -name ".python-eggs" should turn something up). Furthermore, I'm using Pound, not Apache. What should I do? TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] datetime format
--On 5. März 2007 10:09:55 +0100 Tino Wildenhain <[EMAIL PROTECTED]> wrote: Andreas Jung schrieb: --On 5. März 2007 07:12:23 +0100 Tino Wildenhain <[EMAIL PROTECTED]> wrote: Garry Saddington schrieb: I have 'datetime-format international' set in zope.conf but the date output is still rendered in the format (y,m,d) when using ZopeTime or when returning dates from python scripts. How can I change this behaviour? My server config is: Well what you see is not "the date" but one representation of the DateTime object. You can use the strftime() method to render your date object to string in any form you want. This should also answer your question on postgres list. Your database adaptor turns database types into zope types. In addition: SQL also provides support converting a date type of the database into a string. See TO_DATE(...). Yes it does but its to_char() not to_date() ;) Yup. And I would not use it much because you loose all type information and the ability to sort accordingly and calculate with the values. Better format them just for output - which would be in python code. It depends on the usecase..if you don't have to deal with different date format it is handy to convert it on the RDBMS level..otherwise you have to write something like instead of -aj pgpfdz4uAnNLL.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] datetime format
Andreas Jung schrieb: --On 5. März 2007 07:12:23 +0100 Tino Wildenhain <[EMAIL PROTECTED]> wrote: Garry Saddington schrieb: I have 'datetime-format international' set in zope.conf but the date output is still rendered in the format (y,m,d) when using ZopeTime or when returning dates from python scripts. How can I change this behaviour? My server config is: Well what you see is not "the date" but one representation of the DateTime object. You can use the strftime() method to render your date object to string in any form you want. This should also answer your question on postgres list. Your database adaptor turns database types into zope types. In addition: SQL also provides support converting a date type of the database into a string. See TO_DATE(...). Yes it does but its to_char() not to_date() ;) And I would not use it much because you loose all type information and the ability to sort accordingly and calculate with the values. Better format them just for output - which would be in python code. Regards 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] Re: Resizing Images In Page Templates
Hi tony I saw somewhere someone adding code like this: that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? Yes, I have seen this. Silva, a zope based CMS, has a class called SivaImage. Inside that object, you can specify a scale. Then inside another class called SilvaDocument, it will be called as follows: -> Will get the image with its real resolution -> Will get a resized version of the image I know that class uses PIL. You could download it from: http://www.infrae.org/ and take a look at it. The only thing I don't like is that when saving an image, its name will be either "hires_image.jpg" or "image.jpg" instead of the real name. Regards Josef ___ 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: returning a macro from a pythonscript
On Friday 02 March 2007 17:06, Tres Seaver wrote: > Gaute Amundsen wrote: > > On Friday 02 March 2007 11:20, Andreas Jung wrote: > >> --On 2. März 2007 11:10:57 +0100 Gaute Amundsen <[EMAIL PROTECTED]> wrote: > >>> I have tried many varieties, but I can't remember ever getting it to > >>> work... > >>> > > foo = restrictedTraverse('/foo/bar/index.html/macros/mymacro') > > return foo() > > > > But of course foo is a list, and I can't see a way I can use any of the > > contents.. > > You can't "use it", only inline it into a calling template. E.g.: > > ##Script (Python) "random_macro" > from random import choice # may need module security assertion > macros = context.some_template.macros > macro1 = macros['one'] > macro2 = macros['two'] > macro3 = macros['three'] > return choice((macro1, macro2, macro3)) > > The template would just do: > > > > > > Tres. I see.. So it is the use-macro statement that takes the datastructure, and turns it into a tempate/html. I my case I think I will rather try to use a wrapper approach. In script: return container.ajax_tpl(mcr=my_macro_from_big_tpl) In ajax_tpl: But it's good to know the other option allso. Thanks. On Friday 02 March 2007 22:36, David H wrote: > > With Zope 2 I use python scripts to fill my "content" area (2-3 column > css) with macros like so: > # python script: >return container.Budget.BudgetMaint.macros['budgetMaint'] > > It works > > All best, > > David H In other words, a script can return a macro, but is has to be into a use-macro tag. OK Thanks. ___ 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 )