Re: [Zope] problem authenticating, even with emergency user

2008-01-30 Thread Ben Bartrum
 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Wed, 30 Jan 2008 19:29:05 +0100
 
 This is too late.
 
 The dynamic loader looks at LD_LIBRARY_PATH on startup
 and then caches the value. Later modification have no effect
 on the current process.
 
 You need to set LD_LIBRARY_PATH before you start Zope.

Thank you Dieter, I think you are right, and I am going to add the 
LD_LIBRARY_PATH to zopectl
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] problem authenticating, even with emergency user

2008-01-29 Thread Ben Bartrum
 -Original Message-
 From: [EMAIL PROTECTED]

 This looks like a broken UserFolder instance (one that cannot
 be loaded).
 As a consequence, its validate method cannot be found and
 old_validation (usually no longer used in modern Zope versions)
 is tried.
 
 Check your logfile for warnings about not being able to load a class.

Yes, thanks - you are right.

2008-01-29T16:25:00 ERROR Zope Could not import Products.ZMySQLDA
Traceback (most recent call last):
  File /www/Zope-2.9.1/lib/python/OFS/Application.py, line 714, in 
import_product
product=__import__(pname, global_dict, global_dict, silly)
  File /www/zope/instance2.9.1/Products/ZMySQLDA/__init__.py, line 91, in ?
import DA
  File /www/zope/instance2.9.1/Products/ZMySQLDA/DA.py, line 92, in ?
from db import DB
  File /www/zope/instance2.9.1/Products/ZMySQLDA/db.py, line 89, in ?
import _mysql
ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No 
such file or directory

If on the command line I do: python2.4 -c 'import _mysql' I get: 
ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12:
open failed: No such file or directory

But if I do:
setenv LD_LIBRARY_PATH /usr/local/lib/
and then
python2.4 -c 'import _mysql'
it returns no error.

So to get the same effect for Zope, I have tried this in the zope.conf:

 environment
 LD_LIBRARY_PATH /usr/local/lib/
/environment

Unfortunately, this has no effect.  Any ideas?


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


Re: [Zope] problem authenticating, even with emergency user

2008-01-25 Thread Ben Bartrum
 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Thu, 17 Jan 2008 15:00:40 +0100
 To: zope@zope.org
 Subject: Re: [Zope] problem authenticating, even with emergency user
 
 
 On Jan 17, 2008, at 14:39 , Ben Bartrum wrote:
 
 Hello
 
 A Zope site which is running fine, is refusing all authentication
 with the error below.   I have tried the emergency user and
 restarted Zope, but the emergency user gets the same error:
 
 
 Site Error
 An error was encountered while publishing this resource.
 AttributeError
 Sorry, a site error occurred.
 Traceback (innermost last):
 Module ZPublisher.Publish, line 188, in publish_module_standard
 Module Products.PlacelessTranslationService.PatchStringIO, line 51,
 in new_publish
 Module ZPublisher.Publish, line 145, in publish
 Module Zope2.App.startup, line 222, in zpublisher_exception_hook
 Module ZPublisher.Publish, line 105, in publish
 Module ZPublisher.BaseRequest, line 446, in traverse
 Module ZPublisher.BaseRequest, line 550, in old_validation
 AttributeError: __getitem__ (Also, the following error occurred
 while attempting to render the standard error message, please see
 the event log for full details: getUserById)
 
 I bet you're running a non-standard user folder, and for some reason
 the user folder instance is broken. If you can't find why it is broken
 and the broken user folder is at the root of your Zope instance then
 fixing it would involve work in the debugger to delete the old one and
 create a new standard user folder.
 
 jens



Thanks Jens

The live server is a Sun server - the Zope installation was copied over from an 
older Sun server about a month ago, and seemed to run fine unless we try to log 
in.

The root folder of Zope does not have a MySQLUserfolder, but the main subfolder 
- which hosts the website - has.  When authenticating to the website 
(MySQLUserfolder) I get the traceback.  But I can also not authenticate to the 
ZMI (I get access denied with a known good password and with the emergency 
user.)  But I know I should have access to the ZMI, because I can copy the 
Data.fs to a test server and login to that.  So somehow now authentication is 
broken for both Zope and MySQL authentication.
This led me to think the problem is in the Zope files, and I ran a diff between 
my test system (Debian) and the live Sun server.

Many files differ, but in a way one would expect - the Python path is not the 
same, so the first line of every .py file is different.  Also, *.pyc and *.pyo 
differ - likely because of the different Python paths.  But a number of file 
names on the Sun server worry me.   They miss the last letter - for example 
__init__.p instead of __init__.py.  I worry that the system admins (who I 
haven't met yet) may somehow have managed to lose the last letters of some file 
names, although I have no idea how that would be possible.
Is it possible that Zope can run sucessfully with these incorrect filenames, 
and only the authentication is broken?

Only in Sunsrv/lib/python/Products/Five/doc/products/InterfaceTutorial: 
__init__.p
Only in Debian/lib/python/Products/Five/doc/products/InterfaceTutorial: 
__init__.py
Only in Sunsrv/lib/python/Products/PageTemplates/tests/input: 
CheckPathNothing.htm
Only in Debian/lib/python/Products/PageTemplates/tests/input: 
CheckPathNothing.html
Only in Sunsrv/lib/python/Products/PageTemplates/tests/input: 
StringExpression.htm
Only in Debian/lib/python/Products/PageTemplates/tests/input: 
StringExpression.html
Only in Sunsrv/lib/python/Products/PluginIndexes/DateIndex/tests: 
test_DateIndex.p
Only in Debian/lib/python/Products/PluginIndexes/DateIndex/tests: 
test_DateIndex.py
Only in Sunsrv/lib/python/Products/PluginIndexes/TextIndex/dtml: 
addVocabulary.dtm
Only in Debian/lib/python/Products/PluginIndexes/TextIndex/dtml: 
addVocabulary.dtml
Only in Sunsrv/lib/python/Products/PythonScripts/tests/tscripts: 
mutate_literals.p
Only in Debian/lib/python/Products/PythonScripts/tests/tscripts: 
mutate_literals.ps
Only in Sunsrv/lib/python/Testing/ZopeTestCase/zopedoctest: 
testFunctionalDocTest.p
Only in Debian/lib/python/Testing/ZopeTestCase/zopedoctest: 
testFunctionalDocTest.py
Only in Sunsrv/lib/python/zope/app/apidoc/codemodule/browser: class_index.p
Only in Debian/lib/python/zope/app/apidoc/codemodule/browser: class_index.pt
Only in Sunsrv/lib/python/zope/app/apidoc/codemodule/browser: configure.zcm
Only in Debian/lib/python/zope/app/apidoc/codemodule/browser: configure.zcml
Only in Sunsrv/lib/python/zope/app/apidoc/codemodule/browser: static_menu.p
Only in Debian/lib/python/zope/app/apidoc/codemodule/browser: static_menu.pt
Only in Sunsrv/lib/python/zope/app/onlinehelp: onlinehelp-configure.zcm
Only in Sunsrv/lib/python/zope/app/pagetemplate/ftests: configure.zcm
Only in Debian/lib/python/zope/app/pagetemplate/ftests: configure.zcml
Only in Sunsrv/lib/python/zope/app/pagetemplate/ftests: test_nested.p
Only in Debian/lib/python/zope/app/pagetemplate/ftests: test_nested.py
Only

[Zope] problem authenticating, even with emergency user

2008-01-17 Thread Ben Bartrum
Hello

A Zope site which is running fine, is refusing all authentication with the 
error below.   I have tried the emergency user and restarted Zope, but the 
emergency user gets the same error:


Site Error
An error was encountered while publishing this resource. 
AttributeError
 Sorry, a site error occurred.
Traceback (innermost last): 
 Module ZPublisher.Publish, line 188, in publish_module_standard
 Module Products.PlacelessTranslationService.PatchStringIO, line 51, in 
new_publish
 Module ZPublisher.Publish, line 145, in publish
 Module Zope2.App.startup, line 222, in zpublisher_exception_hook
 Module ZPublisher.Publish, line 105, in publish
 Module ZPublisher.BaseRequest, line 446, in traverse
 Module ZPublisher.BaseRequest, line 550, in old_validation
AttributeError: __getitem__ (Also, the following error occurred while 
attempting to render the standard error message, please see the event log for 
full details: getUserById)


Receive Notifications of Incoming Messages
Easily monitor multiple email accounts  access them with a click.
Visit http://www.inbox.com/notifier and check it out!
___
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] Bus error

2007-11-26 Thread Ben Bartrum
I'm recreating a Zope site from a SunOS server on FreeBSD.  Zope starts but as 
soon as anything is accessed (including the ZMI), it bombs out with just:

  LOG('ZODB', WARNING, 'Could not import class %s '
Bus error

I rsynced the ZOPE_HOME from the SunOS server.   Could it be that there are 
things in the ZOPE_HOME that are compiled for SunOS?  However, I have done this 
successfully for another version of Zope.

The only thing you can access (provided you access it before anything else) is 
the DeadlockDebugger , which then doesn't show the normal 4 threads - it only 
shows:

   Threads traceback dump at 2007-11-26 17:00:02

   End of dump


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
___
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] server slowed down to a crawl

2007-11-22 Thread Ben Bartrum

 Have you found out why it is slowing?
 Has your traffic increased - limit your traffic temporarily
 Perhaps its the Hardware? If you mean with 'old' P3/P4, perhaps
 the CPU cooler is dead and the CPU is in reduced performance mode?
 Perhaps some IO controller (disks?) is failing.
 
 Or your changes weren't cosmetic. Roll back to your last known good
 backup (you have one, right?) and apply cour changes a atomic as
 possible and test them

Bryan Sullivan's suggestion of the DeadlockDebugger helped me to solve the 
problem.  The DeadlockDebugger was crucial, and far easier
to work with than I anticipated. It was quite a subtle problem - an earlier 
change worked fine at the time, but the deadlock started  when the underlying 
SQL data changed.  That is, an SQL query returned less results than the code 
was meant to work with, and there was no clause in a  Python script to deal 
with this eventuality.  So rolling back to dates when the site worked fine did 
not help until I understood the nature of the problem.
___
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] folder like shortcut / symlink / pointer / urlredirect

2007-10-31 Thread Ben Bartrum
Hello

The DTML code below populates a large menu with folders and their descriptions, 
however one of the items in the menu should now point to a URL on a different 
server.  I can change the code - for example make it ordinary HTML, or add the 
new URL above or below, but I want to know if it is possible to make a 
folder-like object that points to the new URL, and will work with no change to 
the code below:


Choose an option:
/p
dtml-in services.objectValues('Folder') skip_unauthorized=1 
sort=menuorder
dtml-if _.int(showhide)==1
div class=bulletList
stronga href=dtml-var 
absolute_url/index.htmldtml-var title/a/strong
dtml-if description!=None and description!=''
br /
dtml-var description
/dtml-if
/div
/dtml-if
/dtml-in

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 )


Re: [Zope] folder like shortcut / symlink / pointer / urlredirect

2007-10-31 Thread Ben Bartrum
Andreas Jung wrote:
 Why does it has to be a folder? You can simple add a PythonScript that
 performs an URL redirection if called. You just have to added the script
 and adjust your loop to find folders *and* PythonScript.


Thanks - I ended up putting only dtml-call 
RESPONSE.redirect('http://www.example.com') in the index.html inside the 
relevant folder.


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


Re: [Zope] HOw to create a Zope Instance ?

2007-10-04 Thread Ben Bartrum
Getting seriously OT but this got me interested in what kind of company this 
is, and whether it has anything to do with Zope's Zeo, so I used  their search 
box to search the word Zeo.  The result is interesting.

 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Thu, 04 Oct 2007 09:10:47 +0200
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: [Zope] HOw to create a Zope Instance ?
 
 
 
 --On 4. Oktober 2007 08:10:29 +0100 Chris Withers
 [EMAIL PROTECTED]
 wrote:
 
 System User wrote:
 How t create a zope instance, how to give database connections to it?
 
 You're at Zeomega, I'm sure there's someone who can help you out
 there...
 
 
 I have the impression that ppl at Zeomega don't talk to each other
 
 -aj


GET FREE 5GB ONLINE STORAGE - Safely store your documents, photos and music 
online!
Visit http://www.inbox.com/storage to find out more!
___
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: mysqluserfolder access blown - work lost?

2007-09-28 Thread Ben Bartrum


 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Fri, 28 Sep 2007 09:07:43 -0400

 Hmm, at this point I would be trying one of two things:
 
  - You might try undoing the transactions where you added / configureed
the user folder.
 

Embarrassingly, I haven't tried this before.  I did now, and it worked - thanks!


ONE-CLICK WEBMAIL ACCESS - Easily monitor  access your email accounts!
Visit http://www.inbox.com/notifier and check it out!
___
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] mysqluserfolder access blown - work lost?

2007-09-28 Thread Ben Bartrum
Hello

I have added mysqlUserFolder to a folder that contained a lot of work I have 
done.  I may not have entered the database connection parameters correctly (it 
was late).  The upshot is that I can now not access anything in that folder.

Removing the mysqlUserFolder product doesn't help.

Zope 2.7.3
mysqlUserFolder-1.0.5

Any suggestions very welcome

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 )


Re: [Zope] mysqluserfolder access blown - work lost?

2007-09-28 Thread Ben Bartrum
Thanks, but I am logged in as the most powerful user and cannot enter the 
folder in order to add a regular user folder to it.


 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Fri, 28 Sep 2007 19:40:20 +1000
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope] mysqluserfolder access blown - work lost?
 
 +---[ Ben Bartrum ]--
 | Hello
 |
 | I have added mysqlUserFolder to a folder that contained a lot of work I
 have done.
 
 The data should all still be there, but, in accessible due to
 permissions.
 
 Try logging in as the emergency user, and adding a regular user folder to
 the
 folder.
 
 --
 Andrew Milton
 [EMAIL PROTECTED]


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
___
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 )