[Zope] ZServer or Zope.cgi
Hello, I have a newbie question I'm using Zope on Linux and I have a file Zope.cgi (in my installation zope directory with this contents: #!/home/Zope-2.2.1-linux2-x86/pcgi/pcgi-wrapper PCGI_NAME=Zope PCGI_MODULE_PATH=/home/Zope-2.2.1-linux2-x86/lib/python/Zope PCGI_PUBLISHER=/home/Zope-2.2.1-linux2-x86/pcgi/pcgi_publisher.py PCGI_EXE=/home/Zope-2.2.1-linux2-x86/bin/python PCGI_SOCKET_FILE=/home/Zope-2.2.1-linux2-x86/var/pcgi.soc PCGI_PID_FILE=/home/Zope-2.2.1-linux2-x86/var/pcgi.pid PCGI_ERROR_LOG=/home/Zope-2.2.1-linux2-x86/var/pcgi.log PCGI_DISPLAY_ERRORS=1 BOBO_REALM=/home/Zope-2.2.1-linux2-x86/Zope.cgi BOBO_DEBUG_MODE=1 INSTANCE_HOME=/home/Zope-2.2.1-linux2-x86 I don't kown if I'm using Zope.cgi or ZSever. How can I know it? Thanks in advance Marcus Mendes ___ 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] REMOTE_ADDR
I don't understand very much about Apache; but i've this lines in my httpd.conf. See: VirtualHost xxx.xxx.xxx.xxx ServerAdmin XXX DocumentRoot XXX ServerName myserver.xxx.xxx ServerAlias myserver ErrorLog /usr/local/apache/logs/error_log CustomLog /usr/local/apache/logs/access_log common ScriptAlias /script/ /usr/local/apache/script/ RewriteEngine On RewriteLog "/usr/local/apache/logs/rewrite_log" RewriteLogLevel 0 RewriteRule ^/local/ - [L] RewriteRule ^/(.*) http://myserver:8080/marcus/$1 [P] /VirtualHost I'm using Zope.cgi with SiteAccess In the SiteAcess, I have - base: http://myserver:8080 and URL : /marcus How can I pass to my ZServer the REMOTE_ADDR's content? Thanks a lot! Marcus Mendes. -- Oleg Wrote: Which way do you connect Apache to Zope? Mod_pcgi? mod_fastcgi? mod_proxy? I am afraid if you use mod_proxy - you cannot obtain remote address. Or may be there is a way to pass it explicitly to Zope. Other modules (FCGI/PCGI) should pass all neccessary information (actually, the entire request environment) by default. Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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] REMOTE_ADDR
Hello, Where can I find (and use) the variable REMOTE_ADDR? I've a python function that deal with REMOTE_ADDR, but I've got the IP address's Zope Server Machine. I looked at Z2.log and find the same IP, ie. the address's Zope Server Machine. I need the remote address. I'm using SiteAccess and Zope 2.2.4 on Linux. I don't understand ... Thanks in advance. Marcus Mendes ___ 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] REMOTE_ADDR
Oleg Broytmann wrote: On Mon, 22 Jan 2001, Marcus Mendes wrote: Where can I find (and use) the variable REMOTE_ADDR? I've a python function that deal with REMOTE_ADDR, but I've got the IP address's Zope Server Machine. I looked at Z2.log and find the same IP, ie. the address's Zope Server Machine. I need the remote address. I'm using SiteAccess and Zope 2.2.4 on Linux. I don't understand ... Do you use Apache? Which way do you connect Zope and Apache? Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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 ) Yes, I'm using apache before the Zope, ie, Apache redirects all the request to the 8080 to Zope. How can Id obtain REMOTE_ADDR ? Thanks in advance. Marcus Mendes. ___ 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] data return with def function im my Zclass
Hello, I need in my Submit form, call the function "def XXX" of my Zclass (lib/python/Product/class). How can I do it? And how can I get and test the return data of my def XXX of my class? Thanks. Marcus Mendes ___ 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] External Methods
Phil Harris wrote: Wouldn't it be better to pass in self? As in: def my_method(self,REQUEST=None): '''my_method interpreting *REQUEST*.form.''' if REQUEST is None: REQUEST=self.REQUEST # safety_valve in case you forget to pass in REQUEST form= REQUEST.form # this is a dictionary containing form # variables and associated values Hello, Ok Sirs, I'm very late in my checking my mailbox ;-) I've a question in this code above : How can I get the values of a dictionary form? In my Method, I used form.values(), form.Name_Of_Variable_OF_my_form, but it is not working. Thanks Marcus Mendes ___ 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] External Methods
"Ryan M. Dolensek" wrote: Try... for k,v in form.items(): k should contain the key name v should contain the value Otherwise... value = form['Name_Of_Variable_OF_my_form'] Hope that helps. Ryan Hello, Ok Sirs, I'm very late in my checking my mailbox ;-) I've a question in this code above : How can I get the values of a dictionary form? In my Method, I used form.values(), form.Name_Of_Variable_OF_my_form, but it is not working. Thanks Marcus Mendes Hello again, I've got the follow content : Key Error SERVER_NAME, that is, Look at my code, please: def log_info(REQUEST): if REQUEST is None: REQUEST=self.REQUEST form= REQUEST.form try: log=open('/home/mvmendes/testes_zope/log.txt', 'a') except IOError: log=open('/home/mvmendes/testes_zope/log.txt', 'w') server = form['SERVER_NAME'] connection = form['CONNECTION_TYPE'] line='Server: %s, Connection type : %s\n' % ( server, connection ) log.write(line) log.close() return I calling my external method using : dtml-call "grava_arq(REQUEST)" I also tried with "for" command but isn't working. Can you help me? Thanks in advance. Marcus Mendes ___ 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] Sendmail examples
steve smith wrote: Anyone have any good, real-world examples using DTML-Sendmail tags? Would especially appreciate examples integrating SQL queries. Ta! Steve ___ 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 ) Hello, I've an example here. I'm using sql to find and check passwd/user. If this sql_check_passwd is true, i'll find in another table, the user's e_mail. Then i'll send an e-mail for him. Here is: dtml-in sql_check_passwd dtml-in sql_find_e_mail dtml-if "code == _['sequence-item'].code_table" dtml-sendmail mailhost=MailHost to: dtml-var e_mail from: [EMAIL PROTECTED] subject: dtml-var subject - here, you put the message /dtml-sendmail scriptalert("Your message was send successfully")/script br /dtml-if cod_pesq /dtml-in sql_find_e_email dtml-else scriptalert("User/Passwd incorrect.")/script /dtml-in sql_check_passwd []'s Marcus Mendes ___ 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] ZopeTime Questions
Hello, - I'm using the following code. dtml-with ZopeTime dtml-var " '%s' % strftime('%A')" capitalize dtml-var "'This is %s, %s/%s/%i , %s' % (Day(), dd(), mm(), year(), TimeMinutes())" capitalize /dtml-with - I've this problem: At 22:00 hs, this code give me the following results: Quinta This is Wednesday, 19/10/2000 , 22:13 - The first dtml-var ... give me the next Day always - I'm starting my Zope with option -L pt_BR. Any comments or help? Thanks in advance. Marcus Mendes ___ 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] HELP! Permissions problem, ZClass
Take a look at Security View of its ZClass. Give permissions to anonymous users. Marcus Mendes Eric Walstad wrote: Help, pls! I have a ZClass that is functioning beautifully if I am logged in, but the anonymous user keeps getting prompted for a password. The problem occurs when my DTML method trys to create a new instance of the ZClass. I tried giving that DTML method a Proxy of "Manager" but that isn't helping. Any pointers? Thanks, Eric. Here's the traceback: Zope Error Zope has encountered an error while publishing this resource. Unauthorized You are not authorized to access CNewsItem. Traceback (innermost last): File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: buildNews) File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: buildNews) File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: buildNews) File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: buildNews) File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: manage_addProduct['NewsItem']) File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: CNewsItem_add(_.None, _, NoRedir=1)) (Info: _) File string, line 0, in ? File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: CNewsItem_add) File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: CNewsItem_add) File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: CNewsItem.createInObjectManager(REQUEST['id'], REQUEST)) File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 331, in eval (Object: CNewsItem.createInObjectManager(REQUEST['id'], REQUEST)) (Info: CNewsItem) File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 194, in validate (Object: buildNews) File /usr/local/Zope/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /usr/local/Zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in validate Unauthorized: (see above) ___ 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] Database Pack
"Júlio Dinis Silva" wrote: Hi all, is there a way to do a pack to zodb without using the managment screens pack button? Maybe a python script we could execute from the file system. Regards, Júlio Dinis Silva _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. ___ 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 ) Hello, I'm using OracleStorage and I'd like know if can I pack my Database as I do with data.fs. Are there any differences? Thanks. Marcus Mendes ___ 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] rotate Z2.log
Hello, How can I rotate my Z2.log?? It's very large ! Thanks. Marcus Mendes ___ 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] Split Data.fs
Hello, Is a good idea split Data.fs? (comments) Is there any way to divide or split the Data.fs into some parts? Thanks. Marcus Mendes ___ 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] ZScheduler and Pack
Hi, Is it a security risk to leave the Zscheduler pack my Data.fs? Thanks. Marcus Mendes ___ 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] a corrupted ZODB?
Hello Dieter, I can´t find the Tranalyze Product at Zope.org. Where is? Thanks. Marcus Mendes Dieter Maurer wrote: tav writes: was working happily on the server, when all of a sudden it keeled over and didnt restart automatically. so, i went to restart it manually, and got the following error message: ZODB.FileStorage.FileStorageFormatError: /usr/local/zope/z1/var/Data.fs maybe the "fsrecover" in "ZODB" of Zope 2.2 or the "tranalyse" product may help you. Dieter ___ 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-dev] namespace problem??
Hello, How can I get the contents of variable out of my dtml-in /dtml-in code? For example: dtml-in "_['sequence-item'].objectValues(['TSubRegiao'])" dtml-call "REQUEST.set('HORA', horacondicaoatual)" /dtml-in I need get the variable HORA and I couldn't. Thanks Marcus Mendes ___ 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] namespace problem??
Hello, How can I get the contents of variable out of my dtml-in /dtml-in code? For example: dtml-in "_['sequence-item'].objectValues(['TSubRegiao'])" dtml-call "REQUEST.set('HORA', horacondicaoatual)" /dtml-in I need get the variable HORA and I couldn't. Thanks Marcus Mendes ___ 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] namespace ??
Hello, How can I get the contents of variable out of my dtml-in /dtml-in code? For example: dtml-in "_['sequence-item'].objectValues(['TSubRegiao'])" dtml-call "REQUEST.set('HORA', horacondicaoatual)" /dtml-in I need get the variable HORA and I couldn't. Thanks Marcus Mendes ___ 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] namespace??
How can I get the content of TITULO_CIDADE out of my tags dtml-in> /dtml-in> ?? My code is : dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title> dtml-if "_['sequence-item'].id == CIDADE"> dtml-call "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)"> /dtml-if> /dtml-in> Thanks. Marcus Mendes
[Zope] namespace problem?
How can I get the content of TITULO_CIDADE out of my tags dtml-in /dtml-in ?? My code is : dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title dtml-if "_['sequence-item'].id == CIDADE" dtml-call "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)" /dtml-if /dtml-in Thanks. Marcus Mendes ___ 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] namespace??
How can I get the content of TITULO_CIDADE out of my tags dtml-in /dtml-in ?? My code is : dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title dtml-if "_['sequence-item'].id == CIDADE" dtml-call "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)" /dtml-if /dtml-in Thanks. Marcus Mendes ___ 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] get 2 properties at the same time
Hello, I need get 2 properties of Zclass at the same time. I´m using in my form : tdselect name="region" dtml-in "Locality.objectValues(['Locality']) " option value="dtml-var REGION"dtml-var title /dtml-in option selected /select/td I need get another property, for example MASTER_REGION, in this moment. How can I to do it? (is urgent!) Thanks in advance, Marcus Mendes ___ 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 )