[Zope] apache rules with zope

2009-09-04 Thread Thomas Bennett
I can access two directories in /var/www but not two others.
I have this rule in httpd.conf before the rewrite rules for Zope:

RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)

The usage and zusage directories work, that is /usage goes to the 
/var/www/usage directory not looking on Zope/ZODB.  Same with the zusage 
directory.  But ead2002 and asu_ead directories give a Not Found error from 
Zope.  The Alias  and Directory tags in httpd.conf are the same for all four.

The ead2002 and asu_ead directories were added after disabling SE Linux so 
those two are not controlled by an access control list and after disabling SE 
Linux I would think the others are not controlled by an access control list.  
The server was rebooted after disabling SELinux with the relable option 
checked.


[r...@localhost www]# ls -laZ
drwxr-xr-x  root  root  ?asu_ead
drwxr-xr-x  root  root  ?ead2002
drwxr-xr-x. webmaster webmaster system_u:object_r:httpd_sys_content_t:s0 usage
drwxr-xr-x. root  root  unconfined_u:object_r:httpd_sys_content_t:s0 
zusage


There's nothing in the httpd, messages, or secure error logs.

Thanks for any help,

Thomas


-- 
==
Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University LibraryBoone, North Carolina 28608
(828) 262 6587

Library Systems Help Desk: https://www.library.appstate.edu/help/
==
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] psycopg import error

2009-06-23 Thread Thomas Bennett
Have you installed psycopg2 2.0.11, not the adapter but the library for 
python?  and is it in the python path for your Zope python?

I'm thinking you have psycopg not psycopg2 installed as your python library 
and the psycopg2 adapter.  There is no psycopg 2.0.11.

I am assuming this is still how psycopg is installed, the library and the DA 
product.

http://initd.org/pub/software/psycopg/


Thomas



On Tuesday 23 June 2009 16:06:03 Amir wrote:
 Hi,
I have (Zope 2.9.4-final, python 2.4.3, linux2) and I have used
 psycopg2.0.11 adapter to connect Zope to Postgresql but I am getting this
 error when I try to add the connection object the error is :-

 Error Type: ImportError

 Error Value: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))

 while the event log traceback shows that :-

 2009-06-23T10:55:49 ERROR Shared.DC.ZRDB.Connection Error connecting to
 relational database.
 Traceback (most recent call last):
   File /opt/Plone-2.5/lib/python/Shared/DC/ZRDB/Connection.py, line 71,
 in __setstate__
 try: self.connect(self.connection_string)
   File /opt/Plone-2.5/zeocluster/client1/Products/ZPsycopgDA/DA.py, line
 120, in connect
 raise ImportError(psycopg version mismatch (imported %s) %
 ImportError: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))

 I would appreciate for an answer asap.

 Thanks
 Amir

 tlc2

 ***
 *

-- 
 Normally I'm against big things, 
 I think the world is going to be saved by millions of small things. 
Too many things can go wrong when they get big.
- Pete Seeger  at his 90th birthday party Sunday May 3, 2009

==
Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University LibraryBoone, North Carolina 28608
(828) 262 6587

Library Systems Help Desk: https://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] Getting Auto Increment value

2009-06-11 Thread Thomas Bennett
I am suspecting that serial in MySQL works like serial in PostgreSQL in which 
a sequence is automatically created.  If so, you should be able to query the 
last_value field in the sequence without having to call the function.  The 
field 
name might be different in MySQL, I don't know.  This will give you the last 
value inserted and if you need the next just add 1.

  Also, if it is an auto increment column and again if it is like PostgreSQL 
then all you have to do is use the word 'default' without quotes and it auto 
increments the value for the new insert.  See if there is a default for your 
serial field.

Thomas





On Thursday 11 June 2009 08:36:21 Merav Ben-David wrote:
 I am working with zope  mysql.

 I have a table with SERIAL column type, I create z-sql method for insert
 operation, how can I get the value for the auto increment column?

 I know that in mysql I can call last_insert_id(),  how do I call it, should
 I create another z sql method and if I do,  how can I be sure the the
 value return is for my insert command and not for another. Is there a way
 to call 2 query from the same z sql method?



 I am really lost on this, any help will be wellcom.

 Thank in advanced.

-- 
 Normally I'm against big things, 
 I think the world is going to be saved by millions of small things. 
Too many things can go wrong when they get big.
- Pete Seeger  at his 90th birthday party Sunday May 3, 2009

==
Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University LibraryBoone, North Carolina 28608
(828) 262 6587

Library Systems Help Desk: https://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] is there a zope product for generating spreadsheets?

2009-05-05 Thread Thomas Bennett
I don't know if there is a reason not to use this but no one has mentioned 
PyUNO.

http://wiki.services.openoffice.org/wiki/Python

From that page:
OpenOffice.org ships with a python scripting language, version 2.3.4. This 
Python distribution comes with the Uno module which connects the UNO API with 
the python scripting language.

I'm thinking it should allow you to read from a spreadsheet and then you would 
have to format output as you want.

There are a lot of other links related to pyuno, I notice one is a tutorial.

http://www.google.com/search?hl=enq=openoffice+3+pythonbtnG=Search

and if you add 'calc' to the search you can narrow down the  search and find 
things like 

OpenOffice.org Utility Library, or ooolib in short, is actually more than one 
library module. Included are a Python module (ooolib-python) and a Perl module 
(ooolib-perl).

The Python module is currently focused on Calc and can be used to create 
OpenDocument Format Calc spreadsheets.





Thomas




On Monday 04 May 2009 17:07:28 Krishnakant wrote:
 hello all,
 I am right now browsing through the grok tutorial and found it to be
 really amaising.

 I had been confused a few days regarding how I can put my application
 into zope.  Thanks to all you who patiently answered my queries.

 Now I am wondering whether there is a product which can generate
 spreadsheet like output for some typicle data such as balance sheets or
 ledgers (with cell merging capability)?

 I would also like to know if there is some way I am make grok integrate
 open office in a way that I can generate open office spreadsheets and
 send it to a browser or open it in some way?

 I know there is a python library called odfpy which can fill up
 spreadsheets with data, but I don't know whether similar things are
 possible with zope.

 I have searched but did not find some thing like this.

 so is any thing of the above possible?

 happy hacking.
 Krishnakant.


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

-- 
==
Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University LibraryBoone, North Carolina 28608
(828) 262 6587

Library Systems Help Desk: https://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 )


[Zope] Google apps and SAML 2.0 authenticating using Zope

2008-11-13 Thread Thomas Bennett
I need a SAML 2.0 solution for authenticating into Google Apps from a SAML 2.0 
request from Google Apps.  There are Java, PHP, Perl, Drupal, and other 
solutions but I didn't want to build from scratch if there was already a Zope 
solution available.  I haven't found a Zope product that does SAML 
authentication and the closest thing I found was the acas product but looks 
like it is specifically for authenticating into Zope only.

If there doesn't already exist a Zope solution, I've found a Python SAML 
library and plan to use it with Python LDAP in external methods to 
authenticate against my Fedora Directory Server.  That is unless there are 
better suggestions in reply to this email.

Any suggestions would be appreciated.

Thanks,

Thomas




-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

If a vendor shipped a Windows notebook without the drivers, I'd venture to 
guess it would be even less useful than your Linux laptop [without drivers].
 - Shawn Powers, Linux Journal November 2008

Library Systems Help Desk: https://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] DirectoryStorage product - zope won't start

2008-09-12 Thread Thomas Bennett
Thank you Dieter,  I've found that DirectoryStorage is not what I was looking 
for.  I didn't realize that DS was something more like an file system version 
of Data.fs.

Trying to install LocalFS it is missing two files, see below, and this is what 
happens with LocalFS and the updated LocalFS called StreamingFS.

  I wanted something more like the LocalFS product but it fails not finding 
content_types and then after adding content_types.py from Zope 2.6.1 it can't 
find ts_regex.  I see that content_types just uses re and mimetypes so I 
didn't think there would be any harm adding it from an older version of Zope 
to this one.  I added ts_regex.py from the 2.6.1 Zope and I can add a LocalFS 
object but opening it I get Resource not found and no errors on the 
terminal running zopectl fg.

Although when starting Zope I get 

/opt/zope/lib/python/ts_regex.py:15: DeprecationWarning: the regex module is 
deprecated; please use the re module
  import regex, regsub #, Sync
/usr/local/lib/python2.4/regsub.py:15: DeprecationWarning: the regsub module 
is deprecated; please use re.sub()
  DeprecationWarning)
/opt/zope/lib/python/OFS/Application.py:809: DeprecationWarning: __init__.py 
of Products.ExternalFile has a long deprecated 'methods' attribute. 'methods' 
support might be removed in Zope 2.11 or a later feature release. Please use 
the 'legacy' argument of registerClass instead if the methods are 
constructors. Or refactor the product using adapters.
  DeprecationWarning)


But I'm not sure what is involved in refactoring or registerClass and don't 
know if that will allow LocalFS to operate properly if that is done.  I 
assume filesystemview doesn't work with Zope alone, right?

I have moved away from the ExternalFile product because using the batch method 
does not update files in secondary folders, just the current folder and there 
are too many secondary folders to have to update each one individually.  

So, to anyone, is there a Product that works that will allow transparent 
access to files on the filesystem through zope, like LocalFS?



Thomas



On Wednesday 10 September 2008 13:36, Dieter Maurer wrote:
 Thomas Bennett wrote at 2008-9-9 13:12 -0400:
 using
 python 2.4.5
 Zope 2.11.1-final
 DirectoryStorage 1.1.19
 
 
 First, is there a more preferable product to use to serve files, mostly
  PDF, from the file system with Zope?
 
 I suspect lock_file.py has changed since the DirectoryStorage product was
  last updated.
 
 I followed instructions on http://dirstorage.sourceforge.net/install.html
  to install DirectoryStorage.  I got to step 11. Start Zope and at the
  end of Traceback 1 (see below)
   File
  /usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.
 py, line 12, in ? from ZODB.lock_file import lock_file
 ImportError: cannot import name lock_file
 
 There are no classes or methods named lock_file in lock_file.py so I
  changed the import statement in PosixFilesystem.py to from ZODB import
  lock_file

 The interface changed a bit.

 Now, it is assumed that LockFile is used (and close to release the
 lock).

 It is probably very simple to adapt DirectoryStorage correspondingly.

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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 )


[Zope] DirectoryStorage product - zope won't start

2008-09-09 Thread Thomas Bennett
using 
python 2.4.5
Zope 2.11.1-final
DirectoryStorage 1.1.19


First, is there a more preferable product to use to serve files, mostly PDF, 
from the file system with Zope?  

I suspect lock_file.py has changed since the DirectoryStorage product was last 
updated.

I followed instructions on http://dirstorage.sourceforge.net/install.html to 
install DirectoryStorage.  I got to step 11. Start Zope
and at the end of Traceback 1 (see below)
  File 
/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py, 
line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file

There are no classes or methods named lock_file in lock_file.py so I changed 
the import statement in PosixFilesystem.py to 
from ZODB import lock_file

Then the same thing occured in BaseDirectoryStorage.py and I made the same 
change to that import statement. (see Traceback 2)

Now (see Traceback 3) I get   File 
/usr/local/lib/python2.4/site-packages/DirectoryStorage/LocalFilesystem.py, 
line 55, in engage
raise DirectoryStorageError('Storage is locked by another process')
DirectoryStorage.utils.DirectoryStorageError: Storage is locked by another 
process

But I'm not sure how to overcome this or is this because the locK_file problem 
but I suspect so. I can't find anything 
that indicates Storage is locked except for the end of that traceback.

I don't know if I need to do  from ZODB.lock_file import _lock_file  or 
something else.

Any help would be appreciated.

Thanks,

Thomas



==
Traceback 1
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:16:16 INFO ZServer HTTP server started at Tue Sep  9 12:16:16 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:16:17 INFO Zope Set effective user to effective_user_here
^[[ATraceback (most recent call last):
  File /opt/zope/lib/python/Zope2/Startup/run.py, line 56, in ?
run()
  File /opt/zope/lib/python/Zope2/Startup/run.py, line 21, in run
starter.prepare()
  File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 109, in prepare
self.startZope()
  File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 300, in startZope
Zope2.startup()
  File /opt/zope/lib/python/Zope2/__init__.py, line 47, in startup
_startup()
  File /opt/zope/lib/python/Zope2/App/startup.py, line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 288, in 
getDatabase
db = factory.open(name, self.databases)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 186, in open
DB = self.createDB(database_name, databases)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 183, in createDB
return ZODBDatabase.open(self, databases)
  File /opt/zope/lib/python/ZODB/config.py, line 97, in open
storage = section.storage.open()
  File /usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py, 
line 5, in open
from DirectoryStorage.Storage import Storage
  File /usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py, 
line 1, in ?
from Filesystem import Filesystem
  File /usr/local/lib/python2.4/site-packages/DirectoryStorage/Filesystem.py, 
line 9, in ?
from PosixFilesystem import PosixFilesystem as Filesystem
  File 
/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py, 
line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file

===
Traceback 2
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:43:22 INFO ZServer HTTP server started at Tue Sep  9 12:43:22 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:43:22 INFO Zope Set effective user to effective_user_here
Traceback (most recent call last):
  File /opt/zope/lib/python/Zope2/Startup/run.py, line 56, in ?
run()
  File /opt/zope/lib/python/Zope2/Startup/run.py, line 21, in run
starter.prepare()
  File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 109, in prepare
self.startZope()
  File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 300, in startZope
Zope2.startup()
  File /opt/zope/lib/python/Zope2/__init__.py, line 47, in startup
_startup()
  File /opt/zope/lib/python/Zope2/App/startup.py, line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 288, in 
getDatabase
db = factory.open(name, self.databases)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 186, in open
DB = self.createDB(database_name, databases)
  File /opt/zope/lib/python/Zope2/Startup/datatypes.py, line 183, in createDB
return ZODBDatabase.open(self, databases)
  File /opt/zope/lib/python/ZODB/config.py, line 97, in open
storage = 

Re: [Zope] Trying ZODB with a background in RDBMS

2008-08-14 Thread Thomas Bennett
This may help in addition to Jonathan's suggestion.

In PostgreSQL when you create a serial field for that 
purpose it actually creates an integer field with a modifier 
similar to this:
not null default nextval(('dl_articlereq_id_seq'::text)::regclass)

where dl_article is the table in which id is the integer field 
created.  Also created is a sequence with this format:

sequence_name | last_value | increment_by | max_value  | min_value | 
cache_value | log_cnt | is_cycled | is_called
+++--+---+---+---+---+---
 dl_articlereq_id_seq   | 288   |1   | 2147483647 | 
1  |   1   |   0|  f | t


so you can get the last record value from last_value field.  
I'm feel sure mySQL is similar.

Hope you can use this.


Thomas

On Thursday 14 August 2008 04:40, Phillip B Oldham wrote:
 Hi all. I'm playing with standalone ZODB at the moment trying to get a
 better understanding of its use in applications. I come from a
 PHP/MySQL background, and I'm taking my first steps with Python at the
 same time.

 One of the things I'm not understanding about ZODB is assigning
 incremental IDs to objects. For instance, if I were to be writing a
 support-ticket system I'd want to give each ticket a unique number,
 but one that's human-useable (otherwise you could just use a UUID -
 try giving one of those over the phone!).

 Also, how would one add a new item to the db in this way?

 For instance:

 class Ticket(Persistence):
   def __init__(self):
 self.id = '' # How do I add a new incremental ID here?

 # and later on in the app

 tkt = Ticket()
 dbroot[?] = tkt

 How would one assign a unique ID to the root at that point?

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] Bug in ZSQL test?

2008-07-10 Thread Thomas Bennett
I've seen this before in ZSQL test .  But sometimes I have found that forms 
I've created that do this with POST work by changing the method to GET or 
viceversa

Thomas
 

On Thursday 10 July 2008 16:37, Garry Saddington wrote:
 On Thursday 10 July 2008 20:47, Allen Schmidt Sr. wrote:
  I know, I know...too old to worry about...
  Zope 2.8.9.1 on RedHat and MySQL5
 
  In the Test tab of a ZSQL method, where the query has parameters, when
  we enter parameters that generate a result of more than 20 rows, we get
  the link for next 20 results. However, the parameters are not getting
  passed in and the next page shows all the rows as if no parameters
  passed.
 
  Anyone else seen this?

 Yes Zope 2.9 gives error for the missing parameters on second page. I have
 just lived with it having seen the error before on this list.
 regards
 garry
 ___
 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 )

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] getting post data from a webcam

2008-07-09 Thread Thomas Bennett
Can you use ftp or webdav, that may be easier, this would take care  of 
mimetypes without having to move to a lower level.  It depends on the 
capabilities of your camera but not knowing the model there is limited help.

  I had an Axis camera, that ran embedded linux and had a built in python web 
server (boa) which I used to get an image from the camera every 5 seconds 
replacing the previous image for viewing from our WEB site.  And, I had to 
put the image directly on the file system and use the Local File System 
product for Zope to access it because it was always downloaded under the same 
file name and putting it in Zope directly quickly filled up the hard drive 
because of the undo option, a learning experience.

It's been so long ago I don't remeber all of the details.

Thomas


On Wednesday 09 July 2008 00:16, William Heymann wrote:
 I am trying to integrate a webcamera with a site and I can get it to POST
 the data to a certain url on the server the problem is I can't figure out
 how to get access to the data. It is not in REQUEST.form

 the relevant request vars are

 ('CONTENT_LENGTH', '111695')
 ('CONTENT_TYPE', 'image/jpeg')
 ('HTTP_CONTENT_DISPOSITION', 'attachment;
 filename=image01-07-29_05-54-26-96.jpg')

 This is being posted to a python script object inside zope, however if I
 need to use an external method that is not a problem I just need to figure
 out how to get the data.

 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 )

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] Upgrade to 2.7.2 results in all content unavailable - SOLUTION!

2008-04-14 Thread Thomas Bennett
So was this RHEL machine customized to update ZOPE with YUM or Up2date or is 
this a default.  I have been using Fedora and CentOS (both built from redhat 
dist.) for some time now and haven't seen this issue.  This would be nice to 
know seeing that I am currently moving all my linux servers to RHEL5.

Thanks

Thomas


On Monday 14 April 2008 14:25, Wes Modes wrote:
 Thanks everyone for the help.  It was a combination of useful
 suggestions, blind optimism, tenacious persistence, and fervent desire
 to keep my job that eventually solved the problem.

 It was neither super simple, not really complex.  The list of things I
 tried spans 6 pages in my notebook, so I won't bore you with that.  But
 I will give you a quickie summary.

 The Problem:  A previous sysadmin had built both zope and python from
 source.  As is often the case, things end up in non-standard locations
 (or the standard locations change over time).  So with the monthly
 system software updates, the installer (Red Hat EL 4's up2date program,
 based on yum) gave me new versions of zope and python.  I apparently
 went from Zope 2.7.2 to Zope 2.10.5 and from Python 2.3.X to Python
 2.5.2.  I had no intention of updating either package, but neither was
 in the up2date exceptions file.

 After the update, zope was still running but wasn't serving any
 content.  Even the ZMI and the Congratulations page were unavailable.  I
 could see that the data storage had not been lost, but nor had it been
 touched since the update.  I tried all sorts of things to get everything
 working again, but it looked like my best bet would be to install the
 latest versions of Zoep and Python and then import the old data.  So
 that's the path I took.

 The Solution:  I rebuilt both zope and python to the most current stable
 versions.  In attempting to make the new packages work together, I noted
 that the old versions of python were installed in /usr/lib and the new
 versions were installed in /usr/local/lib.  So even when I went back to
 a 2.4.X version of python it couldn't find all of the modules that had
 been earlier built for it.  Once I moved some of the needed modules
 over, and rebuilt others, zope at least started working normally.

 Then after I moved the old data into place and restarted zope, all of
 the content returned.

 Summary:  Be careful when updating python, it may leave all of its
 modules behind.

 Wes

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] retrieving a single column from database and giving it as hyper link fetching respective data

2008-04-11 Thread Thomas Bennett
On Friday 11 April 2008 01:02, member madhangc wrote:
 Dear all,

 I'm developing a biological database using Zope 2.6 and pgsql. Let me
 explain my issue with an example. There is a menu called Drug in my
 homepage, by clicking the menu the drug names along with their type in two
 different columns get displayed in the body. I can do things till that. My
 problem is , lets say there is a link called Isoniazid   with all other
 links(drug names) in it. When a user clicks one of the links as i said
 before as isoniazid only the information about isoniazid has to be
 retreived and displayed , likewise to all the other drug links.  I have no
 idea how to capture the click event and the data to be retrieved. Can
 someone help. Thanks in advance.

From your description I can't tell if you are already populating the 
two column page from a database or if it is a static html page.  If 
I understand your issue correctly you can do all this with your 
database.  You may have to add more columns to provide the 
interaction you need.

I have a similar situation with a three column subjects page 
where clicking on each subject brings up a page with a list of
 online databases and descriptions for each.  Within each 
description is a link to the online database.

Again, if I understand your issue, have your two column page be 
created from a db that contains the a record number and the drug 
name.  That template can build a link based on the record number 
to another template and the second template would query the 
database for a description field or whatever.

so the first page would build its contents sorta like this.

dtml-in get_drug _names
   a href=http:/link/to/my/description/template/?my_recnum=dtml-var 
drug_name_recnumdtml-var my_drug_name/a
/dtml-in

same thing can be done in pagetemplates.  You can see my example at

 http://www.library.appstate.edu/vdb/subjectgeneral05.html

The list of subjects comes from a database and there are three select 
statements to make the three columns, select the first third, second third,
and then the last third and use css.  Each subject link to another template 
that selects data from the main table based on subject table's related field.  
And, on that second page you can narrow down the results by media type 
such as book, newspaper, audio, etc. which is a field in the database title 
table.

Let me know if I misinterpreted your request, as I get older this becomes 
more frequent ;-)


 And another query, how can i select text from a dropdown box. I just need
 the data which is selected in the dropdown box and sent as query.

 Thanks again.

If you click on a letter at the top you will see a list box on the right which 
uses 
a javascript called jumpmenu and OnChange which should work or be close to 
what you want.  There is not an action attribute for the list box and no 
button, the
Javascript takes care of it.


Thomas


-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] Upgrade to 2.7.2 results in all content unavailable

2008-04-11 Thread Thomas Bennett
have you used locate or any other utility to make sure you only have one Zope 
installed, like locate zope.conf ?

Thomas

On Friday 11 April 2008 15:14, Wes Modes wrote:
 Better yet, here's a more informative debug output.  It tells me that
 zope thinks this is a new instance.  Though the old database is it place
 right where it should expect to see it.

 [EMAIL PROTECTED] zope]# bin/zopectl debug*
 Starting debugger (the name app is bound to the top-level Zope
 object) 2008-04-11 12:04:05 WARNING Init Class
 Products.HappySession.HappySession.HappySession has a security
 declaration for nonexistent method 'manage_menu'
 [snipped a bunch of warnings...]

 * import Zope, ZPublisher*

 * ZPublisher.Zope('')*

 Status: 200 OK
 X-Powered-By: Zope (www.zope.org), Python (www.python.org)
 Content-Length: 4066
 Content-Type: text/html

 [snipped a bunch of html and helpful info]
 Zope Quick Start
 You have not created any users in this Zope instance.  In order to
 log in and manage this Zope instance, you'll need to add an
 adminstrative
 user account.

 If you're running Zope on UNIX or Linux, you can create an
 administrative
 user account via the zopectl adduser command from a shell.
 bNote: You'll
 need to shut Zope itself down before zopectl adduser will work.
 Restart
 Zope after executing this command in order to log in./b

 WARNING: you are running Zope 2.8.X with python 2.4.X, this is not a
 supported
 combination. Don't file bugreports or ask for support on zope.org.
 



 And apparently, I'm running 2.8.7 not 2.7.2 as I thought.  And I'm not
 supposted to ask you for help.  Help!

 W.

  Dieter Maurer wrote:
  Dieter Maurer wrote at 2008-4-11 19:13 +0200:
  Wes Modes wrote at 2008-4-10 21:04 -0700:
  I upgraded to Zope 2.7.2 and all of my content can't be seen by Zope.
  Honestly I'm not sure what the previous version I was running was (nor
  am I sure how to find out).
 
  Now, every page results in
 
  Site Error
  An error was encountered while publishing this resource.
  Resource not found
  Sorry, the requested resource does not exist.
  Check the URL and try again.
  Resource: Zope GET
 
  Difficult problems can be analyzed in interactive Python
  sessions.
 
  Under *nix, you start such a session with bin/zopectl debug
  (under Windows, this does not work but there are alternatives).
 
 from request import getRequest
 request = getRequest()
 obj = request.traverse('pathpart_of_your_url')
 obj()
 
  If authentication is required, you use
 
 from request import getAuthRequest
 request = getAuthRequest(user, password)
 
 
  If there are problems, you use pdb.pm() (or dm.pdb.zpbd.pm()
  for better Zope support) to analyse them.
 
  I forgot. You can download request.py from
 
http://www.dieter.handshake.de/pyprojects/zope/request.py
 
 
  In order to get rid of a deprecation warning, you must replace Zope
  with Zope2.
 
  --
 
  Wes Modes
  Server Administrator  Programmer Analyst
  McHenry Library
  Computing  Network Services
  Information and Technology Services
  459-5208
  
 
  ___
  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 )

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] ExternalMethod - add new parameter

2008-04-09 Thread Thomas Bennett
If you would elaborate a little, like what you really want to do,  you might 
get responses directing you toward a quicker solution.  That aside, if you 
want to execute a command line application as root from your External Method 
look at Paramiko as mentioned in my response to the previous External Method 
question.  Paramiko is a python library that allows you to use ssh or sftp.  

Thomas


On Monday 07 April 2008 08:16, rishi pathak wrote:
 There is a requirement for running some external methods as super user.
 For this I thought of adding a new parameter.If set the code would be
 executed with effective uid of root.
 Can some one point to the code section where zope loads the ExternalMethod
 codes for execution.

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] External Method in Zope

2008-04-07 Thread Thomas Bennett
If you absolutely have to, look at Paramiko a python ssh/sftp library which is 
easy to use but as mentioned already there are critical security issues.  
with paramiko you don't have to directly edit the files but within an ssh 
connection run the commands needed that actually make the changes.  You may 
have to put in time.sleep(x) commands to give the response time to come back, 
where x is an integer.

Thomas


On Monday 07 April 2008 03:45, vaibhav pol wrote:
 hi,

 I am using Zope-2.8.1-final and also added zoperl-1.0.beta5 for perl
 support . I wrote a Perl module which edit files the file access permission
 is only to root  and i want to invoking the  module as onther user . by
 some way i want to invoke the perl interpreter as root for my user.
 and i also want to know how the zope  call external method.

 please
 help me!!

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] ZServer uncaptured python exception

2008-04-07 Thread Thomas Bennett
I absolutely agree and I have preached to the WEB page editors here about this 
but most of them have no idea of the difference between a relative link, an 
absolute link, and trash like this.  Using Dreamweaver they just know it 
works at least for them.

;-)

Thomas

On Monday 07 April 2008 06:06, Chris Withers wrote:
 Thomas Bennett wrote:
  I have had similar instances with GSA on my Zope server in that it would
  try to index something like
  /mydir/mydir/mydir/mydir/somefile.html
 
  Often I've found the case is an href that references
  ../somethingelse.html

 Yes, that's bad coding on your part.

 cheers,

 Chris

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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] ZServer uncaptured python exception

2008-04-02 Thread Thomas Bennett
I have had similar instances with GSA on my Zope server in that it would try 
to index something like
/mydir/mydir/mydir/mydir/somefile.html

Often I've found the case is an href that references ../somethingelse.html

I don't know if this might be related to your case but you might want to 
check.   I had to finally end up using the  iptables rule already suggested 
and this was our campus GSA.  After talking to the owner of the GSA he told 
me he found a plugin or fix for Plone  for the GSA and we are going to try 
that to see if it helps with Zope.  But this is local so you probably 
wouldn't be able to ask outside entities to use this.


Thomas


On Wednesday 02 April 2008 05:50, Chris Withers wrote:
 Jens Vagelpohl wrote:
  Trusting that bots actually care about or respect robots.txt won't get
  you very far. If all else fails I suggest you look at your logs to find
  out what IPs or IP ranges those bots come from and block them at the
  firewall level, using e.g. iptables if you're on Linux. This is a very
  simplistic invocation:
 
  iptables -A INPUT -s source-IP -j DROP
 
  At least that way you gain some breathing room to come up with a less
  constrictive solution.

 Also very effective against errant Google Search Appliances in intranet
 situtations ;-)

 Chris

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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 )


[Zope] RedHat blows up? (another post follow up)

2008-03-14 Thread Thomas Bennett
Concerning the post from FuBuJo [EMAIL PROTECTED] about Zope Zeo with 
reference to RedHat blowing up with Zope.  

I've been running Zope on RedHat and RedHat based OSs since 1999, always on 
Dells, and only found an issue with RedHat 8.0 when it came out (before RHEL 
existed) and the issue was due to the change in threading on the RedHat 
distro bu there was a fix for Zope in Zope's configuration.  After RedHat 7.3 
I started using Fedora until last year when false CPU hardware errors kept 
crashing the server.  Had to move to CentOS (RedHat based) because at that 
time Dell only supported RedHat, CentOS and Suse.  No errors after installing 
CentOS using Apache, Zeo, and Zope.  Now I am making arrangements to move 
back to RedHat with RedHat Enterprise Linux 5.0 and I am curious/concerned to 
what issues you experienced with RedHat.

From original post:
The equipment is high end DELLs (well as of 3 years ago) - all running 
FreeBSD (we tried Red Hat but it blows up - but thats another post).

Thanks,

Thomas
-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

... using OpenOffice.org, and save them back to disk automatically,
in MS Word format.  They surf the Web, check e-mail, do instant 
messsaging, view YouTube videos, visit their Facebook pages, learn 
touch-typing skills and lots more.  Our public library has been 
offering these Linux public stations for the past three years.
 - Phil Shapiro Linux Journal January 2008

Library Systems Help Desk: https://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 )


[Zope] google gdata External Method doesn't work script does

2008-02-04 Thread Thomas Bennett
I am using the gdata library from google and my script works 
as a standalone but when I try to use it as an External Method
I get an error: ssl() argument 1 must be _socket.socket, not _socketobject
I suspect it is from the python socket library but I don't know why
I am getting this error or how to avoid it.


Zope Version(Zope 2.10.3-final, python 2.4.3, linux2) 
Python Version  2.4.3 (#1, Mar 14 2007, 18:51:08) [GCC 4.1.1 20070105 (Red Hat 
4.1.1-52)] 
System Platform linux2

Exception Type  TypeError
Exception Value ssl() argument 1 must be _socket.socket, not _socketobject

Traceback (innermost last): 
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module OFS.DTMLMethod, line 144, in __call__
DTMLMethod at /calendar/scheduling/addevent
URL: http://www.library.appstate.edu/calendar/scheduling/addevent/manage_main
Physical Path:/calendar/scheduling/addevent
Module DocumentTemplate.DT_String, line 476, in __call__
Module Products.ExternalMethod.ExternalMethod, line 238, in __call__
__traceback_info__: ((), {}, None)
Module /var/zope/Extensions/gdata_add2_421.py, line 59, in add2google421
Module gdata.service, line 289, in ProgrammaticLogin
Module httplib, line 798, in endheaders
Module httplib, line 679, in _send_output
Module httplib, line 646, in send
Module httplib, line 1073, in connect
Module socket, line 74, in ssl
TypeError: ssl() argument 1 must be _socket.socket, not _socketobject


Below is my script with logins and passwords changed 
public view here.  When I use it as an External Method
I have a def add2gcal(self): and indent everything 2
spaces.

***Script 
import psycopg2
import psycopg2.extensions
import psycopg2.extras
from elementtree import ElementTree
import gdata.calendar.service
import gdata.service
import atom.service
import gdata.calendar
import atom
import getopt
import sys
import string
import time
import datetime

DSN = dbname='MY_calendar' user='myuser' port='1234' host='127.0.0.1' 
password='my_password
conn = psycopg2.connect(DSN)
curs = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
curs.execute(SELECT last_value from cal_xxx_cal_xxx_recnum_seq;)
lastrec=curs.fetchone()
curs.execute(SELECT 
summary,submitter,description,location,start_date,start_time,end_date,end_time,cal_421_recnum
 from cal_421 where cal_
421_recnum=%s;%lastrec[0])
mit=curs.fetchall()
curs.close()

calendar_id=YOUR ID HERE
calendar_service = gdata.calendar.service.CalendarService()
calendar_service.email = '[EMAIL PROTECTED]'
calendar_service.password = 'my_password'
calendar_service.source = 'My Calendar'
calendar_service.ProgrammaticLogin()

for myrec in mit:
  title  = '%s' %myrec[2]
  author = '%s' %myrec[1]
  content= '%s' %myrec[2]
  where  = '%s' %myrec[3]
  endtime= '%s' %myrec[7]
  enddate ='%s' %myrec[6]
  start_time = '%sT%s' %(myrec[4],myrec[5])
  end_time   = '%sT%s' %(myrec[6],myrec[7])

  event = gdata.calendar.CalendarEventEntry()
  event.title = atom.Title(text=title)
  event.author = atom.Author(text=author)
  event.content = atom.Content(text=content)
  event.where.append(gdata.calendar.Where(value_string=where))
  event.when.append(gdata.calendar.When(start_time=start_time, 
end_time=end_time))
#   INSERT ENTRY INTO GOOGLE CALENDAR
  new_event = calendar_service.InsertEvent(event, 
'/calendar/feeds/'+calendar_id+'/private/full')


Thanks for any help.
Thomas



-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] HTML forms inside a Zsearch method

2007-11-29 Thread Thomas Bennett
I'm not quite sure what you mean by a selection button but as far as a 
checkbox the value will exist or not.  that is to say that if the box is 
checked then the value and variable will exist.  if the box is not checked 
then there is nothing.  At least this is what I have found with forms and 
Zope.  I try to avoid checkboxes and use radio buttons and have a default 
selected, that way there is always a variable and value.

I created a document on my server called formtest and it only contains

dtml-var REQUEST

You may want to do the same and set your action for that page to see test 
results of your form, what is passed and what isn't.

Thomas


On Thursday 29 November 2007 01:03, sujitha mary wrote:
 Hi,
 I would like to know how to set action for a selection button and checkbox
 inside the table that displays the data from the database.I have created a
 checkbox and selection button inside the template generated by Zsearch
 method uisng HTML code.I don't know how to set the value of the check box
 to the value that is fetched from database.Plz provide some help


 -
  Why delete messages? Unlimited storage is just a click away.

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] trying to implement server side xsl transform

2007-10-25 Thread Thomas Bennett
On Wednesday 24 October 2007 23:35, Andreas Jung wrote:
 --On 24. Oktober 2007 17:01:35 -0400 Thomas Bennett

 [EMAIL PROTECTED] wrote:
  Zope Version(Zope 2.10.3-final, python 2.4.3, linux2)
  using zeo storage
 
  I am trying to implement a server side XSL Transform with the
  tools I have installed.   I have 4suite, libxml2,  and  libxsl.   The
  all of the files are dtml documents.
 
  Listing 1 below works on the command line and writes an html
  file named 'foo' to the file system. So I added a def, a parameter
  to receive, and indent Listing 1 appropriately to run as an External
  Method.  I also found, from this list in September 2006, an almost
  identical External Method using parseDoc instead of parseFile,
  and SaveToString instead of SaveToFile, see Listing 2 and the
  traceback that follows it.

 This it basically offtopic and unrelated to Zope. First get this fixed on
 the  Python level - then move your code to Zope.

I did mentioned above that python myscript.py did run on the command line 
but hung in Zope, or are you referring to something different by Python 
level?

All combinations and attempts to use an External Method result in
  either parseDoc or parseFile failing.  Also, the Zope server will not
  respond to WEB clients for as long as it is trying to process the
  External Method and Apache times out in about 100 seconds  with a
  Proxy error and I usually have to restart the Zope server to get
  access back to it through a WEB client although ps doesn't show
  any unusual processor or memory usage.

 Keep in mind that Zope works by default with 4  worker threads. If they are
 blocked with long-running processes than other requests will be queued and
 their execution delayed until the next thread has finished this work.

 -aj
I had my threads set to 10 but have upped them to 16 to see if that will make 
a difference, thanks.  I've also upped the pool size because of several 
instances of 

2007-10-24T10:33:07 WARNING ZODB.DB DB.open() has 10 open connections with a 
pool_size of 7

in the event log.

Thanks,

Thomas


-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] trying to implement server side xsl transform

2007-10-25 Thread Thomas Bennett
Kees,

  The files are dtml documents and use the xsl file correctly 
when viewed in IE usually.  When viewed in Opera the only 
result is XSLT processing failed! on the browser page.  In 
Firefox the page doesn't show any images and some text is 
not shown.  These files relate to old records often used by 
genealogists and from my experience they are usually elderly 
and using old browsers but even a recent Firefox in linux I 
just tried doesn't show some text or images.

  Someone else is creating these files and I know there are 
syntax problems with some pages but I don't have time to tutor 
this author in XML, I just give comments and suggestions 
occasionally such as use xmllint.  I've only been asked to 
implement server side transform on our Zope server.

  4Suite does the transform by applying the xsl style sheet to the 
xml file and returns formatted html  text suitable for all browsers.  
Ft in site-packages comes from 4suite, see 4suite.org for more info.

There are examples for other xsl tools at 
http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt

The solution I ended up with even after the one in the reply to 
myself lets you add /ead2xml on the end of the url of the xml 
page(eg. htttp://www.mysite.mydomain/xmlfile.xml/ead2xml)
This implies that my External Method is called ead2xml and
it is.  Below is ead2xml.py that does this.  All of the pages use
the same xsl file so it is hard coded in the script.


from Products.PythonScripts.standard import html_quote
from ZPublisher import HTTPResponse
from Ft.Xml.Xslt import Transform
import string

def ft_transform(self):

  request=self.REQUEST
  response=self.REQUEST.RESPONSE

  xmlfile=%s%request.URL1[(len(request.URL2))+1:len(request.URL0)]
  mysource=http://www.library.appstate.edu/appcoll/ead2002/%s%xmlfile
  result = Transform(mysource, 
http://www.library.appstate.edu/appcoll/ead2002/styles/eadbase.xsl;)
  return result



Thomas


On Thursday 25 October 2007 03:33, Kees de Brabander wrote:
 I don't fully understand what your are doing, though I am interested in a
 xsl transformations in Zope.
 Your dtml must fail, however, because you can't use a dtml-tag within a
 python expression. I would upload the xml document as a dtml-document and
 call it just by its name.
 By the way: what role does 4suite play in your process?
 If you have a working solution, would you be willing to share it?
 cb

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Thomas
 Bennett
 Verzonden: woensdag 24 oktober 2007 23:02
 Aan: zope@zope.org
 Onderwerp: [Zope] trying to implement server side xsl transform

 Zope Version  (Zope 2.10.3-final, python 2.4.3, linux2)
 using zeo storage

 I am trying to implement a server side XSL Transform with the
 tools I have installed.   I have 4suite, libxml2,  and  libxsl.   The
 all of the files are dtml documents.

 Listing 1 below works on the command line and writes an html file named
 'foo' to the file system. So I added a def, a parameter to receive, and
 indent Listing 1 appropriately to run as an External Method.  I also found,
 from this list in September 2006, an almost identical External Method using
 parseDoc instead of parseFile, and SaveToString instead of SaveToFile, see
 Listing 2 and the traceback that follows it.

   All combinations and attempts to use an External Method result in either
 parseDoc or parseFile failing.  Also, the Zope server will not respond to
 WEB clients for as long as it is trying to process the External Method and
 Apache times out in about 100 seconds  with a Proxy error and I usually
 have to restart the Zope server to get access back to it through a WEB
 client although ps doesn't show any unusual processor or memory usage.

   I have tried using Listing 1 and then read the file back in to return the
 html text but still get the same result, parse failed.

 The test page, a dtml document, making the call only contains:

 dtml-call C_xml2html('dtml-var 0418rice.xml') or dtml-call
 expr=C_xml2html('dtml-var 0418rice.xml')


 Thanks for any help,

 Thomas




 Listing 1  command line python script that works
 
 import libxml2
 import libxslt

 myxml=http://www.library.appstate.edu/appcoll/ead2002/0418rice.xml;
 styledoc =
 libxml2.parseFile(http://www.library.appstate.edu/appcoll/ead2002/styles/e
a dbase.xsl)
 style=libxslt.parseStylesheetDoc(styledoc)
 doc=libxml2.parseFile(myxml)
 result=style.applyStylesheet(doc, None)
 style.saveResultToFilename(foo,result,0)
 style.freeStylesheet()
 doc.freeDoc
 result.freeDoc()


 Listing 2  External Method python script
 **
 import libxml2
 import libxslt

 stylestring = file(/var/zope/Extensions/eadbase.xsl).read()

 def xml2html(xmlfile):

   styledoc = libxml2.parseDoc(stylestring)
   style=libxslt.parseStylesheetDoc(styledoc)
   doc=libxml2.parseDoc(xmlfile)
   result=style.applyStylesheet(doc, None)
   html=style.saveResultToString(result

Re: [Zope] trying to implement server side xsl transform

2007-10-25 Thread Thomas Bennett
I started trying a solution with libxml2/libxslt which did work in python on 
the command line but failed through the WEB  While browsing the WEB I came
across lxml and didn't spend much time on it but now looking at it I think the 
tools from 4suite still involve less code although there may be some better 
features offered with lxml I have only skimmed the documentation pages.  With 
4suite the simplest case is :

from Ft.Xml.Xslt import Transform

result = Transform((xmlfile, xsltfile)

Although some examples show also importing TransformPath you will get messages 
with newer versions that TransformPath has been deprecated so it is not 
needed.


Thanks,  I am going to look some more at lxml.

Thomas

On Thursday 25 October 2007 08:53, Martijn Faassen wrote:
 Hello,

 Concerning xslt transformations, you might want to consider an easier
 API to use the XSLT infrastructure in libxml2/libxslt: lxml. See
 http://codespeak.net/lxml

 Regards,

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

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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 )


[Zope] trying to implement server side xsl transform

2007-10-24 Thread Thomas Bennett
Zope Version(Zope 2.10.3-final, python 2.4.3, linux2) 
using zeo storage

I am trying to implement a server side XSL Transform with the 
tools I have installed.   I have 4suite, libxml2,  and  libxsl.   The 
all of the files are dtml documents.

Listing 1 below works on the command line and writes an html 
file named 'foo' to the file system. So I added a def, a parameter 
to receive, and indent Listing 1 appropriately to run as an External 
Method.  I also found, from this list in September 2006, an almost 
identical External Method using parseDoc instead of parseFile, 
and SaveToString instead of SaveToFile, see Listing 2 and the 
traceback that follows it.

  All combinations and attempts to use an External Method result in 
either parseDoc or parseFile failing.  Also, the Zope server will not 
respond to WEB clients for as long as it is trying to process the 
External Method and Apache times out in about 100 seconds  with a 
Proxy error and I usually have to restart the Zope server to get 
access back to it through a WEB client although ps doesn't show
any unusual processor or memory usage.

  I have tried using Listing 1 and then read the file back in to return 
the html text but still get the same result, parse failed.

The test page, a dtml document, making the call only contains:

dtml-call C_xml2html('dtml-var 0418rice.xml')
or 
dtml-call expr=C_xml2html('dtml-var 0418rice.xml')


Thanks for any help,

Thomas




Listing 1  command line python script that works

import libxml2
import libxslt

myxml=http://www.library.appstate.edu/appcoll/ead2002/0418rice.xml;
styledoc = 
libxml2.parseFile(http://www.library.appstate.edu/appcoll/ead2002/styles/eadbase.xsl;)
style=libxslt.parseStylesheetDoc(styledoc)
doc=libxml2.parseFile(myxml)
result=style.applyStylesheet(doc, None)
style.saveResultToFilename(foo,result,0)
style.freeStylesheet()
doc.freeDoc
result.freeDoc()


Listing 2  External Method python script
**
import libxml2
import libxslt

stylestring = file(/var/zope/Extensions/eadbase.xsl).read()

def xml2html(xmlfile):

  styledoc = libxml2.parseDoc(stylestring)
  style=libxslt.parseStylesheetDoc(styledoc)
  doc=libxml2.parseDoc(xmlfile)
  result=style.applyStylesheet(doc, None)
  html=style.saveResultToString(result)
  style.freeStylesheet()
  doc.freeDoc
  result.freeDoc()
  return html


Traceback from the call using Listing 2

2007-10-24T16:29:56 ERROR Zope.SiteErrorLog 
http://www.library.appstate.edu/appcoll/ead2002/_xmlxsltest.html
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - DTMLMethod at /appcoll/ead2002/_xmlxsltest.html
   - URL: 
http://www.library.appstate.edu/appcoll/ead2002/_xmlxsltest.html/manage_main
   - Physical Path: /appcoll/ead2002/_xmlxsltest.html
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: C_xml2html
  Module string, line 1, in expression
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: (('dtml-var 0418rice.xml',), {}, None)
  Module /var/zope/Extensions/xmlxsltests.py, line 11, in xml2html
  Module libxml2, line 1224, in parseDoc
parserError: xmlParseDoc() failed



-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] Zope database file grows when no one is modifying it

2007-10-19 Thread Thomas Bennett
On Friday 19 October 2007 11:12, Jonathan wrote:
 - Original Message -
 From: Jamie O'Keefe [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Friday, October 19, 2007 11:05 AM
 Subject: Re: [Zope] Zope database file grows when no one is modifying it

  Any suggestions as to how to thwart such attempts besides requiring
  user accounts for even the most minor edit and then remaining vigilant
  about who get accounts?

 Not a zope-based solution, but how about using 'captcha' images if spambots
 are your problem?

 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 )

or for a Zope based solution (and if you have PIL and PIL fonts installed) 
use the following as an external method and stick the call to the method
inside your form.  Of course instead of putting the random number in a 
hidden field you could also write it to the current directory as a document 
and then get the value from the document when you process it, by the way
you have to create your code to verify the image number where ever you
process the form.  In the example below I compare cost to picnum.

There are also features in PIL to add effects to the image if you want
slant, swirl or anything.

Thomas

***

from PIL import Image,ImageDraw,ImageFont
import random
import os
from StringIO import StringIO
from OFS.Image import manage_addImage

# CREATED AUGUST 8, 2007 - Thomas Bennett
# REQUIREMENTS
#   PIL FONTS FROM http://effbot.org/pil/pilfonts.zip
#   PIL FROM http://www.pythonware.com/products/pil/

def random_number_image(self):

  #GENERATE A RANDOM NUMBER OF 5 DIGITS
  mynumtext = str(random.randrange(1,9,1))
  my_image_id = number.jpg

  #DEFINE FONT PATH AND NAME
  fontpath=/usr/lib/python2.4/site-packages/pilfonts
  fontname=ncenB14.pil

  # CREATE A TEXT IMAGE USING MYNUMTEXT
  textImg = Image.new('RGB',(75,25),(56,56,50))   # INSTANTIATE A 
NEW IMAGE (a dark gray box)
  tmpDraw = ImageDraw.Draw(textImg)   # DRAW THE IMAGE 
INTO TEMP
  textFont = ImageFont.load(os.path.join(fontpath,fontname))  # LOAD A FONT FOR 
THE IMAGE
  tmpDraw.text((15,1), mynumtext, font = textFont)# PLACE TEXT IN 
NEW IMAGE

  # PUT THE IMAGE INTO MEMORY AND SAVE IMAGE TO MEMORY
  imageFile = StringIO()
  textImg.save(imageFile,JPEG)

  # IF THERE IS A NUMBER.JPG IN THE CURRETN DIRECTORY, DELETE IT SO UNDO WON'T 
BUILD UP
  if my_image_id in self.objectIds():
self.manage_delObjects([my_image_id])
  manage_addImage(self,number.jpg,imageFile)

  # WRITE THE IMAGE AND FORM CODE TO THE PAGE
  text = '\ninput type=hidden name=cost value=%s' %mynumtext
  text = text+'\nfont face=Verdana, Arial, Helvetica, sans-serif 
size=1\nbPlease enter the number pictured below./b/font'
  text = text+'br\nimg src=%s alt=%s/input type=text name=picnum 
value=\nbr /' %(my_image_id,mynumtext)
  return text

*



-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] Zope database file grows when no one is modifying it

2007-10-19 Thread Thomas Bennett
Well first, is it actually Data.fs that you see growing or are you just seeing 
less disk space from a reporting tool, you just said the Zope site has 
filled up.  If it is not Data.fs then look at the size of your logs, often, 
and which one is growing fastest and how big is it.  Also, do you have an 
external service that connects to your Zope site to upload any kind of data?  
I've had this happen with a video camera that I had ftp-ing a jpeg every 10 
seconds to the server, it didn't take long to fill up the undo list so fast 
that Zope stopped serving because Zope couldn't add to the log file, thank 
goodness for datafspack.py (I think that was the name of it).

Thomas


On Friday 19 October 2007 01:32, Jamie O'Keefe wrote:
 I am administering a Zope/CMF site running Zope 2.6.4 with python
 2.2.3.  We have been running low on space and have not been able to
 clean out the database of old edits.

 We are moving other sites over to a new server and were able to free
 up about 3GB.  Unfortunately, our main Zope site has filled up most of
 that space quite rapidly.  We haven't edited it much so it is unclear
 why it is growing so quickly.

 What might be amiss?

 Thanks!

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

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] Re: deprecated products?

2007-10-17 Thread Thomas Bennett
Some Products deprecated ( and some not ) only need minor editing to get 
working again such as I did to a Product when moving to a newer Zope.

Even I can do minor edits and help from the list makes it even easier and 
quicker when I can't find a solution on my own.

Just because a Product is deprecated doesn't necessarily mean it is totally 
unusable or useless.  Although there has been mentioned a good point in being 
able to scope searches in the Products.

Thomas




On Wednesday 17 October 2007 04:59, Chris Withers wrote:
 Mihamina Rakotomandimby wrote:
  For example, Products last modified in 2002 are definitely out of date.
  It will never work on current releases...

 Really? Squishdot was last released about then, and it still runs just
 fine ;-)

 I dare say the same is true of TinyTablePlus and that's even older...

 Chris

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] Why doesn't os.system(command) work?

2007-08-17 Thread Thomas Bennett
You probably want NT Script.  We use that on our public PCs in the library.  
We have CDs in a tower and use NT Script to map a CD and a drive from a 
server that has an executable to access the CD or run the executable from the 
client machine.  Every machine has NT Script installed.  In 1995 when we 
started using this script I was able to license something like 200 licenses 
for about $250.  The link to PC World to download it says its $20 now and I 
can't even find it on the creators WEB site any more although the 30 day 
trial can be downloaded from PC World.

For a Windows app its pretty neat, has a nice little debugger built in.

For use from a web link we use the extension .prg on all of our nt scripts and 
associate that extension with ntscript.exe.  This is the script for opening 
notepad is a dtml document named notepad.prg.

dtml-call RESPONSE.setHeader('Content-Type', 'application/x-ntscript')
sub maindtml-var my_returnshell \windows\notepad.exe dtml-var 
my_returnendsub

dtml-var my_return is a Script (Python) that contains only:

print \r
return printed

This was the only way to get the script to work, using carriage returns in the 
script did not work.

This script {force} maps drives S and T to two directories on server1 then 
starts a local application my_app.exe and that executable's parameters to use 
drive s and t for its data.

dtml-call RESPONSE.setHeader('Content-Type', 'application/x-ntscript')
sub maindtml-var my_return$x$=netuse S: \\server1\arev {force}dtml-var 
my_return$x$=netuse T: \\server1\arev2 {force}dtml-var my_returnshell 
C:\my_dir\AREVWin\my_app.EXE -c~\ARVW.mnu -t~\bib.trl -aAREV -pS:
\AREV_C\AREV1.D01 -qT:\AREV_C\AREV1.D02 {maximize}dtml-var my_returnendsub


This method of running local applications from the WEB can be very dangerous 
if another WEB site has an NTScript source on the WEB with a .prg extension 
and the source something like 

dtml-call RESPONSE.setHeader('Content-Type', 'application/x-ntscript')
sub maindtml-var my_returnshell fdisk.exe dtml-var my_returnendsub

Thomas



On Friday 17 August 2007 03:58, Reinoud van Leeuwen wrote:
 On Thu, Aug 16, 2007 at 10:40:45PM -0700, rieh25 wrote:
  I think it's finding the programm because I'm using the complete path.
  And when I test it using the wrong programm name, it returns a 1. But
  instead, when I pass it the right name, it just hangs. In the task
  manager there is an entry for the program, but it doesn't seem to
  execute. Thanks for the help.

 How is your Zope running? If it is running as a system service it has
 nothing to do with the current logged on user that has a desktop open. So
 Windows will not show notepad on the desktop...
 The question is: what is the problem you are trying to solve with this?
 Why should the webserver open a notepad? Try playing with a commandline
 program that does something usefull but does not need interaction (a batch
 file or something like that)

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] using smart folder to pick certain number of news articles to display in the home page

2007-07-02 Thread Thomas Bennett
See:  http://www.zope.org/Members/EIONET/RDFSummary  This product is old but I 
don't think it needs any maintenance since it still does the simple but good 
job it was designed to do.

I have a different situation but you might want to implement this.  This is 
with just Zope not Plone.  All our news articles are in CoreBlog, you would 
use CoreBlog2 for Plone, unless I'm not mistaken SmartFolders has support for 
RSS included.

   CoreBlog has built in support for RSS feeds of articles. Using RDFSummary I 
run a nightly cron job, which now can be done with clock server, to call the 
update function in RDFSummary.  The RDFSummary is set to grab the newest four 
entries with each update.  I expect you would have to choose a different 
number of entries and then parse it or through some other method find the 
results of your search of the RSS results.

Of course you would need to replace with proper syntax for Plone since my site 
is just Zope.  rssnews_headlines is the id of my RDFSummary.

dtml-with rssnews_headlines
   div id=rss
 dtml-in items mapping
   lia href=dtml-var link target=newdtml-var title/a/li 
   br /
 /dtml-in
   /div
/dtml-with

Example from the RDFSummary Product page, dtml and then ZPT example.
dtml-with slashdot
  dtml-var channel()['title']
  dtml-var picture
  dtml-in items mapping
p
a href=dtml-var link
dtml-var title/abr
dtml-if _.has_key('description')
  dtml-var description
/dtml-if
/p
  /dtml-in
/dtml-with

or if you prefer ZPT: 
metal:block tal:condition=here/slashdot
 tal:define=news here/slashdot
   div tal:content=python:news.channel()['title'] /
   div tal:repeat=item news/items
   a href=
  tal:attributes=href item/link
  tal:content=item/title
   /
   /div
   div
   a href=
  tal:attributes=href python:news.channel()['link']More .../a
   /div
/metal:block


Results may be seen on http://www.library.appstate.edu/ at the bottom center 
of the page under Library News:.

Click on the view tab of the RDFSummary to see all of the available fields 
that may be included in your page.  You may also want to look at RDFGrabber

Thomas

On Saturday 30 June 2007 09:56, kamal hamzat wrote:
 Hello All,

 I have folders containing the news articles, I have created a smart folder
 in the root that allows me to display these articles in the homepage of my
 website. How can I can I set up the smart folder so that just the first two
 articles that matched my criteria from each folder are display in the home
 page.

 Thanks.

 Kamal

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] Zope products that allows people to Add Comments to publications

2007-06-26 Thread Thomas Bennett
I have been wanting to try a SquishDot site also and get the very same error.

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module App.special_dtml, line 65, in __call__
  Module DocumentTemplate.DT_String, line 476, in __call__
TypeError: unbound method mailhost_list() must be called with SquishSite 
instance as first argument (got nothing instead)

Zope Version(Zope 2.10.3-final, python 2.4.3, linux2) 
Python Version  2.4.3 (#1, Mar 14 2007, 18:51:08) [GCC 4.1.1 20070105 (Red Hat 
4.1.1-52)] 
System Platform linux2 
SOFTWARE_HOME   /var/zope/lib/python 
ZOPE_HOME   /var/zope 
INSTANCE_HOME   /var/zope 
CLIENT_HOME /var/zope/var 
Network ServicesZServer.HTTPServer.zhttp_server (Port: 8082)
ZServer.HTTPServer.zwebdav_server (Port: 9800)


Thomas



On Monday 25 June 2007 19:03, kamal hamzat wrote:
 hi Tom,

 I have this error when add squishdot from ZMI

 Error Type: TypeError
 Error Value: unbound method mailhost_list() must be called with SquishSite
 instance as first argument (got nothing instead)


 Traceback (innermost last):

   a.. Module ZPublisher.Publish, line 119, in publish
   b.. Module ZPublisher.mapply, line 88, in mapply
   c.. Module ZPublisher.Publish, line 42, in call_object
   d.. Module App.special_dtml, line 65, in __call__
   e.. Module DocumentTemplate.DT_String, line 476, in __call__

 Thanks
   - Original Message -
   From: Tom Von Lahndorff
   To: kamal hamzat
   Cc: zope@zope.org
   Sent: Monday, June 25, 2007 8:14 PM
   Subject: Re: [Zope] Zope products that allows people to Add Comments to
 publications




   check out http://www.squishdot.org


   On Jun 25, 2007, at 3:00 PM, kamal hamzat wrote:


 Hello,

 Is there any zope product that allows visitors to Add Comments to the
 news / articles, just like the one in plone.

 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 )

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] where does ZOPE store users created objects

2007-06-11 Thread Thomas Bennett
This might help a little, not sure.  Have you ever gone into 
ZMI-Control_Panel-Database Management and packed the database?

Thomas


On Sunday 10 June 2007 02:28, kamal hamzat wrote:
 Hello,

 Please i want to know the physical path on my Zope installation where Zope
 stored the objects (such as dtml methods and documents) created by the
 users. When i searched for the .dtml extension on my computer, I could not
 see anyone created by me or other users from the list of objects returned.

 My plan is to have two zope installaions running, i want the first zope
 installation to hold current information (bcos the data.fs is becoming too
 big, it is slowing down the site whereas majority of my users are
 interested in the current info while few will want to access the old info)
 and later run a python code that will cut and paste the old information 
 into the second zope installation as soon as I have new ones.

 thanks

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations  Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

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] apache rewrite quit working

2007-05-09 Thread Thomas Bennett
I've just now been able to get back to this.  netstat was 
listening on appropriate ports. Two things appear to be the
 issue here.  The  user for apache was the default user 
apache  and this user does not exist on my server, I changed 
it to the username I made for apache to run under.  Then there 
was a firewall issue.

error log for virtual host had this:

[Wed May 09 13:23:29 2007] [error] (13)Permission denied: proxy: HTTP: attempt 
to connect to 127.0.0.1:8086 (*) failed
[Wed May 09 13:25:55 2007] [error] (13)Permission denied: proxy: HTTP: attempt 
to connect to 127.0.0.1:8086 (*) failed
[Wed May 09 13:26:02 2007] [error] (13)Permission denied: proxy: HTTP: attempt 
to connect to 127.0.0.1:8086 (*) failed

until allowed port 8086 on firewall and then this:

[Wed May 09 13:32:50 2007] [error] [client 86.120.184.161] Directory index 
forbidden by Options directive: /var/www/html/
[Wed May 09 13:32:50 2007] [error] [client 86.120.184.161] Directory index 
forbidden by Options directive: /var/www/html/
[Wed May 09 13:33:04 2007] [error] [client 152.10.156.23] File does not exist: 
/var/www/html/vdb, referer: http://www.library.appstate
.edu/

which is Apache serving from its own document root.  I commented 
out the DocumentRoot setting in httpd.conf and it started working.  I 
don't  remember ever having to comment that part out.  As a matter 
of fact I have an older linux, apache, and zope with apache rewriting 
to zope and serving from the file system through redirects.

Any thing I have obviously missed here?

Thanks for the replies,

Thomas




On Thursday 26 April 2007 03:18, John Snowdon wrote:
 What did `netstat -an` say about your listening ports?

  John Snowdon - IT Support Specialist
 -==-
  School of Medical Education Development
  Faculty of Medical Sciences Computing
  University of Newcastle

  Email : [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Thomas Bennett
 Sent: 25 April 2007 22:44
 To: zope@zope.org
 Subject: Re: [Zope] apache rewrite quit working
 
 
 Don't think that is it because it works fine if I change Zope
 to port 80.
 And, I was accessing apache on port 80 using the ip number,
 localhost, the
 machine's real name, and the URL domain  it just wouldn't
 rewrite to 8086.
 nslookup showed name was still set to my ip number.
 Thomas
 
 On Wednesday 25 April 2007 15:50, Jonathan wrote:
  - Original Message -
  From: Thomas Bennett [EMAIL PROTECTED]
  To: zope@zope.org
  Sent: Wednesday, April 25, 2007 4:15 PM
  Subject: Re: [Zope] apache rewrite quit working
 
   web-dav server  is listening on 9800
   http server is now listening on 80
   http was listening on 8086 until rewrite quit working,
 
 explained below.
 
   Thanks anyway,
 
  Any chance your nameserver settings got changed?
 
  Jonathan
 
 --
 
 Thomas McMillan Grant BennettAppalachian 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 )

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

-- 

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] apache rewrite quit working

2007-05-09 Thread Thomas Bennett
Forget the previous reply about it working.  I found I was accessing the web 
server with the 8086 port number on the end of the URL which did work.

Thomas

On Thursday 26 April 2007 03:18, John Snowdon wrote:
 What did `netstat -an` say about your listening ports?

  John Snowdon - IT Support Specialist
 -==-
  School of Medical Education Development
  Faculty of Medical Sciences Computing
  University of Newcastle

  Email : [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Thomas Bennett
 Sent: 25 April 2007 22:44
 To: zope@zope.org
 Subject: Re: [Zope] apache rewrite quit working
 
 
 Don't think that is it because it works fine if I change Zope
 to port 80.
 And, I was accessing apache on port 80 using the ip number,
 localhost, the
 machine's real name, and the URL domain  it just wouldn't
 rewrite to 8086.
 nslookup showed name was still set to my ip number.
 Thomas
 
 On Wednesday 25 April 2007 15:50, Jonathan wrote:
  - Original Message -
  From: Thomas Bennett [EMAIL PROTECTED]
  To: zope@zope.org
  Sent: Wednesday, April 25, 2007 4:15 PM
  Subject: Re: [Zope] apache rewrite quit working
 
   web-dav server  is listening on 9800
   http server is now listening on 80
   http was listening on 8086 until rewrite quit working,
 
 explained below.
 
   Thanks anyway,
 
  Any chance your nameserver settings got changed?
 
  Jonathan
 
 --
 
 Thomas McMillan Grant BennettAppalachian 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 )

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

-- 

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 )


[Zope] apache rewrite quit working

2007-04-25 Thread Thomas Bennett
Zope Version(Zope 2.9.7-final, python 2.4.4, linux2) 
Python Version  2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 
4.1.1-30)] 
System Platform linux2 
SOFTWARE_HOME   /var/zope/lib/python 
ZOPE_HOME   /var/zope 
INSTANCE_HOME   /var/zope 
CLIENT_HOME /var/zope/var 
Network ServicesZServer.HTTPServer.zhttp_server (Port: 80)
ZServer.HTTPServer.zwebdav_server (Port: 9800)

(Red Hat 4.1.1-30) is actually Fedora Core 6

Campus maintenance tested the backup generator this morning.  
When the power was cut off the circuit breaker tripped on the battery
 backup that kicks in momentarily until the generator takes over so 
all hardware rebooted.  After starting zeostorage and zope I found 
the apache rewrite rule that has been working since at least April 3,
 2007 has quit working.  Zeo, Zope, and apache have been restarted 
quite a few times since April 3 and worked fine.  This is the first time 
the server has totally rebooted since that date.  

NameVirtualHost 152.10.10.8:80

VirtualHost 152.10.10.8:80
  ServerAdmin [EMAIL PROTECTED]
  ServerName www.library.appstate.edu
  ServerSignature Off
  RewriteLog /var/log/httpd/libweb-rewrite_log
  ErrorLog /var/log/httpd/libweb-error_log
  LogLevel warn
  TransferLog /var/log/httpd/libweb-access_log
  ProxyVia on
  RewriteEngine On
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
  RewriteRule ^/(.*) 
http://localhost:8086/VirtualHostBase/http/%{SERVER_NAME}:80/VirtualHostRoot/$1 
[L,P]
/VirtualHost

Since apache quit rewriting I have changed the Zope port to 80 so we 
could get back online.  The rewrites

  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]

were added in after a nessus3 scan from suggestions on the report 
but the server had been running fine after that.  The syntax is correct 
according to httpd -t.

Any suggestions on getting or testing apache rewrite, or problems seen
with my rewrite rules would be appreciated.  


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] apache rewrite quit working

2007-04-25 Thread Thomas Bennett
web-dav server  is listening on 9800
http server is now listening on 80
http was listening on 8086 until rewrite quit working, explained below. 

Thanks anyway,

Thomas

PS: for what its worth, I found out in the mean time that NetDrive can cause 
Zope process to use over 95% of the cpu when the login in NetDrive is set and 
the password has changed on the Zope server and not on NetDrive.  It 
continuously tries to connect.  (NetDrive is a Novell program that allows you 
to map a webdav site as a drive on an MS Windows PC.)

On Wednesday 25 April 2007 14:46, Jonathan wrote:
 - Original Message -
 From: Thomas Bennett [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Wednesday, April 25, 2007 3:24 PM
 Subject: [Zope] apache rewrite quit working

  Zope Version (Zope 2.9.7-final, python 2.4.4, linux2)
  Python Version 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red
  Hat 4.1.1-30)]
  System Platform linux2
  SOFTWARE_HOME /var/zope/lib/python
  ZOPE_HOME /var/zope
  INSTANCE_HOME /var/zope
  CLIENT_HOME /var/zope/var
  Network Services ZServer.HTTPServer.zhttp_server (Port: 80)
  ZServer.HTTPServer.zwebdav_server (Port: 9800)
 
  (Red Hat 4.1.1-30) is actually Fedora Core 6
 
  NameVirtualHost 152.10.10.8:80
 
  VirtualHost 152.10.10.8:80
   ServerAdmin [EMAIL PROTECTED]
   ServerName www.library.appstate.edu
   ServerSignature Off
   RewriteLog /var/log/httpd/libweb-rewrite_log
   ErrorLog /var/log/httpd/libweb-error_log
   LogLevel warn
   TransferLog /var/log/httpd/libweb-access_log
   ProxyVia on
   RewriteEngine On
   RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
   RewriteRule .* - [F]
   RewriteRule ^/(.*)
  http://localhost:8086/VirtualHostBase/http/%{SERVER_NAME}:80/VirtualHostR
 oot/$1 [L,P]
  /VirtualHost
 
  Since apache quit rewriting I have changed the Zope port to 80 so we
  could get back online.  The rewrites
 
   RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
   RewriteRule .* - [F]
 
  Any suggestions on getting or testing apache rewrite, or problems seen
  with my rewrite rules would be appreciated.

 Your rewrite rule points to port 8086 but according to your information
 ZServer is listening on port 9800?


 Jonathan

-- 

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] apache rewrite quit working

2007-04-25 Thread Thomas Bennett
Don't think that is it because it works fine if I change Zope to port 80.  
And, I was accessing apache on port 80 using the ip number, localhost, the 
machine's real name, and the URL domain  it just wouldn't rewrite to 8086.
nslookup showed name was still set to my ip number.
Thomas


On Wednesday 25 April 2007 15:50, Jonathan wrote:
 - Original Message -
 From: Thomas Bennett [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Wednesday, April 25, 2007 4:15 PM
 Subject: Re: [Zope] apache rewrite quit working

  web-dav server  is listening on 9800
  http server is now listening on 80
  http was listening on 8086 until rewrite quit working, explained below.
 
  Thanks anyway,

 Any chance your nameserver settings got changed?

 Jonathan

-- 

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 )


[Zope] PluggableAuthService question about roles

2007-04-02 Thread Thomas Bennett
I have installed the following:

Zope Version(Zope 2.9.7-final, python 2.4.4, linux2) 
Python Version  2.4.4 (#1, Oct 23 2006, 13:58:00) 
   [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] 
System Platform linux2 
SOFTWARE_HOME   /var/zope/lib/python 
ZOPE_HOME   /var/zope 
INSTANCE_HOME   /var/zope 
CLIENT_HOME /var/zope/var 
Network ServicesZServer.HTTPServer.zhttp_server (Port: 8086)
ZServer.HTTPServer.zwebdav_server (Port: 9800)

I'm using Zeo storage with this.

The main problem is my understanding roles with  my new set up.

I am moving from a Zope 2.6.1 setup to the setup shown above.  I've already 
added some Products to my INSTANCE_HOME/Products directory including Plone 
which includes the PluggableAuthService folder.  I installed a Plone site for 
testing and deleted it.

  It appears that PAS has taken over my root acl_users folder or is this now a 
default in 2.9.

  Now I can only add users from the ZODB User Manager under /acl_users/users, 
there is nowhere to add a user from an Add buttion as in the older version of 
Zope.

  I can add roles from ZODB Role Manager in /acl_users/roles but these roles 
don't show up under the Security tab on any page.  I can add local roles 
under the Security tab and they don't show up in /acl_users/roles. 

I have searched and can find little to no documentation on use or difference 
in the two authentication methods.  Where can I find more information on 
roles in 2.9.7 and use in this situation?

Is this normal behavior and if so how can I synchronize roles between the 
Security tab and /acl_users/roles or is it not possible?

Am still searching the WEB and archives in the meantime.

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

___
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] CorpCalendar 1.4 and 1.7 issues

2007-03-22 Thread Thomas Bennett
Long story short:

Is it appropriate to change 
  self.REQUEST.AUTHENTICATED_USER.name
to
  self.REQUEST.REMOTE_USER
?

It appears to work but I'm not sure if there may be repercussions on this.

Thomas


Long story:

I had to make the change in getUserVariable(self, key, default=None) to view 
events CorpCalender 1.4 that was exported from Zope 2.6.1 and make the change 
in rememberUserVariable(self, key, value) to be able to add events in 
CorpCalendar 1.7 newly created calendars in Zope 2.9.6.
 
I can't manage/edit any events in the imported CorpCalendar but I'm not real 
concerned about that because we can add the new calendars to carry on from 
the last dates on the old ones.


Current configuration on server I am moving to:

Zope Version(Zope 2.9.6-final, python 2.4.4, linux2) 
Python Version  2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 
4.1.1-30)] 
System Platform linux2 
Using ZEO

I am moving CorpCalendar 1.4 calendars from Zope 2.6.1 to CorpCalendar 1.7 on 
Zope 2.9.6

Traceback said 'name' was not an attribute of AUTHENTICATED_USER
when trying to view events or add events

The change I made was
from
user = self.REQUEST.AUTHENTICATED_USER
username = user.name
to
user = self.REQUEST.AUTHENTICATED_USER
username = self.REQUEST.REMOTE_USER

in the functions 
   def rememberUserVariable(self, key, value):
and 
   def getUserVariable(self, key, default=None):

as shown below. 


def rememberUserVariable(self, key, value):
 set in stone 
cookiekey = '__corpcal_%s'%key.replace(' ','')
user = self.REQUEST.AUTHENTICATED_USER
username = self.REQUEST.REMOTE_USER
#username = user.name
# cookie
then = DateTime()+300
then = then.rfc822()
response = self.REQUEST.RESPONSE
response.setCookie(cookiekey, value, expires=then, path='/')
if username.lower().replace(' ','') != 'anonymoususer':
_user_vs = self._user_variables
if not self._user_variables.has_key(username):
_user_vs[username] = {}
_user_vs[key] = value
self._user_variables = _user_vs


def getUserVariable(self, key, default=None):
 get from stone 
cookiekey = '__corpcal_%s'%key.replace(' ','')
user = self.REQUEST.AUTHENTICATED_USER
username = self.REQUEST.REMOTE_USER
#username = user.name
# cookie
if self.REQUEST.cookies.has_key(cookiekey):
return self.REQUEST.cookies.get(cookiekey)
if username.lower().replace(' ','') != 'anonymoususer':
if self._user_variables.has_key(username):
if self._user_variables[username].has_key(key):
return self._user_variables[username][key]

return default


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] CorpCalendar 1.4 and 1.7 issues

2007-03-22 Thread Thomas Bennett
Thanks,  that even now lets me edit and also add to the CorpCalendars I 
exported from the older Zope and CC product. 

Now I just need to look at the Zope Book to see what the changes to the 
security declarations are so the lines below will quit showing up in my 
event.log.  

In the meantime I'm going to look into other calendars that have additional 
features.

Thomas

--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration 
for nonexistent method 'addEvent'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration 
for nonexistent method 'index_html'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration 
for nonexistent method 'standard_html_footer'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration 
for nonexistent method 'styles.css'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration 
for nonexistent method 'standard_html_header'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpEvent has a security declaration for 
nonexistent method 'edit'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpEvent has a security declaration for 
nonexistent method 'move'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpEvent has a security declaration for 
nonexistent method 'delete'
--
2007-03-22T14:10:44 WARNING Init Class 
Products.CorpCalendar.CorpCalendar.CorpEvent has a security declaration for 
nonexistent method 'index_html'
--



On Thursday 22 March 2007 13:26, Andreas Jung wrote:
 --On 22. März 2007 14:09:00 -0400 Thomas Bennett [EMAIL PROTECTED]

 wrote:
  Long story short:
 
  Is it appropriate to change
self.REQUEST.AUTHENTICATED_USER.name
  to
self.REQUEST.REMOTE_USER
  ?

 Using AUTHENTICATED_USER isn't recommended (since ages). You should always
 use the SecurityManager API:

 from AccessControl import getSecurityManager

 user = getSecurityManager().getUser()
 username = user.getUserName()

 Changing request parameters as a workaround for stinking code is
 unlikely a good choice. Better fix the related code instead of messing
 up the REQUEST.

 -aj

-- 

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 )


[Zope] making a dynamic quiz help

2006-11-28 Thread Thomas Bennett
I would like some suggestions on building a dynamic quiz.

  There are categories and in each category the question can be multiple 
choice or true/false.   For each category a specific number of questions is 
asked.  The questions asked are randomly chosen from a collection of 
questions for the category.  The number of questions chosen may be different 
for each category.

example
  category one - 3 questions
  category two - 1 question
  category three - 2 questions

My first thought is a python script does the randomization selecting questions 
from my postgresql database.  Quizzes submitted updates the database counting 
correct and wrong answers and emails the results to the student and 
instructors.

A second thought is a python script builds a dtml page quiz from individual 
dtml files which categories can be folders with an individual dtml file for 
each question.  Then submit questions and answers to database and email 
student and instructors.

A third thought is create a collection of complete quizzes and then randomly 
select a quiz (least preferred).

I've searched and the closest I could find was on the zope edu wiki just 
discussing an aggregated quiz but I haven't found where that has been 
persued.   Most or all quiz products create static quizzes not one that can 
be built on the fly.  Any other designs would be appreciated.

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] How best to copy and paste in pythonscript?

2006-09-07 Thread Thomas Bennett
For what its worth, thanks AJ and others for the time you put into replying 
queries daily.  I find often I don't have to ask because if someone hasn't 
already asked it someone else will soon ask.  Not to mention, but I will, 
some of your responses (all of you) leaves me saying  I didn''t know you 
could do that or so that's how its done.

Thanks,

Thomas


On Monday 28 August 2006 10:47, Andreas Jung wrote:
 --On 28. August 2006 07:41:03 -0700 Dennis Allison

 [EMAIL PROTECTED] wrote:
  AJ --
 
  You are, of course, correct.  I wanted Gaute to take a look at the
  actual code and proceed from there.  Docfinder is also a useful approach
  for learning about the system.
 
  Gaute --
 
  If you are a frequent reader of this list, you know that AJ's style is to
  encourage posters to 1) be complete and precise in the questions they
  post and 2) provide just enough infomration for the poster to discover
  the answer to his/her post himself.  This is an excellent pedagogical
  strategy but sometimes is frustrating.

 No, it's personal laziness to provide the food bite-size :-)

 Andreas

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

An important measure of effort in coding is the frequency with which you write 
something that doesn't actually match your mental representation of the 
problem, and have to backtrack on realizing that what you just typed won't 
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk: http://linux.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 )


[Zope] installing zope2.9.3 attempt

2006-06-08 Thread Thomas Bennett
I'll have to say, this is the first Zope that I've had a problem with the 
install since 1998.  The last successful version I installed was 2.92.

RedHat Linux 7.3
Python 2.4.3

I've looked at the Troubleshooting info in the INSTALL.txt file and my 
Makefile for Python 2.4.3 shows 
CC=             gcc -pthread
CXX=            c++ -pthread
and it was a vanilla build.  I've searched zope.org and google and haven't 
found anything relative to this problem except that a change from 2.9.2 to 
2.9.3 fixed a make install problem.

It looks like to me that not finding a zcml configuration file it quits.  Any 
ideas how I can fix this?

Output:

[z293]# ./configure --with-python=/usr/local/bin/python2.4 --prefix=/var/z29

Configuring Zope installation

Using Python interpreter at /usr/local/bin/python2.4

[z293]# make
/usr/local/bin/python2.4 install.py -q build
Traceback (most recent call last):
  File install.py, line 28, in ?
    context.initialize()
  File /var/z293/Support/zpkgsetup/setup.py, line 121, in initialize
    self.scan(depname, pkgdir, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 211, in scan
    self.scan_package(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 225, in scan_package
    pkginfo = package.loadPackageInfo(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 101, in loadPackageInfo
    pkginfo = read_package_info(directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 166, in 
read_package_info
    data_files[:] = expand_globs(directory, reldir, data_files)
  File /var/z293/Support/zpkgsetup/package.py, line 303, in expand_globs
    raise ValueError(
ValueError: filename pattern '*-configure.zcml' doesn't match any files
make: *** [build] Error 1


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

An important measure of effort in coding is the frequency with which you write 
something that doesn't actually match your mental representation of the 
problem, and have to backtrack on realizing that what you just typed won't 
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk: http://linux.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] [ANN] Zope 2.9.3 released

2006-06-07 Thread Thomas Bennett
I'll have to say, this is the first Zope that I've had a problem with the 
install since 1998.  The last successful version I installed was 2.92.

RedHat Linux 7.3
Python 2.4.3

I've looked at the Troubleshooting info in the INSTALL.txt file and my 
Makefile for Python 2.4.3 shows 
CC= gcc -pthread
CXX=c++ -pthread
and it was a vanilla build.

It looks like to me that not finding a zcml configuration file it quits.  Any 
ideas how I can fix this?


[z293]# ./configure --with-python=/usr/local/bin/python2.4 --prefix=/varz29

Configuring Zope installation

Using Python interpreter at /usr/local/bin/python2.4

[z293]# make
/usr/local/bin/python2.4 install.py -q build
Traceback (most recent call last):
  File install.py, line 28, in ?
context.initialize()
  File /var/z293/Support/zpkgsetup/setup.py, line 121, in initialize
self.scan(depname, pkgdir, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 211, in scan
self.scan_package(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 225, in scan_package
pkginfo = package.loadPackageInfo(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 101, in loadPackageInfo
pkginfo = read_package_info(directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 166, in 
read_package_info
data_files[:] = expand_globs(directory, reldir, data_files)
  File /var/z293/Support/zpkgsetup/package.py, line 303, in expand_globs
raise ValueError(
ValueError: filename pattern '*-configure.zcml' doesn't match any files
make: *** [build] Error 1



TIA
Thomas





On Friday 12 May 2006 08:32, Andreas Jung wrote:
 From: Andreas Jung [EMAIL PROTECTED]

 Hi all,

 on behalf of Zope Corporation and the Zope community I am pleased to
 announce the release of Zope 2.9.3.

 You can download  it from

   http://www.zope.org/Products/Zope/2.9.3/


 Some new features of Zope 2.9:

   - ZODB 3.6

   - Five 1.3

   - integration for Zope 3 events for object creation and deletion

   - Zope 3 i18n integration for page templates


 For more information on what is new in this release, see the
 CHANGES.txt files for the release:

   http://www.zope.org/Products/Zope/2.9.3/CHANGES.txt


 Please bring all the bugs you have found to the Zope bugtracker:

http://collector.zope.org/Zope:http://collector.zope.org/Zope

 For more information on the available Zope releases, guidance for selecting
 the right distribution and installation instructions, please see:

http://www.plope.com/Books/2_7Edition/InstallingZope.stx


 Support Python versions:

   Zope 2.9 requires Python 2.4.3 (Python 2.4.1, 2.4.2 are still
 acceptable). Older Python versions are no longer supported.


 Thanks to all being involved in this release.

 --
 Andreas Jung(andreas at zopyx dot com)

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

An important measure of effort in coding is the frequency with which you write 
something that doesn't actually match your mental representation of the 
problem, and have to backtrack on realizing that what you just typed won't 
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk: http://linux.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] Z SQL Method question

2006-05-26 Thread Thomas Bennett
With a lack of information here I'll answer based fully on assumption based on 
dtml. 

 In your form the action should go to a dtml method.

form action=optional_path_to/some_method ...

The dtml method should have a call to your Z SQL Method

dtml-call my_sql_method

And then you can add anything in the dtml method which will be viewed as the 
response page to the user that submitted the form.  You can also do some 
validation here if needed, with conditional statements.   I usually add a 
redirect under the dtml-call to go to a different response page to the user 
because if the user reloads the page with the dtml-call it will send the data 
to the database again unless there is a conflict like unique fields etc..

or

Are you using ZPT?

Thomas

On Friday 26 May 2006 08:54, Martin Koekenberg wrote:
 Hello,

 Who has experience with Z SQL Method.
 I Created a from to enten some data into MySQL server. I used Z SQL Method
 to write the dat into the databse. Everytime I submit the form I get a
 screen with the field in my Z SQL Method component.

 How can I write the dat from a form into my database at once by using Z SQL
 Method ?
 I tested the database connetion, that is working.

 Regards,

 Martin Koekenberg

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

An important measure of effort in coding is the frequency with which you write 
something that doesn't actually match your mental representation of the 
problem, and have to backtrack on realizing that what you just typed won't 
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk: http://linux.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] Zope and Tomcat troubles

2006-04-04 Thread Thomas Bennett
If I'm not mistaken, by default out of the package both Zope and Tomcat 
defaults to run on port 8080, don't know about the relation to OpenXchange.  
You need to change one of them.  

As Tino mentioned, Zope port is set in zope.conf.   zope.conf, with the Suse 
10 rpm I used on my notebook, is in /var/opt/zope/default/etc.   Look for  

http-server
 address 8080
http-server


Tomcat port is set in server.xml in the conf directory.  Look for something 
similar to:

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to 0 --

Also, you may want to check your environment to make sure the java paths are 
still correct although not related to a zope installation java paths can sure 
srew things up if they are wrong.  Defaults on Suse 10 are, assuming you 
haven't installed another version of jdk:

JAVA_ROOT=/usr/lib/jvm/jre
JAVA_HOME=/usr/lib/jvm/jre
JAVA_BINDIR=/usr/lib/jvm/jre/bin
JRE_HOME=/usr/lib/jvm/jre

and include /usr/lib/jvm/jre/bin in the PATH.

Thomas

On Friday 31 March 2006 18:25, Mads Munch Hansen wrote:
 Hi,
 Since I installed Zope on my server Tomcat has stoped working, and I was
 wondering if any of you knew of a solution. When I try to load the
 management interface for TomCat, all I get is a blank page, the same
 when I try to log into OpenXchange... I installed zope from the Plone
 Suse 10 rpm bundle on a Suse 10 box.

 I hope this isn't too much off topic, but I'm quite sure Zope related.

 Thanks in advance,
 Mads Munch Hansen

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box
University Library  Boone, North Carolina 28608

Please use the Systems Help Desk at http://linux.library.appstate.edu/help
All in Systems receive an email with each submission.

___
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 do I do this using Zope?

2006-03-09 Thread Thomas Bennett

We use COREBlog, http://coreblog.org/ , for our news page since July 2004.  It 
works great for a news page. See http://www.library.appstate.edu/blog/news/ .

The Recent Entries, Categories, and Archives links in the right column are 
automatically updated by the product.  You can customize the look, use, and 
feel.  

Thomas


On Monday 06 March 2006 04:48, John Poltorak wrote:
 I would like to create a folder (news) which contains several news items,
 lets say news1, news2, news3.

 I would like to set up a menu box which lists all the news items in
 the news folder which when clicked on would load each one up.


 How do I code this up? (Hope someone understands what I'm getting at)

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box
University Library  Boone, North Carolina 28608

Please use the Systems Help Desk at http://linux.library.appstate.edu/help
All in Systems receive an email with each submission.

___
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] Can Zope 2.9 Coexist With Zope 2.6 Using Different Ports?

2006-02-23 Thread Thomas Bennett
I'm running Zope 2.8.1-final, python 2.3.5, linux2 and  Zope 2.6.1 python 
2.1.3, linux2 on the same server so I don't see why you cant' also run Zope 
2.9.  More than likely each of your configurations have the same path to the 
lock file.  Edit zopefolder/etc/zope.conf where zopefolder is the name of you 
Zope instance.  Or you need to grant permissions for the user that Zope runs 
as to modify that file or change owner.  See 'man chmod' and 'man chown'. 

from zope.conf

# Directive: lock-filename
#
# Description:
# The path to a lock file which will be locked by Zope while it's
# running.  This file is used by zopectl.py to determine if Zope is
# currently running.  This defaults to CLIENT_HOME/Z2.lock.
#
# Default: CLIENT_HOME/Z2.lock
#
# Example:
#
#lock-filename /home/chrism/projects/sessions/var/Z2.lock

Thomas


On Wednesday 22 February 2006 12:59, Mark, Jonathan (Integic) wrote:
 My website GoodbyeJim.com currently runs Zope 2.6 on Red Hat 7.3. I have
 installed Zope 2.9 to use port 3200 instead of 80.

 Does Zope 2 support running two separate instances of two versions of Zope
 on different ports? I have been able to run Zope 3 concurrently with Zope
 2.6 without problem.

 When I run bin/runzope in my Zope 2.9 home directory I get the following
 error on lock_file.py line 60:

 IOError: [Errno 13] Permission denied: '.../Data.fs.lock'

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box
University Library  Boone, North Carolina 28608

Please use the Systems Help Desk at http://linux.library.appstate.edu/help
All in Systems receive an email with each submission.

___
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, Apache, REMOTE_USER

2006-01-11 Thread Thomas Bennett
Don't know if this will work for you but since I put Apache in front of Zope 
I've had to change all REMOTE_USER to HTTP_X_FORWARDED_FOR for use in scripts 
that used the REMOTE_USER value before.

Thomas

On Monday 19 December 2005 15:12, Robert Boyd wrote:
 I'm using Apache 2.0, and I cannot find a solution to passing the
 value of REMOTE_USER from Apache to Zope when using a rewrite rule. I
 have Apache rewriting requests for Zope, and hooked into Tomcat with
 mod_jk. My users login through a servlet, and Apache has REMOTE_USER
 available to it. But any subsequent request to Zope loses this value.
 I used to have this all working when using FastCGI, but I'm hoping to
 use only mod_rewrite. Is it possible?

 Thanks,
 Rob

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box
University Library  Boone, North Carolina 28608

Please use the Systems Help Desk at http://linux.library.appstate.edu/help
All in Systems receive an email with each submission.

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