Re: [Zope] how to include a local html file

2006-04-07 Thread David H

Chris Purves wrote:


Hello,

How can I include an html file on my local filesystem into a DTML method?


 


Chris,
You have asked a two part question.

a) how to access your local file system

http://sourceforge.net/projects/localfs

and b) how to access it in a DTML method

Dont know cause I havent used (a) but i'm sure you will see examples if 
you have (a).


David


___
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] how to include a local html file

2006-04-07 Thread Chris Purves
Hello,

How can I include an html file on my local filesystem into a DTML method?


-- 
Good day, eh.
Chris

___
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] Problems Executing pdftk from within zope.

2006-04-07 Thread Jonathan
Have you tried running it as a spawned job from the shell?  If something is 
pooched in the environment then the job should hang (then you know it is not 
a zope problem).


Jonathan

- Original Message - 
From: "Jerry Westrick" <[EMAIL PROTECTED]>

To: 
Sent: Friday, April 07, 2006 6:42 PM
Subject: [Zope] Problems Executing pdftk from within zope.



Hello Zopistas...

I trying to modify pdf files from within zope.
I use the following command:

'/usr/bin/pdftk /t/in.pdf attach_files /t/a1.pdf /t/a2.pdf output 
/t/out.pdf'


When I execute it as root it works...

When executed from within zope,
(this i've done via external command that executes os.system(...))
A task is started to executed it, but the task hangs.

Even with set the setuid bit on /usr/bin/pdftk, making the zope spawned 
task

run as root the command just hangs
(I've confirmed that the task is actually running as root!)

I'm sure I've forgoten something silly,
but after bashing it around for several hours I just can't figure out
why it hangs

Any suggestions at what the problem could be are welcome 8-)

Jerry
P.S. Here my Control panel info, incase it's relevant


Zope Version (unreleased version, python 2.3.4, linux2)
Python Version 2.3.4 (#1, Oct 5 2004, 00:26:51) [GCC 3.3.4 (pre 3.3.5
20040809)]

System Platform linux2
SOFTWARE_HOME /opt/zope/lib/python
ZOPE_HOME /opt/zope
INSTANCE_HOME /var/opt/zope/default
CLIENT_HOME /var/opt/zope/default/var
Network Services
ZServer.HTTPServer.zhttp_server (Port: 8080)
ZServer.FTPServer.FTPServer (Port: 8021)
ZServer.HTTPServer.zhttp_server (Port: 8088)
Process Id 32058 (1110281136)
Running For 12 min 58 sec
___
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 )


[Zope] Problems Executing pdftk from within zope.

2006-04-07 Thread Jerry Westrick
Hello Zopistas...

I trying to modify pdf files from within zope.
I use the following command:

'/usr/bin/pdftk /t/in.pdf attach_files /t/a1.pdf /t/a2.pdf output /t/out.pdf'

When I execute it as root it works...

When executed from within zope, 
(this i've done via external command that executes os.system(...))
A task is started to executed it, but the task hangs.

Even with set the setuid bit on /usr/bin/pdftk, making the zope spawned task 
run as root the command just hangs
(I've confirmed that the task is actually running as root!)

I'm sure I've forgoten something silly,
but after bashing it around for several hours I just can't figure out
why it hangs

Any suggestions at what the problem could be are welcome 8-)

Jerry
P.S. Here my Control panel info, incase it's relevant


Zope Version(unreleased version, python 2.3.4, linux2)
Python Version  2.3.4 (#1, Oct 5 2004, 00:26:51) [GCC 3.3.4 (pre 3.3.5 
20040809)]

System Platform linux2
SOFTWARE_HOME   /opt/zope/lib/python
ZOPE_HOME   /opt/zope
INSTANCE_HOME   /var/opt/zope/default
CLIENT_HOME /var/opt/zope/default/var
Network Services
ZServer.HTTPServer.zhttp_server (Port: 8080)
ZServer.FTPServer.FTPServer (Port: 8021)
ZServer.HTTPServer.zhttp_server (Port: 8088)
Process Id  32058 (1110281136)
Running For 12 min 58 sec 
___
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] TextIndexNG and ExtFile

2006-04-07 Thread Michael Vartanyan


I've got a site with a couple hundred ExtFile objects. I now need to 
index the content of the various files (word, pdf, excel, ppt). I see 
that ExtFile doesn't have a PrincipiaSearchSource method so I created 
one. It returns self.index_html(). When I go back into my catalog and 
reindex my PrincipiaSearchSource index (a textindexng index), clicking 
the "Reindex" button opens the ExtFile I'm trying to index. Is there 
something more to the process of trying to index ExtFiles with 
TextIndexNG. I've googled around and tried a few things but either 
they don't work or I get the same results I've just described. Any ideas?


this is what was discussed here:

http://mail.zope.org/pipermail/zope/2006-March/165803.html
http://mail.zope.org/pipermail/zope/2006-April/165924.html


and a number of times before. Looks like someone needs to really look at 
this. I will try to do that over the weekend, if nothing works... well, 
my 19k ExtFiles will have to turn into Chris' blobs :-)

___
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] TextIndexNG and ExtFile

2006-04-07 Thread Palermo, Tom



All,
 
I've got a site with a couple 
hundred ExtFile objects. I now need to index the content of the various files 
(word, pdf, excel, ppt). I see that ExtFile doesn't have a PrincipiaSearchSource 
method so I created one. It returns self.index_html(). When I go back into my 
catalog and reindex my PrincipiaSearchSource index (a textindexng index), 
clicking the "Reindex" button opens the ExtFile I'm trying to index. Is there 
something more to the process of trying to index ExtFiles with TextIndexNG. I've 
googled around and tried a few things but either they don't work or I get the 
same results I've just described. Any ideas?
 
Thanks,
Tom 
Palermo
___
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 crashes on request of certain page

2006-04-07 Thread Dieter Maurer
Sven Jacobs wrote at 2006-4-7 10:34 +0200:
> ...
>2006-03-27T12:18:57 PANIC(300) z2 Startup exception
>Traceback (innermost last):
>   File /opt/zope/z2.py, line 495, in ?
> (Object: ZLogger)
>   File , line 1, in ?
>   File /opt/zope/lib/python/Zope/__init__.py, line 37, in ?
>   File /opt/zope/lib/python/ZODB/FileStorage.py, line 202, in __init__
>   File /opt/zope/lib/python/ZODB/lock_file.py, line 29, in lock_file
>StorageSystemError: Could not lock the database file.  There must be
>another process that has opened the file.

This does not look like a crash.

The message tells you that a start failed because another running (!)
process still has the ZODB storage file locked.

Almost surely, Zope is not dead (at least not completely).


I have seen similar behaviour in the past: caused by a Python threading
bug triggered by a Linux 2.4 signal handling peculiarity:

   A fatal signal kills the main Zope thread (handling all IO
   with the clients) but let the remaining threads in an
   insane state (could only be removed with "kill -9").

Current Python versions should have fixed this problem.
>
>Operating system is SuSE Linux 8.0, Zope version is 2.5.0, Python 2.2, 

Almost surely, one of the configurations with the bug mentioned above...

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


Re: [Zope] filtering results

2006-04-07 Thread Dieter Maurer
gf wrote at 2006-4-6 12:06 -0600:
>Hi,
>I am a Zope newbie. I apologize if the terminology I use below is not
>correct, but I hope that you get the gist of what I am about to ask.
>
>I would like to be able to 'filter' results before returning them to
>the user.  In other words, if a user requests a given object, it is
>passed through a filter before being passed on to him or her. As a
>simple example, I may want to tidy the html before the user sees it,
>or eliminate or add certain tags or words.
>
>I have put together a simple 'html tidy' external method that takes
>raw html and produces a tidied version, but I don't know how I can
>apply it.

The current Zope version does not support general post processing.


Depending on your precise use cases, you have various options:

 *  change "ZPublisher.HTTPResponse.HTTPResponse" to
perform postprocessing it its "setBody".

 *  change "ZPublisher.Publish.publish_module" to add
post processing

 *  use a PythonScript and its "traverse_subpath" feature.

When traversal reaches a PythonScript, then traversal
stops and the remaining traversal steps are
made available in the scripts "traverse_subpath".

The script can try to locate the object identified
by the "traverse_subpath" and call it.
It then can perform post processing on the result.

This usually works for templates and parameterless scripts.
Passing parameters to scripts is difficult.
You probably would like to make "ZPublisher.mapply.mapply"
available in untrusted code for this.

The approach will also fail when the user can only be authenticated
below the script.
>
>Thank you for any comments, suggestions, or simple examples you may be
>able to provide.
>
>Best  Regards,
>gyro
>

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


RE: [Zope] TextIndexNG question

2006-04-07 Thread Palermo, Tom
I figured it out.

-Tom 

-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 07, 2006 1:33 PM
To: Palermo, Tom; 'zope@zope.org'
Subject: Re: [Zope] TextIndexNG question



--On 7. April 2006 13:18:52 -0400 "Palermo, Tom" 
<[EMAIL PROTECTED]> wrote:

>
> Why do none of the typical Microsoft converters show up in the above 
> table?

Because you did not read the TXNG documentation? The documentation states
clearly that you must have the related converters installed (the docs
documents the converts including their sources) + they have to be installed
in the $PATH so they can be started from with Zope.

> This is on a Linux box and I'm not sure if things like wvWare are 
> installed (eg. for converting and indexing msword files).

see above

> I can index a
> pdf file object no problem, but word docs are ignored - they 
> catalogged but their text/content doesn't get indexed.

because the pdftotext converter is installed and could be found by TXNG.


>
> It shows all of the microsoft converters. I don't have the 
> dependencies installed on this machine so  I know the actual index 
> won't work. I'm just curious as to why the two converter listings I've
provided are different.
>

Why should the installatation of your Windows box be the same as your Linux
box?

This question really makes no sense to me. The reasons are obvious (see
above) and the solution is straight forward (see above): installed the
required converters and make them available through $PATH as requested and
documented.

-aj

---
   -   Andreas JungZOPYX Ltd. & Co KG-
  -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
   ---
___
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] TextIndexNG question

2006-04-07 Thread Andreas Jung



--On 7. April 2006 13:18:52 -0400 "Palermo, Tom" 
<[EMAIL PROTECTED]> wrote:




Why do none of the typical Microsoft converters show up in the above
table?


Because you did not read the TXNG documentation? The documentation states
clearly that you must have the related converters installed (the docs
documents the converts including their sources) + they have to be installed 
in the $PATH so they can be started from with Zope.



This is on a Linux box and I'm not sure if things like wvWare are
installed (eg. for converting and indexing msword files).


see above


I can index a
pdf file object no problem, but word docs are ignored - they catalogged
but their text/content doesn't get indexed.


because the pdftotext converter is installed and could be found by TXNG.




It shows all of the microsoft converters. I don't have the dependencies
installed on this machine so  I know the actual index won't work. I'm just
curious as to why the two converter listings I've provided are different.



Why should the installatation of your Windows box be the same as your Linux 
box?


This question really makes no sense to me. The reasons are obvious (see 
above) and the solution is straight forward (see above): installed the 
required converters and make them available through $PATH as requested and 
documented.


-aj

   ---
  -   Andreas JungZOPYX Ltd. & Co KG-
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
  ---


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


[Zope] TextIndexNG question

2006-04-07 Thread Palermo, Tom



All,
 
I've just installed 
TextIndexNG2. I created a TextIndexNG2 index called PrincipiaSearchSource in 
my Catalog. In the converters tab for this index, I see 
this:
Mime-Types 
Description depends on 
application/pdf Adobe Acrobat PDF pdftotext   
application/vnd.sun.xml.writer OpenOffice   

text/html Converter HTML to ASCII   
text/plain Null converter   
text/sgml, text/xml Converter SGML to 
ASCII
 
Why do none of the typical 
Microsoft converters show up in the above table? This is on a Linux box and I'm 
not sure if things like wvWare are installed (eg. for converting and indexing 
msword files). I can index a pdf file object no problem, but word docs are 
ignored - they catalogged but their text/content doesn't get 
indexed.
 
The converters shows this on my 
Win2K machine for the same converters tab:
application/msexcel, 
application/ms-excel, application/vnd.ms-excel    Microsoft 
Excel    xls2csv  application/mspowerpoint, 
application/ms-powerpoint, application/vnd.ms-powerpoint  Microsoft 
PowerPoint  pptHtml  application/msword, application/ms-word, 
application/vnd.ms-word  Microsoft Word  wvWare  
application/pdf  Adobe Acrobat PDF  pdftotext  
application/postscript  Adobe Postscript Document  ps2ascii  
application/vnd.sun.xml.writer  OpenOffice   text/html 
 Converter HTML to ASCII   text/plain  Null converter   
text/sgml, text/xml  Converter SGML to ASCII   

 
It shows all of the microsoft 
converters. I don't have the dependencies installed on this machine so  I 
know the actual index won't work. I'm just curious as to why the two converter 
listings I've provided are different.
 
Thanks,
Tom Palermo
___
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 crashes on request of certain page

2006-04-07 Thread Floyd May

Sven Jacobs wrote:

Dear Zope list,

I have a serious problem with Zope. Every time a certain page is 
requested by a web browser for the second or third time (first time 
always works) the whole Zope server crashes :-(


The only thing special about this page are calls of external Python 
methods from a custom extension. These methods don't do any special 
magic. They just open a MySQL database (using the MySQLdb module version 
0.9.1) and return some HTML output.


I was able to catch a somewhat informative error message when Zope was 
running in debug mode:


2006-03-27T12:18:57 PANIC(300) z2 Startup exception
Traceback (innermost last):
  File /opt/zope/z2.py, line 495, in ?
(Object: ZLogger)
  File , line 1, in ?
  File /opt/zope/lib/python/Zope/__init__.py, line 37, in ?
  File /opt/zope/lib/python/ZODB/FileStorage.py, line 202, in __init__
  File /opt/zope/lib/python/ZODB/lock_file.py, line 29, in lock_file
StorageSystemError: Could not lock the database file.  There must be
another process that has opened the file.

Operating system is SuSE Linux 8.0, Zope version is 2.5.0, Python 2.2, 
MySQL 3.23.48. I know, pretty old but upgrading any of these software 
components should be avoided due to emerging costs unless absolutely 
necessary!


So if you have any idea how to fix this problem besides "upgrade to the 
newest versions" I would be glad to here from you!


Thank you very much!



Use a MySQL database adapter in Zope, and use ZSQL Methods to retrieve 
data from the database.

See here:
http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx

HTH!

--
Floyd May
Senior Systems Analyst
CTLN - CareerTech Learning Network
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] single sign-on

2006-04-07 Thread Luca Olivetti

En/na Luca Olivetti ha escrit:

At this point zope should see an additional header REMOTE_USER (with the 
consequent security risk: you should make sure that nobody can directly 
access zope otherwise they can fake this header and pose as any user) 
which is available in request.environ as HTTP_REMOTE_USER.


Then it's just a matter of using PAS with the SharkbyteSSOPlugin 
(http://dev.plone.org/collective/browser/SharkbyteSSOPlugin) configured 
to use HTTP_REMOTE_USER.


I'd suggest to change

   userid = request.get(self.uservar)

to

   userid = request.environ.get(self.uservar)

for a little more security - not that this setup seems really secure to 
me anyway, but I'm not a security expert ;-)


Ok, useless suggestion, since Zope request does "the right thing":
1)it will search in the environment before searching in the form and
2)it'll strip any form variable that starts with 'HTTP_'

Bye

--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
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 crashes on request of certain page

2006-04-07 Thread Jonathan


- Original Message - 
From: "Sven Jacobs" <[EMAIL PROTECTED]>
I have a serious problem with Zope. Every time a certain page is requested 
by a web browser for the second or third time (first time always works) 
the whole Zope server crashes :-(


The only thing special about this page are calls of external Python 
methods from a custom extension. These methods don't do any special magic. 
They just open a MySQL database (using the MySQLdb module version 0.9.1) 
and return some HTML output.


I was able to catch a somewhat informative error message when Zope was 
running in debug mode:


2006-03-27T12:18:57 PANIC(300) z2 Startup exception
Traceback (innermost last):
  File /opt/zope/z2.py, line 495, in ?
(Object: ZLogger)
  File , line 1, in ?
  File /opt/zope/lib/python/Zope/__init__.py, line 37, in ?
  File /opt/zope/lib/python/ZODB/FileStorage.py, line 202, in __init__
  File /opt/zope/lib/python/ZODB/lock_file.py, line 29, in lock_file
StorageSystemError: Could not lock the database file.  There must be
another process that has opened the file.


It sounds like your external method is causing the problem, and an easy way 
to test this is to remove all of the code from the external method (ie. just 
turn it into a test stub routine) and see if the error goes away.  If this 
works, then add code back into the external method, one logical 'chunk' at a 
time and test.  Continue this until you add in the chunk of code that causes 
the error.  It can often be useful to add debug info into a python list 
object, as your external method progresses, and then return this list to the 
calling routine (which then displays the contents of the list within your 
normal html page).


HTH

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 )


Re: [Zope] single sign-on

2006-04-07 Thread Luca Olivetti

En/na Fernando Martins ha escrit:

David H wrote:

Robert,

You can python + COM your way to a browser startup zope/plone login
screen.  I cannot see how you automate the authentication of a given
browser instance that is then handed to your users.



Hmm, that's not automation in this sense. The user logins into the
workstation (Windows, don't know about unix), the user opens the browser and
accesses an INTRANET page. The browser (IE or Firefox with NTLM setup) will
then send authentication information to the Intranet server using the NTLM
protocol. The web server (Apache with NTLM module) checks with some internal
Domain server and sets the environmental variable REMOTE_USER. This is then
sent to a CGI or FastCGI app (zope with FastCGI).


Maybe someone will correct this.  If so everyone's happy.


Yes, local Intranet users love this, one less login, automatic recognition,
personalisation, instant gratification,... ;-)


It seems it is possible but a little convoluted.
WARNING this has only had very limited testing and it's *not* in 
production (and I'm not sure it will ever be).


The first hurdle is that with the proxying configuration (RewriteRule 
with the P flag) ntlm_mod sends "Proxy-Authenticate" instead of 
"WWW-Authenticate" and it didn't work, so the first thing I needed to do 
was to modify ntlm_mod.c to always request "WWW-Authenticate" (easy to 
do, just find any instance of "r->proxyreq" and change it to 
"r->proxyreq && 0". I didn't see this reported anywhere, so it could 
just be my local setup with apache 2.


Then in Apache I used the RequestHeader directive to add the remote user 
to the request *and* the E option in the RewriteRule to put the remote 
user in the environment (so that RequestHeader works),

i.e. (zope is served here under the test directory "t"):



AuthName "A Protected Place"
AuthType NTLM
NTLMAuth On
NTLMAuthoritative on
NTLMDomain YOURDOMAIN
NTLMServer yourhost
NTLMBasicAuth on
NTLMBasicRealm YOURREALM
require valid-user

RequestHeader set REMOTE_USER %{REMOTE_USER}e


RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} !443$
RewriteRule ^/t/(.*) 
http://localhost:10080/VirtualHostBase/https/%{HTTP_HOST}:443/VirtualHostRoot/_vh_t/$1 
[L,P,E=REMOTE_USER:%{LA-U:REMOTE_USER}]

RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} 443$
RewriteRule ^/t/(.*) 
http://localhost:10080/VirtualHostBase/https/%{HTTP_HOST}/VirtualHostRoot/_vh_t/$1 
[L,P,E=REMOTE_USER:%{LA-U:REMOTE_USER}]

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/t/(.*) 
http://localhost:10080/VirtualHostBase/http/%{HTTP_HOST}:80/VirtualHostRoot/_vh_t/$1 
[L,P,E=REMOTE_USER:%{LA-U:REMOTE_USER}]



(note that this contortion with ssl may be due, again, to my setup. Note 
also that I didn't manage to make ntlm+ssl work with internet explorer, 
it works fine with firefox).


At this point zope should see an additional header REMOTE_USER (with the 
consequent security risk: you should make sure that nobody can directly 
access zope otherwise they can fake this header and pose as any user) 
which is available in request.environ as HTTP_REMOTE_USER.


Then it's just a matter of using PAS with the SharkbyteSSOPlugin 
(http://dev.plone.org/collective/browser/SharkbyteSSOPlugin) configured 
to use HTTP_REMOTE_USER.


I'd suggest to change

   userid = request.get(self.uservar)

to

   userid = request.environ.get(self.uservar)

for a little more security - not that this setup seems really secure to 
me anyway, but I'm not a security expert ;-)


Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
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 crashes on request of certain page

2006-04-07 Thread Andreas Jung



--On 7. April 2006 10:34:08 +0200 Sven Jacobs <[EMAIL PROTECTED]> wrote:



The only thing special about this page are calls of external Python
methods from a custom extension. These methods don't do any special
magic. They just open a MySQL database (using the MySQLdb module version
0.9.1) and return some HTML output.


A buggy extension can crash Zope..but this is not a Zope problem but a 
problem of the extension. Check for core dumps, enable core dumps using 
(ulimit from the shell), use gdb to debug core dumps if you can find some.

...that's the way to hunt down the problem.




I was able to catch a somewhat informative error message when Zope was
running in debug mode:

2006-03-27T12:18:57 PANIC(300) z2 Startup exception
Traceback (innermost last):
   File /opt/zope/z2.py, line 495, in ?
 (Object: ZLogger)
   File , line 1, in ?
   File /opt/zope/lib/python/Zope/__init__.py, line 37, in ?
   File /opt/zope/lib/python/ZODB/FileStorage.py, line 202, in __init__
   File /opt/zope/lib/python/ZODB/lock_file.py, line 29, in lock_file
StorageSystemError: Could not lock the database file.  There must be
another process that has opened the file.


Possibly a followup error. Check if there is some other process locking the 
file (using lsof). If not, remove the Data.fs.lock file.





Operating system is SuSE Linux 8.0, Zope version is 2.5.0,


2.5.0? To be honest: upgrade _at_least_ to the latest 2.5.X version.
Don't expect that anyone seriously cares about a) very old releases
and b) .0 releases.

-aj

   ---
  -   Andreas JungZOPYX Ltd. & Co KG-
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
  ---


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


[Zope] Zope crashes on request of certain page

2006-04-07 Thread Sven Jacobs

Dear Zope list,

I have a serious problem with Zope. Every time a certain page is 
requested by a web browser for the second or third time (first time 
always works) the whole Zope server crashes :-(


The only thing special about this page are calls of external Python 
methods from a custom extension. These methods don't do any special 
magic. They just open a MySQL database (using the MySQLdb module version 
0.9.1) and return some HTML output.


I was able to catch a somewhat informative error message when Zope was 
running in debug mode:


2006-03-27T12:18:57 PANIC(300) z2 Startup exception
Traceback (innermost last):
  File /opt/zope/z2.py, line 495, in ?
(Object: ZLogger)
  File , line 1, in ?
  File /opt/zope/lib/python/Zope/__init__.py, line 37, in ?
  File /opt/zope/lib/python/ZODB/FileStorage.py, line 202, in __init__
  File /opt/zope/lib/python/ZODB/lock_file.py, line 29, in lock_file
StorageSystemError: Could not lock the database file.  There must be
another process that has opened the file.

Operating system is SuSE Linux 8.0, Zope version is 2.5.0, Python 2.2, 
MySQL 3.23.48. I know, pretty old but upgrading any of these software 
components should be avoided due to emerging costs unless absolutely 
necessary!


So if you have any idea how to fix this problem besides "upgrade to the 
newest versions" I would be glad to here from you!


Thank you very much!

--
Sincerely yours
Sven Jacobs
___
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 )