[Zope] Re: [Zope3-dev] Zope 3.1.0 RC 3 released!
In this release (and earlier 3.1 releases), there is a zdaemon test failure if you install with Python 2.4 on Unix. This is a spurious failure. The test tries to execute a script (zdaemon/tests/donothing.sh) and the installation process is making this script non-executable. We'll need to look into why the execution permissions are being cleared, or, better yet, rewrite the test to use sh to invoke the script. In the mean time, you should not be alarmed by the failure. Jim Stephan Richter wrote: The Zope 3 development team is proud to announce Zope 3.1.0 candidate 3. Zope 3 is the next major Zope release and has been written from scratch based on the latest software design patterns and the experiences of Zope 2. It is in our opinion that Zope 3.1 is more than ready for production use, which is why we decided to drop the 'X' for experimental from the name. We will also continue to work on making the transition between Zope 2 and Zope 3 as smooth as possible. As a first step, Zope 2.8 includes Zope 3 features in the form of Five. Now that we have a release that we would like to declare stable next week, we are looking for translators, who translate Zope 3 into their favorite language! We are utilizing the Rosetta system from Ubuntu for managing those translations. If you are not familiar with Rosetta, please send us a mail to zope3-dev@zope.org and we get you set up. Downloads http://zope.org/Products/Zope3/ Installation instructions for both Windows and Un*x/Linux are now available in the top level 'README.txt' file of the distribution. The binary installer is recommended for Windows. Zope 3.1 requires Python 2.3.5 or 2.4.1 to run. You must also have zlib installed on your system. Changes Since 3.1.0c2 - Fixed several bugs that were considered critical. * Ported Stuart Bishop's work in ``pytz`` and ``zope.i18n`` to address broken and misleading timezone code (i.e., one issue was broken and another was misleading). * Fixed apidoc to handle extended paths, so that zope packages could be installed in software instances without apidoc losing knowledge of the core zope code. * Added custom ``executemany()`` method for cursors created through GadflyAdapter. See http://www.zope.org/Collectors/Zope3-dev/445 for discussion. - Updated ZODB to 3.5.1b2. Most Important Changes Since 3.0 - New Pluggable Authentication Utility (PAU), which is similar in philosophy to the Zope 2 PAS. The following features are available in the in the basic PAU facility: + Credentials Plugins: Basic HTTP Auth, Session + Authenticator Plugins: Principal Folder, Group Folder For a detailed description of the pluggable authentication utility, see 'zope/app/authentication/README.txt'. - Major simplifications to the component architecture: + Removal of the concept of a service. All outstanding services were converted to utilities: Error Reporting, FSSync, Authentication. + Site Managers are global and local now; adapters and utilties are directly registered with the site manager. Now global and local component registration and lookup behaves very similar. + Local registrations can now only have two states: active and inactive. This simplified the code so much, that 'zope.app.utility', 'zope.app.registration' and 'zope.app.site' were all merged into 'zope.app.component'. + Implemented menus as utilities. The API also supports sub-menus now. + Implemented views as adapters. Skins and layers are now simply interfaces that the request provides. - Added an integer-id facility for assigning integer identifiers to objects. - Added basic catalog and index frameworks. - Added "sources", which are like vocabularies except that they support very large collections of values that must be searched, rather than browsed. - Created a new granting UI that allows advanced searching of principal sources. - Implemented a generic user preferences systsem that was designed to be easily used in TALES expressions and via Python code. Preferences can be edited via 'http://localhost:8080/++preferences++/'. A demo of the preferences can be found at:: http://svn.zope.org/Zope3/trunk/src/zope/app/demo/skinpref/ - ZCML now supports conditional directives using the 'zcml:condition' attribute. The condition is of the form "verb argument". Two verbs, 'have feature' and 'installed module' are currently implemented. Features can be declared via the 'meta:provides' directive. - Improved API doctool: Code Browser now shows interfaces, text files and ZCML files; the new Book Module compiles all available doctext files into an organized book; the new Type Module lets you browser all interface types and discover interfaces that provide types; views are shown in the interface details screen; views and adapters are categori
Re: [Zope] High Traffic Zope Portal
--On 16. September 2005 15:09:37 -0300 Jeronimo Zucco <[EMAIL PROTECTED]> wrote: We posted a dynamic document for the students (35.000). The document is generated using queries in MySql database, after user autentication using mysqluserfolder. The python processes occupied 100% of machines resources (cpu and memory), and the load average increased quickly. We evidenced that the problems had occurred before user authentication, only trying access the initial page of the Zope portal. We estimated that the simultaneous accesses to our portal are approximately 1 people in a moment, that finished generating a DoS (Denial of Service) in our portal. Short answer: all requests are processed by four worker thread - one after each other. If the threads are busy, all other requests have to wait in the request pipeline. When you document is generated but static for all users then you should make it cachable and so it can be emitted through the Apache cache. -aj pgpLRQTe1tc53.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] Character set problems
Dear Dragos and everyone,I have the problem narrowed down to the Apache/Zope connection. I've more or less decided I want to stick with ISO-8859-1 because moving everything to UTF-8 didn't really help me out. All in ISO-8859-1 works fine with Zope stand-alone, but unfortunately Apache needs to bridge it. As of right now, running it through the Apache bridge gives me the following: HTTP/1.1 200 OKDate: Fri, 16 Sep 2005 19:38:27 GMTServer: Zope/(Zope 2.7.4-0, python 2.3.5, freebsd5) ZServer/1.1Content-Type: text/html;charset=utf-8Transfer-Encoding: chunkedwhereas doing it through Zope gives me the following header: HTTP/1.1 200 OKServer: Zope/(Zope 2.7.4-0, python 2.3.5, freebsd5) ZServer/1.1Date: Fri, 16 Sep 2005 19:32:33 GMTContent-Length: 3941Content-Type: text/html; charset=iso-8859-1I'm a little bit confused as to why Apache changes the character-set and encoding. My Apache setup for the virual host is this: ServerAdmin [EMAIL PROTECTED] ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ DocumentRoot /home/mysite ServerName www.mysite.dk ServerAlias mysite.dk ErrorLog /var/log/www.mysite.dk-error_log CustomLog /var/log/www.mysite.dk-access_log common ## proxy_html_module conf ProxyHTMLURLMap http://localhost:8080 http://www.mysite.dk SetOutputFilter proxy-html RequestHeader unset Accept-Enconding AddDefaultCharset ISO-8859-1 CharsetDefault ISO-8859-1What am I missing that makes the encoding go UTF-8? Not that it matters, but the HTML also contains Thanks for all your help so farCheers NikOn 9/9/05, Dragos Chirila <[EMAIL PROTECTED]> wrote: HiHere are some things you can do to handle your problem. For me, thisapproach worked just fine.1. Your HTML pages must have set the encoding to utf-8. Put this in theHEAD tag of your html pages: 2. For the Root folder add a property named 'management_page_charset' oftype 'string' with the value 'utf-8'. In this way the ZMI pages will be displayed with utf-8 encoding.3. Modify your HTML code like this:If 'test' is also a property of some object, make sure it has 'ustring' type.After that the value will be displayed correctly in all pages.Note: If your Zope runs over an Apache you must check also the Apachesettings (to serve pages utf-8 encoded)Hope this will help. Regards,DragosNiklas Saers wrote:> Hey guys,> I've installed Zope on a FreeBSD server. My problem domain is very> small: display a list of when people are unavailable, and let people > update the list. This is all in Danish, and here are come my problems.> Danish has three extra letters not in the ASCII alfabet, three> upper-case and three lower-case. When getting the data from a > name="test" /> where I've written "æ ø å Æ Ø Å", I get: æ ø Ã¥ Æ Ø Ã…>> What is the standard way of ensuring that I get the correct data?>> I tried writing a little converter, but the string >> tekst = tekst.replace("\xc3\xa6", "ae");>> gives me the error *UnicodeDecodeError: **'ascii' codec can't decode> byte 0xc3 in position 0: ordinal not in range(128)* >> Do you have any suggestion on how to overcome these problems?>> Cheers>>Nik>>> >> ___> 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] High Traffic Zope Portal
> Have someone experience in sites of great traffic using Zope? If so, > please give us some tip for tunning the system or discover the > bootleneck points. This is a FAQ* and has been discussed recently; the list archives might be helpful. I have a bunch of links to performance docs here: http://www.slinkp.com/code/zopestuff * unfortunately, there is no real FAQ list for this mailing list that I know of. -PW ___ 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] High Traffic Zope Portal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We use zope with the following environment: - - Zope 2.7.4-0 - - ZCoMIX-1.0.2+ (http://sourceforge.net/projects/zcomix) - - mysqlUserFolder 1.0.0 - - python 2.3.4 - - Red Hat Enterprise Linux ES release 2.1, kernel 2.6.11, ext2 fs - - MySQL-server-4.0.20 - - Apache 2.0.50 (with HTTPS) for cache 1 Portal replicated through Zeo and balanced with DNS Round Robin. Hardware: 2 Servers HP ML350 G4 with Dual Intel Xeon 2.80GHz, 3Gb of Memory, without RAID, SCSI U320 with 4 disks 120gb. We posted a dynamic document for the students (35.000). The document is generated using queries in MySql database, after user autentication using mysqluserfolder. The python processes occupied 100% of machines resources (cpu and memory), and the load average increased quickly. We evidenced that the problems had occurred before user authentication, only trying access the initial page of the Zope portal. We estimated that the simultaneous accesses to our portal are approximately 1 people in a moment, that finished generating a DoS (Denial of Service) in our portal. To resolve the problem momentarily, we posted static documents in PHP, without Zope. Have someone experience in sites of great traffic using Zope? If so, please give us some tip for tunning the system or discover the bootleneck points. We have doubts if what it is generating the problem is the ZCoMIX or the Zope, or even though the configuration of Apache. - -- Jeronimo Zucco LPIC-1 Linux Professional Institute Certified Núcleo de Processamento de Dados Universidade de Caxias do Sul "May the Source be with you." - An unknown jedi programmer. http://jczucco.blogspot.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDKwphTCq0VJ4DIPwRAoCWAJ9ILkzxHiCNKd3Uq9Y8T+Gi/YmopQCgjPY/ ytXv2M1K7rZ2EgzDEbpJtVI= =8sTe -END 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] how to programmatically control zope?
Hi. This discussion has really helped me with my question about running asynchronous methods also since these kinds of requests could be cronned at the very least. But what about triggering this kind of script from the running zope instance. Is this possible? What I am hoping to accomplish is when a user uploads a file it triggers the long-running script - the one I want to inject into ZEO (and gives the user immediate feedback) so they are not waiting for the process to complete. At the end of the long running process, I want to send them an email advising that the process was successful. I am just setting up ZEO for first time today. I am anxious to give something like this a try. Many thanks. Regards, David On Friday, September 16, 2005, at 12:28 PM, Paul Winkler wrote: cd MyInstanceHome ../bin/zeoctl start # ZEO is now running in the background. ../bin/zopectl start # Zope is now running in the background, connected to ZEO. ../bin/zopectl run myscript.py & # I'm now running a script via zopectl in the background. # This can run at the same time as Zope, because it runs as # a separate process and talks to Zeo, which accepts many clients # at once. ___ 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: Zope Foundation?
Andreas Jung wrote: What is the current status of the ZF? The process is proceeding swiftly, and hopefully smoothly. We have draft documents of the TM Agreement and the By-Laws, and are well along the way to drafts of the IP Policy and the remaining documents. We have formed a small committee of some representative groups in the Zope community, cutting across interests and geography, and we have IRC meetings to make sure that at the highest level, the initial documents will represent a broad community interest. Before the actual formation of the Foundation, we will post all of the relevant documents for public comment, so those that are not on the current committee will still get a chance to weigh in before the By-Laws (for example) become final. Even after that, the Membership can alter the By-Laws in the future, so this is just the "starting point". It's still quite possible that everything will be wrapped up by the end of October (as originally projected), but we did have the delay in starting (more on that below) and there's still a lot to do, so it could slip a bit, but we certainly are doing everything in our power to make that date. Any progress happened on the outstanding trademark issue with ZEA? I was hoping to avoid this topic in public, given the heat it generated in the past. However, it doesn't seem fair to avoid a direct question, given some recent turns. We have had _numerous_ discussions (all in email) with two members of ZEA. We came to an agreement and all seemed perfectly on target, which is why we began all of the other ZF documents and committee meetings, etc. Unfortunately, ZEA never delivered a single draft of the proposed transfer documents, even though they said that the documents already existed for the Plone trademark transfer. We have been amazingly patient, and have waited _weeks_ between attempts to remind them, bug them, etc. Each time, we get a "sorry, we don't know how much longer it will be, but it shouldn't be much longer." This week, we informed ZEA that we had restarted our original legal challenge to their TM filing, as we simply can't understand the delay and complete lack of communication. Since the legal challenge is likely to take significantly longer than a contractual transfer, it is not possible to have that completed by the time the Foundation would be ready to be launched. Our original plan (which caused the previous public ruckus) was to hold off on the Foundation until this was resolved. This week, before we restarted the legal process, Rob Page made an alternate proposal internally, which seems reasonable to me. While we haven't officially decided to do this, it is very likely that we will: In the event that we have not secured the transfer of the TM registrations from ZEA by the time the Foundation is launched, the Foundation will _not_ have an initial TM license from ZC. The Foundation will still exist, and might get a more limited TM license from ZC, or perhaps even none at all. Whenever the ZEA TM matter is resolved, we'll proceed with the correct TM license for the Foundation. I'm very sorry to be reporting the above. The people that we have worked with at ZEA have been very reasonable, and have come to an amicable solution with a minimum of hassle on either side. Unfortunately, they have simply failed to deliver even a single draft page of a document for us to review, and that is no longer an acceptable situation. ___ 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] FileSystemSite does not register file extension
Marco Bizzarri wrote at 2005-9-16 10:40 +0200: > ... >The problem now is that the registration works for all extensions but the >gif one. > ... >Any suggestion? Debugging in an interactive Python interpreter. There is a Plone HowTo explaining how an interactive Python interpreter can be used to debug a Zope/Plone application. -- 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] Re: zope is selfrestarting: can't uninstall a product!
daniele wrote at 2005-9-16 00:57 +0200: > ... >-- >2005-09-15T20:09:15 ERROR(200) ZODB Couldn't load state for 0x01213c >Traceback (most recent call last): > File "/hdb/zope/lib/python/ZODB/Connection.py", line 600, in setstate > self._set_ghost_state(obj, p) > File "/hdb/zope/lib/python/ZODB/Connection.py", line 639, in >_set_ghost_state > state = unpickler.load() >ImportError: No module named ZPhotoSlides.photo_edition.exif >-- >2005-09-15T20:09:16 INFO(0) Zope Shutting down with exit code 1 > > >This is the same error, *every time* zope server restart itself. So the >problem is that Zope can't "forget" ZPhotoSlides, and at a certain point > it tries to load a module that doesn't exist anymore. But, in general, Zope does not perform an "exit(1)" in this case. You get the "ImportError" because you still have instances in your storage that references ZPhotoSlides. When these instances are touched, the "ImportError" occurs. However, Zope will create a fake object for the failing load and continue to run... >I think, someone correct me please, that this module call is generated >by the remaining ZPhotoSlides objects (my old galleries, with all the >photos, comments and ratings). Yes. >At a certain point, Zope tries to *unpickle* these objects: being them >instances of a non-existing class, this unpickling generates the >deathful error Yes. >and zope restart Usually, not. >So my question is: if my reasoning is correct, Partially. is it possible save all >the data pickled in my ZPhotoSlides objects (waiting a future release), >avoiding the current autorestarting error??? You can make a backup copy of your storage and then delete the old galleries (you will see exceptions in your logfile). You can only get out the objects in a meaningful way, when you have a working "ZPhotoSlides" product installed. -- 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] Installing Python Modules Under Zope On Windows
[EMAIL PROTECTED] wrote at 2005-9-16 10:23 -0500: > ... >With Zope 2.8.1, the "default" setting seems to be using the embedded >Python interpreter that came with Zope. Look in the startup batch files. Replace the Python call, you find there, by a call to your system Python. -- 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] Zope 3.1.0 RC 3 released!
The Zope 3 development team is proud to announce Zope 3.1.0 candidate 3. Zope 3 is the next major Zope release and has been written from scratch based on the latest software design patterns and the experiences of Zope 2. It is in our opinion that Zope 3.1 is more than ready for production use, which is why we decided to drop the 'X' for experimental from the name. We will also continue to work on making the transition between Zope 2 and Zope 3 as smooth as possible. As a first step, Zope 2.8 includes Zope 3 features in the form of Five. Now that we have a release that we would like to declare stable next week, we are looking for translators, who translate Zope 3 into their favorite language! We are utilizing the Rosetta system from Ubuntu for managing those translations. If you are not familiar with Rosetta, please send us a mail to zope3-dev@zope.org and we get you set up. Downloads http://zope.org/Products/Zope3/ Installation instructions for both Windows and Un*x/Linux are now available in the top level 'README.txt' file of the distribution. The binary installer is recommended for Windows. Zope 3.1 requires Python 2.3.5 or 2.4.1 to run. You must also have zlib installed on your system. Changes Since 3.1.0c2 - Fixed several bugs that were considered critical. * Ported Stuart Bishop's work in ``pytz`` and ``zope.i18n`` to address broken and misleading timezone code (i.e., one issue was broken and another was misleading). * Fixed apidoc to handle extended paths, so that zope packages could be installed in software instances without apidoc losing knowledge of the core zope code. * Added custom ``executemany()`` method for cursors created through GadflyAdapter. See http://www.zope.org/Collectors/Zope3-dev/445 for discussion. - Updated ZODB to 3.5.1b2. Most Important Changes Since 3.0 - New Pluggable Authentication Utility (PAU), which is similar in philosophy to the Zope 2 PAS. The following features are available in the in the basic PAU facility: + Credentials Plugins: Basic HTTP Auth, Session + Authenticator Plugins: Principal Folder, Group Folder For a detailed description of the pluggable authentication utility, see 'zope/app/authentication/README.txt'. - Major simplifications to the component architecture: + Removal of the concept of a service. All outstanding services were converted to utilities: Error Reporting, FSSync, Authentication. + Site Managers are global and local now; adapters and utilties are directly registered with the site manager. Now global and local component registration and lookup behaves very similar. + Local registrations can now only have two states: active and inactive. This simplified the code so much, that 'zope.app.utility', 'zope.app.registration' and 'zope.app.site' were all merged into 'zope.app.component'. + Implemented menus as utilities. The API also supports sub-menus now. + Implemented views as adapters. Skins and layers are now simply interfaces that the request provides. - Added an integer-id facility for assigning integer identifiers to objects. - Added basic catalog and index frameworks. - Added "sources", which are like vocabularies except that they support very large collections of values that must be searched, rather than browsed. - Created a new granting UI that allows advanced searching of principal sources. - Implemented a generic user preferences systsem that was designed to be easily used in TALES expressions and via Python code. Preferences can be edited via 'http://localhost:8080/++preferences++/'. A demo of the preferences can be found at:: http://svn.zope.org/Zope3/trunk/src/zope/app/demo/skinpref/ - ZCML now supports conditional directives using the 'zcml:condition' attribute. The condition is of the form "verb argument". Two verbs, 'have feature' and 'installed module' are currently implemented. Features can be declared via the 'meta:provides' directive. - Improved API doctool: Code Browser now shows interfaces, text files and ZCML files; the new Book Module compiles all available doctext files into an organized book; the new Type Module lets you browser all interface types and discover interfaces that provide types; views are shown in the interface details screen; views and adapters are categorized into specific, extended and generic; user preferences allow you to customize certain views; 3rd party modules can now be added to the Code Browser. - Improved I18n-based number and datetime formatting by integrating 'pytz' for timezone support, implementing all missing format characters, and reinterpreting the ICU documentation to correctly parse patterns. - Added '++debug++' traversal adapter that allows you to turn on debugging flags in 'request.debug'. Currently the fo
Re: [Zope] how to programmatically control zope?
Paul Winkler wrote: (snip) > > > yep, I like working that way, and Bruno's introduction is excellent. Thanks > One clarification however: > > >>1/ You can't run zopectl debug or zopectl run while you instance is >>running (as it locks the ZODB). The solution here is to set up a zeo >>instance (this is really easy), and have 2 zope instances, one serving >>the web requests, the other being used for debug/run > > > That's a bit misleading. > With ZEO, you don't need two full instances (by which i mean directories > containing their own etc, bin, var, and log subdirectories). > You can run the Zeo server AND one Zope server out of a single instance > home at the same time; and since your zopectl scripts won't normally > involve starting up on a tcp/ip port, you can run those from the same > instance too. I do it all the time. > Woops ! Seems obvious when explained, but I missed that point. Doh :( Thanks Paul, this will simplify my sandbox setup scripts !-) -- Bruno Desthuilliers Développeur [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] aquistion probleme
> > > hello > > I'm trying an acquisition, but I must be doing something wrong... > > I've got a setting like this : > > /dir1/dir2_1/dir3_1 > /dir1/dir2_2/dir3_2 > /dir1/dir2_2/img.jpg > /img.jpg > > I write somthing like : > context['img.jpg'].absolute_url() > > I expect to get /dir1/img.jpg, in all cases Why do you expect that? There is no img.jpg in dir1. Also, absolute_url() includes protocol, server, port, and virtual hosting configuration if you are using one. So, if there is no virtual hosting in effect, you should expect http://your_server:your_port/img.jpg > but when the script > runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2 In that case you should expect to get http://your_server:your_port/dir1/dir2_2/img.jpg (with modifications for virtual hosting if applicable). > unfortunately, that's not what happends... what DOES happen? Always a good idea to include that information with problem reports :-) -PW ___ 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] how to programmatically control zope?
> akonsu wrote: >> hello, would someone please point me to the right direction? what is >> the preferred way to control a zope server programmatically? i need to >> be able to administer my zope instance from a script. add users, >> change permissions, create new sites, add objects to the sites. there >> is webdav, xml-rpc, what else? Here's an overview of web-based techniques that might be useful... http://www.plope.com/Books/2_7Edition/ScriptingZope.stx#1-9 but I prefer doing as Bruno does: > Interactively control/inspect/play with the server: > /bin/zopectl debug > > Run a script on the server: > /bin/zopectl run [args...] yep, I like working that way, and Bruno's introduction is excellent. One clarification however: > 1/ You can't run zopectl debug or zopectl run while you instance is > running (as it locks the ZODB). The solution here is to set up a zeo > instance (this is really easy), and have 2 zope instances, one serving > the web requests, the other being used for debug/run That's a bit misleading. With ZEO, you don't need two full instances (by which i mean directories containing their own etc, bin, var, and log subdirectories). You can run the Zeo server AND one Zope server out of a single instance home at the same time; and since your zopectl scripts won't normally involve starting up on a tcp/ip port, you can run those from the same instance too. I do it all the time. Example (for any unix-like environment): cd MyInstanceHome ../bin/zeoctl start # ZEO is now running in the background. ../bin/zopectl start # Zope is now running in the background, connected to ZEO. ../bin/zopectl run myscript.py & # I'm now running a script via zopectl in the background. # This can run at the same time as Zope, because it runs as # a separate process and talks to Zeo, which accepts many clients # at once. ../bin/zopectl debug # I am now interacting with ZEO via a python shell. # Again, this is a separate process connecting to Zeo so I can do this # as many times as I want simultaneously. It's only when you want to run multiple Zope server processes on multiple ports simultaneously that you actually need to set up multiple instance homes. -PW ___ 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] Installing Python Modules Under Zope On Windows
I have a hardware constraint where I have to run Zope on Windows. This has worked pretty well for me because Zope 2.7 used my "system" instance of Python 2.3.x. At least, that's my assumption since runzope.bat pointed at the system instance of Python. This setup was nice because it made it very easy to install Python modules (like PIL). When I ran the module installation executable, it would find my system instance of Python in the registry and install the module properly. With Zope 2.8.1, the "default" setting seems to be using the embedded Python interpreter that came with Zope. This is a problem because the embedded versions of Python do not appear in the registry, making it impossible to install a lot of Python modules on Windows. I thought that the following script (http://effbot.org/zone/python-register.htm) would allow me to add embedded versions of Python to my registry. However, you can't add more than one major version of a python release (2.2, 2.3, etc) to the registry. So if my system version of Python is the 2.3.x branch, and I want to use an embedded 2.3.x version of Python with Zope, then I'm out of luck if I want to install many Python modules with it. I can still edit runzope.bat so that it points at the system instance of Python, but I don't know if this is a best practice. Has anyone had any luck installing Python modules in an embedded version of Python on Windows? Is there a better way to work around this than referencing the system version of Python in the runzope.bat file? Thanks in advance for any help! Tom Purl ___ 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] aquistion probleme
On 9/16/05, chetzacoalt <[EMAIL PROTECTED]> wrote: > > > hello > > I'm trying an acquisition, but I must be doing something wrong... > > I've got a setting like this : > > /dir1/dir2_1/dir3_1 > /dir1/dir2_2/dir3_2 > /dir1/dir2_2/img.jpg > /img.jpg > > I write somthing like : > context['img.jpg'].absolute_url() > > I expect to get /dir1/img.jpg, in all cases but when the script > runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2 > > unfortunately, that's not what happends... No, the absolute_url() will reflect how you are getting the image. context['img.jpg'].aq_inner.absolute_url() may do what you expect. > may someone help me ? Sure. What's the problem? :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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] aquistion probleme
hello I'm trying an acquisition, but I must be doing something wrong... I've got a setting like this : /dir1/dir2_1/dir3_1 /dir1/dir2_2/dir3_2 /dir1/dir2_2/img.jpg /img.jpg I write somthing like : context['img.jpg'].absolute_url() I expect to get /dir1/img.jpg, in all cases but when the script runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2 unfortunately, that's not what happends... may someone help me ? 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 )
[Zope] acquisition probleme
hello I'm trying an aquisition, but I must be doing something wrong.. I'd got a setting like this : /dir1/dir2 ___ 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?
What is the current status of the ZF? Any progress happened on the outstanding trademark issue with ZEA? -aj pgpUuAeE7MdPR.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] Re: MemoryError that brings my zope to its knees
George Donnelly wrote: the kernel limits the amount of ram a process can bind by default. try the following put this in /boot/loader.conf kern.maxdsiz="1610612736" kern.dfldsiz="1610612736" kerm.maxssiz="1610612736" Thanks for the hint George, I was able to accomplish this using only the loader.conf stuff. I checked with ulimit after a reboot and I now the data seg size is 1G. That should hold it for a while. Thanks again, Calvin -- S i x F e e t U p | "Nowhere to go but open-source" Silicon Valley: +1 (650) 401-8579 | Midwest: +1 (317) 861-5948 Toll-Free: 1-866-SIX-FEET mailto:[EMAIL PROTECTED] http://www.sixfeetup.com | Zope Hosting from $19.95/month ___ 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] FCGIServer broken pipe on Zope 2.8.1?
--On 16. September 2005 09:59:00 +0100 Petri Savolainen <[EMAIL PROTECTED]> wrote: If you really mean FCGI, what should be used instead? I understood that at least in the past, there was a per-request tcp/ip setup/teardown tax coming with apache mod_proxy which made something like FCGI a better alternative? Is this no longer the case, due to apache improvements perhaps, or is there something else? The recommended and most often used approach is: Zope + reverse proxy (Squid or Apache). The FCGI code has not been touch for ages, nobody cares about the FCGI code, serious people don't use FCGI with Zope...so you should follow the straight forward approach and use a reverse proxy (which is documented in a bunch of documentation). -aj pgpOglNjViBdd.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] how to programmatically control zope?
akonsu wrote: > hello, would someone please point me to the right direction? what is > the preferred way to control a zope server programmatically? i need to > be able to administer my zope instance from a script. add users, > change permissions, create new sites, add objects to the sites. there > is webdav, xml-rpc, what else? Interactively control/inspect/play with the server: /bin/zopectl debug Run a script on the server: /bin/zopectl run [args...] There are a few tricks however: 1/ You can't run zopectl debug or zopectl run while you instance is running (as it locks the ZODB). The solution here is to set up a zeo instance (this is really easy), and have 2 zope instances, one serving the web requests, the other being used for debug/run 2/ changes made from the debug interactive shell or a script needs to be explicitely commited. The idiom is: # ... your code here get_transaction.commit() app._p_jar.sync() # app is the root zope object 3/ When accessing your zope server this way, you have the default Anonymous role. If you need Admin privileges (which may well be the case !-), you have to 'log in' by code. Here's a snippet I stoled from I-Can't-Remember-Where-But-Thanks-Anyway(tm) : from AccessControl.SecurityManagement import newSecurityManager def login(app, username): acl = app.acl_users user = acl.getUserById(username) assert user is not None user = user.__of__(acl) newSecurityManager(None, user) login(app, "myadminlogin") 4/ Some Products or methods may need a REQUEST object, which is not provided by default. Here's a way to simulate one: from os import environ from sys import stdin, stdout from ZPublisher.HTTPRequest import HTTPRequest from ZPublisher.HTTPResponse import HTTPResponse from ZPublisher.BaseRequest import RequestContainer from ZPublisher import Publish from thread import get_ident def makerequest(app, stdout=stdout): # copy/hacked from Testing.makerequest resp = HTTPResponse(stdout=stdout) environ['SERVER_NAME']='foo' environ['SERVER_PORT']='80' environ['REQUEST_METHOD'] = 'GET' req = HTTPRequest(stdin, environ, resp) # first put the needed values in the request req['HTTP_ACCEPT_CHARSET'] = 'latin-15' req['HTTP_ACCEPT_LANGUAGE'] = 'fr' # etc, just fill what you need in the request # then store the request in Publish._requests # with the thread id id = get_ident() Publish._requests[id] = req # ok, let's wrap and return return app.__of__(RequestContainer(REQUEST = req)) app = makerequest(app) Most - if not everything - of what you do via the ZMI can be done by code. Reading the ZMI and the base Products source code may be a good way to learn the API. > which one is the right way to do it? Depends on your needs. > i am a newbie i hope this is not a frequent question, at least i did > not find an answer in the documentation... This is usually not what newbies starts with !-) And I'm afraid that Zope's documentation is not always that helpful to newbies - not that it's that bad, but documentation, being freely contributed, is not always the strongest point of OSS projects, and Zope is quite a complex application anyway, so it's not easy to document. There again, it's mostly "Use The Code, Luke". HTH -- Bruno Desthuilliers Développeur [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 )
[Zope] FileSystemSite does not register file extension
Hi all. I'm using the FileSystemSite product in a pure Zope application. Inside it, I'm registering some extensions (gif, png, jpg, etc.) in order to work with a subclass of FSImage. The problem now is that the registration works for all extensions but the gif one. This has changed from one day to another. Now, I understand this is something we did, but I've no clue in what we could have changed. Works = With a png, I've my FSImage subclass used. With a gif, I've the FSImage used. Also, with the gif I've the '.gif' added to the id of the object, while with the other image I don't have it. Any suggestion? -- Icube Srlhttp://www.icube.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 )