[Zope-dev] Copy without taking including the structure

2002-07-05 Thread Petter Enholm

Hi,

I am implementing a kind of Copy function which will strip off the sub level
of object being copied. The idea is to copy only the object marked for
copying - without the sub objects.
(For those interested: I use these objects as special kind of reference
objects  in my structure...)

In the new copy routine I have added these lines which avoids having the sub
level created:

[ ]

newObject = ob._getCopy(self)

for zob in newObject._objects:
   delattr(newObject, zob['id'])
newObject._objects = ()

[ . ]

self._setObject(newObject.id,newObject)   # add the object to the Zope
database

... delattr is the same method as used by _delOb, so I assumed this is the
safe way of doing it.
Can anyone tell me if this is not OK ? It seems to work very well 

Best regards

Petter Enholm
Snapper as
www.snapper.no






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



[Zope-dev] Splitter problem #3

2002-04-03 Thread Petter Enholm


Hi,

Like other people on the list I get problems with the splitter. I checked
out latest version of Zope from cvs today, compiled wo_pcgi.py and started
Zope. Running nicely. Then I shut down Zope and copied in a Data.fs file
from Zope 2.4.3 - which by the way runs nicely on Zope 2.5.1-b1.

When I now attempt to restart Zope I get several errors, among others this
one:

2002-04-03T18:01:41 ERROR(200) Zope Couldn't install PageTemplates
Traceback (innermost last):
  File /usr/local/Zope/lib/python/OFS/Application.py, line 639, in
install_product
(Object: Zope)
(Info: PageTemplates)
  File /usr/local/Zope/lib/python/Products/PageTemplates/__init__.py, line
28, in initialize
  File
/usr/local/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py, line
342, in initialize
  File /usr/local/Zope/lib/python/App/ProductContext.py, line 318, in
registerHelp
  File /usr/local/Zope/lib/python/App/ProductContext.py, line 244, in
registerHelpTopic
  File /usr/local/Zope/lib/python/OFS/ObjectManager.py, line 290, in
_setObject
(Object: Help)
  File /usr/local/Zope/lib/python/HelpSys/HelpTopic.py, line 79, in
manage_afterAdd
(Object: PageTemplate_Edit.stx)
  File /usr/local/Zope/lib/python/HelpSys/HelpTopic.py, line 92, in
index_object
(Object: PageTemplate_Edit.stx)
  File /usr/local/Zope/lib/python/Products/ZCatalog/ZCatalog.py, line 476,
in catalog_object
(Object: catalog)
  File /usr/local/Zope/lib/python/Products/ZCatalog/Catalog.py, line 366, in
catalogObject
  File
/usr/local/Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py,
line 306, in index_object
(Object: SearchableText)
  File /usr/local/Zope/lib/python/ZODB/Connection.py, line 505, in setstate
SystemError: Failed to import class Splitter from module
Products.PluginIndexes.TextIndex.Splitter.ZopeSplitter

I checked the directory containing ZopeSplitter and I saw that the
__init__.py file was empy. I copied on the one from Zope-2.5.1-b1 - and Zope
starts without problems.  I am curious now, what is the problem here ? Can I
continue running with the __init__.py from older Zope version or is there
other things that must be done to my installation.

Best regards
Petter Enholm
Snapper




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



Re: [Zope-dev] Splitter problem #3

2002-04-03 Thread Petter Enholm


That is correct, but in the CVS tree the file is empty.
I checked out from the CVS tree yesterday.

Here:
http://cvs.zope.org/~checkout~/Zope/lib/python/Products/PluginIndexes/TextIn
dex/Splitter/ZopeSplitter/

I also downloaded a tar ball for the HEAD tag, which also gives a
__init__.py which zero bytes.

Best regards

Petter Enholm

- Original Message -
From: Andreas Jung [EMAIL PROTECTED]
To: Petter Enholm [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 6:37 PM
Subject: Re: [Zope-dev] Splitter problem #3



 - Original Message -
 From: Petter Enholm [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, April 03, 2002 11:27
 Subject: [Zope-dev] Splitter problem #3


 
  I checked the directory containing ZopeSplitter and I saw that the
  __init__.py file was empy. I copied on the one from Zope-2.5.1-b1 - and
 Zope
  starts without problems.  I am curious now, what is the problem here ?
Can
 I
  continue running with the __init__.py from older Zope version or is
there
  other things that must be done to my installation.

 Neither the  ZopeSplitter/__init__.py file for 2.4.3 nor 2.5.1b1 are empty
 for me.

 -aj



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




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



Re: [Zope] Some help required but no sarcastic comments this time please

2001-01-24 Thread Petter Enholm



Hi,

I see that you get all kinds of responses on the 
zope mailing list regarding Zope, mySQL and Windows. Hate to see that ... 
well .. to your problems:

I run Windows 2000 on my laptop with Zope 2.2.4 and 
mySQL 3.23.30. 

I even run the same Zope and mySQL setup on a 
Compaq server with Windows 4.0 in a production environment. Not the kind of 
setup I would prefer, but my customer wanted it installed on this server. 
Anyway: the setup is 100% stable, and I and my customer is really satisfied with 
the solution.

I had problems getting things working when I 
compiled the mysql.dll file manually. Instead, I downloaded the files as 
specified in the HOW-TO on mySQL in win32 environment. 

With these files installed I have no problems 
performing different queries, inserts, updates etc in the mySQL database. I have 
not experienced one crash!!

The setup has also been tested (though not 
thorougly) under Windows 95 and Windows 98!

So: try to follow the HOW-TO and download the files 
specified there. Setting up Zope  mySQL on Win32 machines takes no for me 
at all, and it always runs very well!!

Best of luck to you!

Best regards

Petter Enholm


Re: [Zope] MySQL

2001-01-11 Thread Petter Enholm


Hi,

I did not get mySQL running using the HOW-TO below. It seems to be outdated,
as there is not need for patching anymore. The following HOW-TO is newer;
http://www.zope.org/Members/MikeP/ZMySQLDA. I had mySQL up and running in no
time when following this HOW-TO.

If you are using mySQL on WIN32 use the following HOW-TO:
http://www.zope.org/Members/philh/mysql, and download all the files this
HOW-TO refers to, instead of compiling your own (if you don't know exactly
what you are doing).

I don't want to sound negative, but someone should really tidy up these
HOW-TOs for mySQL and remove the old ones. What caused me most trouble when
installing mySQL for the first time was to find the correct HOW-TO.

Q: Are there any person responsible for the HOW-TO's?

Suggestion: Now that there are many persons working with Zope, writing
HOW-TO's etc - would it be an idea to create categories for the different
HOW-TO's and that each category should have a maintainer, responsible for
removing old HOW-TO's or at least clearly state which version of the
products they are valid for? I could take responsibility for one category
... I think this could improve the quality of the available
documentation.

Best regards
Petter Enholm

Also:
- Original Message -
From: "Eric Walstad" [EMAIL PROTECTED]
To: "vishnu prasad" 
Cc: "[EMAIL PROTECTED]" [EMAIL PROTECTED]
Sent: Wednesday, January 10, 2001 12:32 AM
Subject: RE: [Zope] MySQL


 http://www.zope.org/Members/alanpog/zmysqlda_steps
 Should get you started...
 Eric.
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of vishnu
 prasad
 Sent: Tuesday, January 09, 2001 3:17 PM
 To: [EMAIL PROTECTED]
 Subject: [Zope] MySQL


 can anyone update me with list of activities that I need to follow for
 having MySQL installed and integrated with Zope?

 thanks in advance,
 vp


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


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




[Zope] SV: [Zope] Re: Network hangs

2000-12-20 Thread Petter Enholm

Hi,

My advice to you is to run Zope and Apache on the same machine, and use
Apache as the front-end for Zope. Apache gives much better support for
virtual hosts using rewrite and proxy modules. I tried to do these things in
Zope, but gave up as the rewrite possibilities in Zope is not very good. I
needed to give a domain access two or three levels into a Zope tree, but
Zope rewrite operations only allowed me to define virtual hosts one level
down in the tree. Please correct me here anyone, if I'm wrong.

I have run Apache and Zope under Linux Redhat 6.2, Windows 2000 and Windows
NT 4.0 without any problems.

Best regards
Petter Enholm

-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]På vegne av Rick
Munday
Sendt: 20. desember 2000 05:38
Til: Zope
Emne: [Zope] Re: Network hangs


 Apache sit's on port 80 w/all static pages
 Zope is now on port 8080 until the move is completed (then it becomes
 primary on 80).

So I was able to narow it down. With Apache now stopped, Zope is running
great.

I assume there was some arguement between Zope and Apache about who
controlled what (?) but with Apache stopped it's solid.

Anybody have any ideas? Should I scrap Zserver and do the pcgi patches?
(This machine will eventualy host 2 domains so I may have answered my own
question).

Input please...


Rick




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


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




Re: [Zope] mySQL DA on Win32

2000-12-14 Thread Petter Enholm

 From: "Lee Reilly CS1997" [EMAIL PROTECTED]

 I have seen the mySQL DA on Zope.org but I understand that it "does not
 support win32 platforms at this time". I need database access ASAP so
 can anyone offer any advice?

There is a HOW-TO for this:  How-To: ZMySQLDA on Win32

Search for it on www.zope.org. I run Zope and mySQL (3.23.28-gamma) on
Win95. Advice; download the files as specified in the how-to. I tried to use
the .dll file that we're installed with mySQL  - crashed Python/Zope. Also,
remember to store Python files in correct Python directory if you have
installed more than one version / installation of Python.

Best regards
Petter Enholm
Snapper


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




Re: [Zope] Problem on connect to MySQL

2000-12-12 Thread Petter Enholm

Hi,

The connection string is written like this;

database@host user password

hence you should give the following connection string:

customerDb localhost pass52696

You do not need to specify the host name when running Zope and SQL-server on
the same machine.
Also note that you should not use brackets (  [ ]  )  when specifying the
host name, if you intend to do so.

Best regards

Petter Enholm
Snapper as

- Original Message -
From: Angietel
To: [EMAIL PROTECTED]
Sent: Tuesday, December 12, 2000 4:37 AM
Subject: [Zope] Problem on connect to MySQL


When i type in the Connection String , it will prompt out the error
message - "illegal operation" and in my python it will exactly like this:-

Files\WebSite\z2.py" -D
--
2000-12-12T03:15:10 PROBLEM(100) ZServer Computing default hostname
--
2000-12-12T03:15:11 INFO(0) ZServer Medusa (V1.16.4.2) started at Tue Dec 12
11:
15:11 2000
Hostname: ANGIE
Port:8080

--
2000-12-12T03:15:11 INFO(0) ZServer FTP server started at Tue Dec 12
11:15:11 20
00
Authorizer:None
Hostname: angie
Port: 8021
--
2000-12-12T03:15:11 INFO(0) ZServer PCGI Server started at Tue Dec 12
11:15:11 2
000
Inet socket port: 8090
--
2000-12-12T03:15:11 INFO(0) ZServer Monitor Server (V1.8) started on port
8099

C:\Program Files\WebSite  #// This is error msg

and i would like to confirm to u whether the Connection String is write like
this:-
customerDb[@localhost]Password pass52696


In mySQL i set up the user password like this:-
INSERT INTO user
VALUES('localhost','password',PASSWORD=Password('pass52696'),'Y','Y','Y',Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
and my Database name is CustomerDb

P/s let me know where is my mistake! Thank You!


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




Re: [Zope] Problem on connect to MySQL

2000-12-12 Thread Petter Enholm

Correction - Too early in the morning, sorry for the inconvenience 

 In mySQL i set up the user password like this:-
 INSERT INTO user

VALUES('localhost','password',PASSWORD=Password('pass52696'),'Y','Y','Y',Y',
 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
 and my Database name is CustomerDb


You have named the user password, hence your connection string should be:

CustomerDb password pass52696

Just for the record, I'm sure you figured this out by yourself.

Best regards

Petter Enholm

- Original Message -
From: "Petter Enholm" [EMAIL PROTECTED]
To: "Angietel" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 12, 2000 9:23 AM
Subject: Re: [Zope] Problem on connect to MySQL


 Hi,

 The connection string is written like this;

 database@host user password

 hence you should give the following connection string:

 customerDb localhost pass52696

 You do not need to specify the host name when running Zope and SQL-server
on
 the same machine.
 Also note that you should not use brackets (  [ ]  )  when specifying the
 host name, if you intend to do so.

 Best regards

 Petter Enholm
 Snapper as




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




[Zope] Microsoft IIS 4.0 and Zope

2000-12-08 Thread Petter Enholm

Hi,

This may be more of a Microsoft IIS questions than Zope question, but I give
it a shot!

I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS
4.0, followed to Howto that explains how to set up PCGI with IIS, and all
works very well. I can access Zope through
http://localhost/scripts/zope.pcgi

Next step: I want to access the Zope site through a given DNS name, f eks
www.mydomain.com. How can I do this with IIS 4.0? I find no way to redirect
a virtual host and at the same time rewrite the URL so that the user gets
http://www.mydomain.com in the browser, not .../scripts/zope.pcgi.

Anybody out there with knowledge on this issue?

Best regards

Petter Enholm
Snapper as


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




Re: [Zope] Microsoft IIS 4.0 and Zope

2000-12-08 Thread Petter Enholm

The easiest thing to do (for me now) is to add Apache as front-end
web-server for both IIS and Zope. The access to documentation, well tested
and documented rules for rewriting, lots of HOW-TO's, mailing lists etc
makes this a good choice  - open source rules!

Any comments on running Apache as front-end for IIS 4.0 and Zope? I would
gladly throw out the IIS server, but my customers has software that relies
on this server.

Best regards
Petter Enholm

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, December 08, 2000 4:05 PM
Subject: RE: [Zope] Microsoft IIS 4.0 and Zope


 Hi Petter,

 I have the same problem.  Could you tell me if you find a way?  I
 hope someone on this list have an answer!



 -Message d'origine-
 De : Petter Enholm [mailto:[EMAIL PROTECTED]]
 Envoyé : vendredi 8 décembre 2000 07:53
 À : [EMAIL PROTECTED]
 Objet : [Zope] Microsoft IIS 4.0 and Zope


 Hi,

 This may be more of a Microsoft IIS questions than Zope question, but I
give
 it a shot!

 I have installed Zope (on port 8080) on a Windows NT 4.0 server with IIS
 4.0, followed to Howto that explains how to set up PCGI with IIS, and all
 works very well. I can access Zope through
 http://localhost/scripts/zope.pcgi

 Next step: I want to access the Zope site through a given DNS name, f eks
 www.mydomain.com. How can I do this with IIS 4.0? I find no way to
redirect
 a virtual host and at the same time rewrite the URL so that the user gets
 http://www.mydomain.com in the browser, not .../scripts/zope.pcgi.

 Anybody out there with knowledge on this issue?

 Best regards

 Petter Enholm
 Snapper as


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


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