How to get the variable in an URL ?
Hello, I have a link as : <a href="http://website/folder/document?variable=try-it">Try</a> I want to get the variable in my document. I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form. What i the syntax t oget this variable??? Sincerily PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
On Wednesday 24 April 2002 11:58 am, Pascal Samuzeau wrote:
Hello,
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable???
Sincerily PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Just use REQUEST['variable']. The request object will find it and hand it back.
Hey, did you see the word "varibale" are you shure you use the correct word? I think it should call "variable" ---- REQUEST.form['varibale'] ---- Mit freundlichen Grüssen Roger Ineichen ___________________________ Projekt01 GmbH www.projekt01.ch Langackerstrasse 8 6330 Cham phone +41 (0)41 781 01 78 mobile +41 (0)79 340 52 32 fax +41 (0)41 781 00 78 email r.ineichen@projekt01.ch ___________________________ END OF MESSAGE -----Ursprüngliche Nachricht----- Von: zope-admin@zope.org [mailto:zope-admin@zope.org] Im Auftrag von Harry Wilkinson Gesendet: Mittwoch, 24. April 2002 12:00 An: Pascal Samuzeau; zope@zope.org Betreff: Re: [Zope] How to get the variable in an URL ? On Wednesday 24 April 2002 11:58 am, Pascal Samuzeau wrote:
Hello,
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable???
Sincerily PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Just use REQUEST['variable']. The request object will find it and hand it back. _______________________________________________ Zope maillist - Zope@zope.org 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 )
Pascal Samuzeau wrote:
Hello,
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable???
maybe REQUEST['variable']? whats in your REQUEST (is "variable" present?)? ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
Hello When I try <dtml-var "REQUEST.form['try-it']> I have the following error : Type de l'erreur : KeyError Valeur de l'erreur : keyword Traceback (innermost last): File zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File zope/lib/python/ZPublisher/Publish.py, line 187, in publish File zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: cerf) File zope/lib/python/ZPublisher/Publish.py, line 171, in publish File zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: CasCatalog) File zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: CasCatalog) File zope/lib/python/OFS/DTMLMethod.py, line 199, in __call__ (Object: CasCatalog) File zope/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: CasCatalog) File zope/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: REQUEST['keyword']) (Info: REQUEST) File <string>, line 2, in f (Object: guarded_getitem) File zope/lib/python/AccessControl/DTML.py, line 104, in guarded_getitem (Object: CasCatalog) File zope/lib/python/AccessControl/ZopeGuards.py, line 151, in guarded_getitem File zope/lib/python/ZPublisher/HTTPRequest.py, line 897, in __getitem__ KeyError: (see above) When I try <dtml-var "REQUEST"> I have the URL , URL0, BASE3 as: http://website/folder/document, but never I see my parameter "variable" Sincerily PS -------------------
Pascal Samuzeau wrote:
Hello,
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable???
maybe REQUEST['variable']? whats in your REQUEST (is "variable" present?)? ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
-------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
On Wednesday 24 April 2002 1:03 pm, Pascal Samuzeau wrote:
Hello
When I try <dtml-var "REQUEST.form['try-it']> I have the following error :
<snip>
When I try <dtml-var "REQUEST"> I have the URL , URL0, BASE3 as:
http://website/folder/document,
but never I see my parameter "variable"
Sincerily PS
You're still using REQUEST.form, not REQUEST. Just use REQUEST['try-it'].
Pascal Samuzeau wrote:
When I try <dtml-var "REQUEST.form['try-it']> I have the following error :
Type de l'erreur : KeyError Valeur de l'erreur : keyword
Traceback (innermost last):
of course. try-it was the value, not the key
When I try <dtml-var "REQUEST"> I have the URL , URL0, BASE3 as:
http://website/folder/document,
but never I see my parameter "variable"
can't believe this
Pascal Samuzeau wrote:
Hello, I have a link as : <a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource,
maybe variable?
I
haven't a form.
What i the syntax to get this variable???
maybe REQUEST['variable']? whats in your REQUEST (is "variable" present?)?
i wrote this just to assert whats in the request. i still dont believe. whats in the request? -- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
After moving our site to an external server we cannot connect to Zope through FTP anymore I searched the mail archive and found several similar problems but no answers Has this issue been resolved? FTP report WINSOCK.DLL: WinSock 2.0 WS_FTP LE 5.08 2000.01.13, Copyright C 1992-2000 Ipswitch, Inc. - - connecting to 194.78.49.253:8021 Connected to 194.78.49.253 port 8021 220 piwebserver FTP server (Medusa Async V1.18 [experimental]) ready. USER RoelV 331 Password required. PASS (hidden) 230 Login successful. PWD ! Receive error: Blocking call cancelled SYST ! Receive error: connection reset Host type (I): Automatic detect ! Send error: connection reset ! Receive error: connection reset Host type (3): UNIX (standard) PASV ! Send error: connection reset ! Receive error: connection reset PORT 0,0,0,0,10,15 ! Send error: connection reset ! Receive error: connection reset ! Failed "port": ! Retrieve of folder listing failed (0) The z2.log shows this 194.78.205.11057389 ==> 220 piwebserver FTP server (Medusa Async V1.18 [experimental]) ready. 194.78.205.11057389 <== USER anonymous 194.78.205.11057389 ==> 331 Password required. 194.78.205.11057389 <== PASS <password> 194.78.205.11057389 ==> 230 Login successful. 194.78.205.11057389 <== PWD 194.78.205.11057389 ==> 257 "/" is the current directory. 194.78.205.11057389 <== SYST 194.78.205.11057389 ==> 215 UNIX Type: L8 194.78.205.11057389 <== HELP 194.78.205.11057389 <== PASV 194.78.205.11057389 ==> 227 Entering Passive Mode (194,78,49,253,16,21) 194.78.205.11057389 <== PORT 192,168,200,22,14,18 194.78.205.11057389 ==> 200 PORT command successful. 194.78.205.11057389 <== LIST 194.78.205.11057389 ==> 530 Unauthorized. 194.78.205.11057389 <== QUIT 194.78.205.11057389 ==> 221 Goodbye. 194.78.205.11057474 ==> 220 piwebserver FTP server (Medusa Async V1.18 [experimental]) ready. 194.78.205.11057474 <== USER RoelV 194.78.205.11057474 ==> 331 Password required. 194.78.205.11057474 <== PASS <password> 194.78.205.11057474 ==> 230 Login successful.
Roel Van den Bergh wrote:
After moving our site to an external server we cannot connect to Zope through FTP anymore I searched the mail archive and found several similar problems but no answers Has this issue been resolved?
The 2.5.1 changelog indicates some FTP fixes. You might try 2.5.1 and see if the problem goes away. -- Jim Washington
Upgraded to 2.5.1 and still we have the same problem :-( I tried several different FTP clients but no succes After several attempt to login (succesfully, but fails to list the directories) we get a message "user limit reached" and we have to restart the zope server ... Does anybody know of a FTP client that works from Win to Linux? This is an extract of the Medusa readme page at http://www.nightmare.com/medusa/README.html FTP On Unix, the ftp server includes support for 'real' users, so that it may be used as a drop-in replacement for the normal ftp server. Since most ftp servers on Unix use the 'forking' model, each child process changes its user/group persona after a successful login. This is a relatively secure design. Medusa takes a different approach - whenever Medusa performs an operation for a particular user [listing a directory, opening a file], it temporarily switches to that user's persona _only_ for the duration of the operation. [and each such operation is protected by a try/finally exception handler]. To do this Medusa MUST run with super-user privileges. This is a HIGHLY experimental approach, and although it has been thoroughly tested on Linux, security problems may still exist. If you are concerned about the security of your server machine, AND YOU SHOULD BE, I suggest running Medusa's ftp server in anonymous-only mode, under an account with limited privileges ('nobody' is usually used for this purpose). I am very interested in any feedback on this feature, most especially information on how the server behaves on different implementations of Unix, and of course any security problems that are found. ... end of extract
-----Oorspronkelijk bericht----- Van: Jim Washington [mailto:jwashin@vt.edu] Verzonden: woensdag 24 april 2002 14:51 Aan: roel@planetinterior.com CC: zope@zope.org Onderwerp: Re: [Zope] FTP Problem
Roel Van den Bergh wrote:
After moving our site to an external server we cannot connect to Zope through FTP anymore I searched the mail archive and found several similar problems but no answers Has this issue been resolved?
The 2.5.1 changelog indicates some FTP fixes. You might try 2.5.1 and see if the problem goes away.
-- Jim Washington
"Roel Van den Bergh" <roel@planetinterior.com> writes:
Does anybody know of a FTP client that works from Win to Linux?
I am currently using the cygwin ftp client (through emacs) to access a 2.5.0 server on my local network and a range of other version Zopes outside. All the servers are running Linux. From my W2K machine I need to set passive transfers on - I don't with any of my linux clients. No idea why, but it works. Ian PS I also had the same error once regarding the user limit being reached. Only had it once on 2.5.0 and after a restart the problem went away.
----- Original Message ----- From: "Ian J Cottee" <icottee@bluefountain.com> To: <roel@planetinterior.com> Cc: <zope@zope.org> Sent: Friday, April 26, 2002 12:54 Subject: Re: [Zope] FTP Problem
PS I also had the same error once regarding the user limit being reached. Only had it once on 2.5.0 and after a restart the problem went away.
I assume this is a problem with the FTPLimiter class inside Zope and maybe some hanging clients. It looks like some FTP connections remain open. Maybe take a look at FTPServer.py and raise some of the limites passed as argument to the constructor of the FTPLimiter class. -aj
Searching for alternative solutions on our FTP problems we discovered that WEBDAV by default is allowed as "anonymous" I know the webdav port isn't open by default, but still I think webdav shouldn't be allowed "anonymous" login by default
-----Oorspronkelijk bericht----- Van: zope-admin@zope.org [mailto:zope-admin@zope.org]Namens Roel Van den Bergh Verzonden: woensdag 24 april 2002 14:33 Aan: zope@zope.org Onderwerp: [Zope] FTP Problem
After moving our site to an external server we cannot connect to Zope through FTP anymore I searched the mail archive and found several similar problems but no answers Has this issue been resolved?
Roel Van den Bergh writes:
After moving our site to an external server we cannot connect to Zope through FTP anymore I searched the mail archive and found several similar problems but no answers Has this issue been resolved? Is there a firewall between you and the server?
If so, the problem is almost surely caused by the firewall not letting pass the data connection. Please search the mailing list archives for more information. Dieter
Hi, Because you don't believe me here is : 1 - When I have <dtml-var "REQUEST['variable']">, I get : Type de l'erreur : KeyError Valeur de l'erreur : variable Traceback (innermost last): File zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File zope/lib/python/ZPublisher/Publish.py, line 187, in publish File zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: cerf) File zope/lib/python/ZPublisher/Publish.py, line 171, in publish File zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: CasCatalog) File zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: CasCatalog) File zope/lib/python/OFS/DTMLMethod.py, line 199, in __call__ (Object: CasCatalog) File zope/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: CasCatalog) File zope/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: REQUEST['variable']) (Info: REQUEST) File <string>, line 2, in f (Object: guarded_getitem) File zope/lib/python/AccessControl/DTML.py, line 104, in guarded_getitem (Object: CasCatalog) File zope/lib/python/AccessControl/ZopeGuards.py, line 151, in guarded_getitem File zope/lib/python/ZPublisher/HTTPRequest.py, line 897, in __getitem__ KeyError: (see above) 2 - When I have <dtml-var "REQUEST">, I get : form cookies __ac_name 'Samuzeau' tree-s 'wYAACp-A7U' other AUTHENTICATION_PATH 'xxxxx' __ac_name 'Samuzeau' SERVER_URL 'http://www.xxxxx:8080' tree-s 'p-A7U' URL 'http://www.xxxxx:8080/cerf/CasCatalog' AUTHENTICATED_USER Samuzeau PUBLISHED <DTMLMethod instance at 00000> TraversalRequestNameStack [] URL0 http://www.xxxxx:8080/cerf/CasCatalog URL1 http://www.xxxxx:8080/cerf URL2 http://www.xxxxx.fr:8080 BASE0 http://www.xxxxx.fr:8080 BASE1 http://www.xxxxx.fr:8080 BASE2 http://www.xxxxx:8080/cerf BASE3 http://www.xxxxx:8080/cerf/CasCatalog environ GATEWAY_INTERFACE 'CGI/1.1' SERVER_PORT '8080' PATH_TRANSLATED '/cerf/CasCatalog' HTTP_VIA '1.0 xxxx' HTTP_ACCEPT_LANGUAGE 'fr' REMOTE_ADDR 'xxxxx' SERVER_NAME 'xxxxx' HTTP_USER_AGENT 'xxx(xxx;xxx; xxx)' HTTP_ACCEPT '*/*' channel.creation_time 1019651567 HTTP_UA_CPU 'PPC' HTTP_EXTENSION 'Security/Remote-Passphrase' SERVER_PROTOCOL 'HTTP/1.0' PATH_INFO '/cerf/CasCatalog' HTTP_HOST 'www.....' REQUEST_METHOD 'GET' HTTP_IF_MODIFIED_SINCE 'Wed, 24 Apr 2002 12:00:48 GMT' SCRIPT_NAME '' SERVER_SOFTWARE 'Zope/(Zope 2.4.3 (binary release, python 2.1, x), python 2.1.0, os) ZServer/1.1b1' HTTP_COOKIE '__ac_name=Samuzeau; count.999552017.318.counter=1; tree-s=-A7U' HTTP_UA_OS 'MacOS' As you can see, there is nothing in the form paragraph. So nothing I am able to catch... Have you any idea ? Sincerily PS -------------------
Pascal Samuzeau wrote:
When I try <dtml-var "REQUEST.form['try-it']> I have the following error :
Type de l'erreur : KeyError Valeur de l'erreur : keyword
Traceback (innermost last):
of course. try-it was the value, not the key
When I try <dtml-var "REQUEST"> I have the URL , URL0, BASE3 as:
http://website/folder/document,
but never I see my parameter "variable"
can't believe this
Pascal Samuzeau wrote:
Hello, I have a link as : <a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource,
maybe variable?
I
haven't a form.
What i the syntax to get this variable???
maybe REQUEST['variable']? whats in your REQUEST (is "variable" present?)?
i wrote this just to assert whats in the request. i still dont believe. whats in the request? -- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
-------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Pascal Samuzeau wrote: <snip/>
As you can see, there is nothing in the form paragraph. So nothing I am able to catch...
Have you any idea ?
it should be in REQUEST, but not in REQUEST.form if it isnt, and you have NO spelling errors/typos then i have no idea, sorry -- ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
Hi, It's a lot I haven't answer you. I've found my problem. in fact my factory has got a new firewall, and insert it in the network. But for some reasons, it didn't transmit any parameters to my site. But you show me the way, so I have found the solution Sincerily PS -------------------
Pascal Samuzeau wrote:
<snip/>
As you can see, there is nothing in the form paragraph. So nothing I am able to catch...
Have you any idea ?
it should be in REQUEST, but not in REQUEST.form if it isnt, and you have NO spelling errors/typos then i have no idea, sorry -- ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
-------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
[Pascal Samuzeau] I have a link as : <a href="http://website/folder/document?variable=try-it">Try</a> I want to get the variable in my document. I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form. What i the syntax t oget this variable??? [Tom P] If that url is used to request a page from you called "document", then you will have a REQUEST object available to the page. It will contain a property called "variable", just as if a form had been submitted. You can see the entire REQUEST by writing <dtml-var REQUEST> You can display the property like this: <dtml-var "REQUEST['variable']"> Of course, your spelling has to be correct. Cheers, Tom P
Pascal Samuzeau writes:
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable??? The syntax is correct:
<dtml-var "REQUEST.form['variable']"> should give you "try-it". If it does not, maybe your browser does something strange. Use "tcpWatch" or another TCP logger to check whath the browser precisely sends to Zope (or look into "var/Z2.log"). Dieter
I'm sure I'm missing something obvious in all these replies but why doesn't he just do <dtml-var variable> ?? Ian Dieter Maurer <dieter@handshake.de> writes:
Pascal Samuzeau writes:
I have a link as :
<a href="http://website/folder/document?variable=try-it">Try</a>
I want to get the variable in my document.
I did REQUEST.form['varibale']. But it doesn't work, of cource, I haven't a form.
What i the syntax t oget this variable??? The syntax is correct:
<dtml-var "REQUEST.form['variable']">
should give you "try-it".
If it does not, maybe your browser does something strange. Use "tcpWatch" or another TCP logger to check whath the browser precisely sends to Zope (or look into "var/Z2.log").
Dieter
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (10)
-
Andreas Jung -
Dieter Maurer -
hans -
Harry Wilkinson -
Ian J Cottee -
Jim Washington -
Pascal Samuzeau -
Roel Van den Bergh -
Thomas B. Passin -
trash.mail@gmx.ch