[Zope-dev] Changing hostname and port without SiteAccess
Hello list, I already put my question on the "[EMAIL PROTECTED]" list, but there was no solution in sight, so I'm trying to get deeper (spell: start using) into python. I cannot use SiteAccess (because I need multiple ZCatalogs), and my Zope server (port 8080) is behind squid (in http-accelerated mode - port 80). What I would need is changing the hostname and port in the html-responses like this: http://localname.com:8080/blah to http://officialserver.com/blah , so the client reconnects to squid, not zope itself. Any hints where to start looking for the right python files or even functions/methods? Thanks in advance for your info, Martin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope] ZCatalog raises index out of range exception error
Hi listies, On a client's server I created a ZCatalog, but when using "Find Items to ZCatalog" and clicking on "Find" in the form, Zope raises the "list index out of range" error shown in detail at the end of this e-mail. Then I took the whole Data.fs, put it on one of our servers, where everything worked as usual. Since our client wants to create various ZCatalogs, he has to use this functionality :-/ Any ideas where to start looking for the reason of this error? Our client's server's configuration is the following: Zope version: Zope 2.2.4 (source release, python 1.5.2, linux2) [ I have also tried with 2.2.2 source] Python version: 1.5.2 (#1, Aug 25 2000, 09:33:37) [GCC 2.96 2731 (experimental)] System Platform: linux-i386 [RedHat 7.0] Any help is greatly appreciated! Martin ___ Here is the output when I submit the form "Find Items to ZCatalog": Error Type: IndexError Error Value: list index out of range Traceback (innermost last): File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.4-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_catalogFoundItems) File /usr/local/Zope-2.2.4-src/lib/python/Products/ZCatalog/ZCatalog.py, line 321, in manage_catalogFoundItems (Object: Traversable) IndexError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] access log analyzer (analog, webalizer etc.)
Hi listies, since we all use names for urls that are not "standardized" - ending with ".html", ".gif" etc - I am wondering how to do a good logfile analyzing with standard tools like those in the subject line. I am usually running zope behind a http-accelerated squid, so I've configured squid to use "emulate_httpd_log on". But how webalizer doesn't recognize whether it's an image or html output. Did someone already write a tool that converts these logfiles like this (or similar): logfileconverter reads the logfile line by line -- checks against the ZODB whether the url outputs a "jpg", "gif" or "html" -- converts the line in the logfile accordingly (e.g. "/mydir/mymethod" to "/mydir/mymethod.html" and "mydir/mypic" to "mydir/mypic.jpg") -- then saves the modified logfile to disk or pipes it to webalizer. Thanks for your input! Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope restarting itself?
Hi listies, maybe someone of you heard of a feature that Zope can restart itself when it dies abnormally. (Linux/Unix version). I found such a service for Windows NT, but not for Linux, although I am sure that I saw it a while ago somewhere... Is this just a parameter for z2.py or is there a special program for this task? Hoping for help, Martin -- Sent through GMX FreeMail - http://www.gmx.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] strange behaviour of ZSQL methods
Hi listies, something strange is happening with my ZSQL methods. I have a huge query that works great when testing it in the management-interface - it returns about 10 records or so. but when I implement it into a dtml-method getting the parameters via X-Y-GMX: $flush REQUEST as usual, I am getting the whole database in return. I'm quite sure that it's my own fault, so I'd like to see the translated SQL-query in the dtml-method to check for the wrong fields. Is there a tag for it like: dtml-var MyZSQLQuery showRenderedSQLsource ? This problem drives me nuts since already two days :-(( Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope+PostgreSQL
At 19:02 28.11.2000, Robert Senger wrote: The ZPoPyDA module refuses to work properly. I'm using ZPygreSQLDA - just installed it today on yet another server and have no problems with it. Just read the README-file thoroughly and you should be successful in an hour or so. Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Pseudo E-Mail Address validation
At 10:58 22.11.2000, Frank Tegtmeyer wrote: There is a "monster" regular expression made by Tom Christiansen I think. A link is on http://www.perl.com/pub/doc/manual/html/pod/perlfaq9.html#How_do_I_check_a_valid_mail_addr Yes, I know this link - especially the absolutely voodoo-style regex by J. Friedl ("Mastering Regular Expressions", O'Reilly). I tried to "pythonify" the regex, but I failed. Python exits with some strange errors. Maybe Python is not that exceptionally good in regex as Perl? *duck* So I'm using the simpler method proposed by Dennis Nichols in this thread. Thanks Dennis! Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] URL-problem
At 12:19 21.11.2000, Jan Van de Vyle wrote: The problem is I've got a website which should have an admin-interface.This interface should only be visible if you call i.e. admin.website.com. If you call web.website.com you reach the normal browse view. If you have Apache in front of Zope (good idea!), you should be able to use Apache's mod_rewrite to implement this behaviour. See http://www.apache.org/docs/mod/mod_rewrite.html But beware! The documentation starts with "Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo." (-- Brian Moore) Maybe the easier module mod_alias could help you as well: http://www.apache.org/docs/mod/mod_alias.html#redirectmatch You have to split your URLs into parts and redirect to the correct location eg: User types http://admin.lifeofbrian.com/brightside, Apache sees the "admin" and redirects to http://localhost:8080/brightside/manage. On the other hand: Is it so hard to type "/manage" after the url to connect to the management interface? hth, Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Pseudo E-Mail Address validation
Hi all, For a subscription tool of a mailing list I'd like to quick-check the e-mail address our users type. Is there a little product/method etc. available that does this? I know that you can only be sure whether an e-mail address exists or not, when you actually send a mail to the user, but a quick-n-dirty check would be nice. Maybe even complete RFC-compliancy as implemented in some Perl-Modules? (spaces, "@" sign, dot-notation etc.) Hoping for an answer, Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] You are currently working in version No
At 18:41 21.11.2000, Wolfgang Strobl wrote: After saving and leaving a version named "neu", I'm now confronted with a system which says "You are currently working in version No " right after I enter a management screen, and before I really enter anything. It seems to me that the cookie set for leaving a version as buggy content. Quitting your browser and eventually deleting your cookies that are used with your website should change things back to normal. Maybe a developer could do a search'n'replace in this part of Zope from "No" to "''" (or whatever the "no-version"-cookie is)? ;- Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] snappier zope.org/how to make sites as snappy
At 02:28 20.11.2000, you wrote: i've increased the cache numbers in Control_Panel. i've also increased the thread numbers. i've moved graphics to be served by apache. not the best idea to serve graphics by apache. The setup in our company seems nice to me and looks like this: squid in http-accelerated mode - see the various squid-related HowTo's (listening on port 80 and sending requests to port 81) - apache for ssl-functionality - configured as in Howto "Apache+ZServer+SSL" (listening on port 81 and on port 443 (ssl)) - ZServer (listening on port 8080) BTW: we do not use the FTP-Server feature of Zope, since it sometimes kills all Zope servers - tested on 2 different machines with different flavours of Linux :-( Don't forget to tell squid that it can cache your pages a while (we use 1hour=3600secs): standard_html_header should start with something like this: dtml-call "RESPONSE.setHeader('Expires', _.DateTime(_.DateTime().timeTime() + 3600).toZone('GMT').rfc822())" dtml-call "RESPONSE.setHeader('Last-Modified', bobobase_modification_time().toZone('GMT').rfc822())" html... (the dtml-source is from "Howto: Caching with mod_proxy", but Apache didn't work right for us: it stored broken images in its cache, so we use squid in front of apache as proxy, and apache for ssl-redirects.) the setup as described above works great for us: Zope (and PostgreSQL behind it) doesn't have much to do, since all graphics and html-outputs are stored in squid for 1 hour. (except with shift-reload, of course) Hope that helps, Martin PS: no line-breaks used here because of code samples. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Search and replace
At 14:59 20.11.2000, Lee Hunter wrote: Maybe the manufacturers of Spam send your company a lawyer's letter saying that use of the word 'Spam' on your website infringes on their trademark [...] Now I got it. Well, nobody expected a lawyer's letter or the Spanish Inquisition... But then, the s/r is getting really complex, since you also wrote about possible Squishdot discussions with the "bad" word. Maybe this s/r feature could be implemented in ZCatalog, so it would be possible to search in each and every ZCatalog-aware thing that we have on our website (not just dtml-docs and methods). On the other hand situations like these should not occur too often, so I personally would prefer the XML-Export, favourite-editor-semi-manual-replace and XML-Import again. I just wanted to express that this feature may be too hard to program for the (IMHO) rare cases that we really need it, but IF there are developers who'd like to implement such a nice s/r possibility, I'd be glad to install it - just in case lawyers, the Spanish Inquisition or Santa Claus are knocking at my door complaining that "spam", "witch" or "christmas" is trademarked by them :-) Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Search and replace
At 21:03 19.11.2000, you wrote: Is there any way to do a 'search and replace' in a Zope folder (and it's subfolders)? AFAIK: no. But on the other hand: why do you need it? That's what objects are for... Just create a method with the text that may change sometimes and is displayed on many pages, and include it with dtml-var ... One possibility I see is: export the folder as XML, edit the file in your favourite text-editor and do a search 'n replace. (with the dtml-var, of course ;-) Then import the file again. Hope this helps, Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )