Re: [Zope] [newbie] cgi-tasks howto? stupid question

2000-07-05 Thread Rajil Saraswat

On Tue, 4 Jul 2000, Rik Hoekstra wrote:

 
 
 
 i tried out this but this isnt working  out for me. can you point out the
 error.
 
 my index_html file is
 dtml-var standard_html_header
 FORM method=post action=http://localhost:8080/3inet/print
 Enter name: INPUT type=text name=valnameBR
 
 INPUT type=submit
 /FORM
 dtml-var standard_html_footer
 
 
 the print file is
 dtml-var standard_html_header
 h2
 dtml-var valname
 /h2
 dtml-var standard_html_footer
 
 
 when i submit the form the print page is outputted but the value of the
 textbox(valname) is not outputted. whats wrong?
 
 Um, perhaps a stupid question, but since you are talking about files - is
 this a Zope object that is in the Zope object database or is it a file that
 is on your file system? If the last, it will not work. Zope keeps it's
 objects (files) in it's own database, the ZODB. It is
 zopehome/var/data.fs. You can't read it directly, it is an object database

No these are not files but objects in the database.

 
 
 
 another thing i havent understood is that zope.org is running on zope,
 then why they donot have url based on 8080. if they are using pcgi then
 the url must have been http://zope.org/zope.cgi/index_html   isnt this so?
 
 No, apache let's you circumvent this.
 
 
 i also want my url to be simply on http://localhost, what do i need to do
 for this.
 
  Zope has it's built in webserver, called ZServer. It will run on any port,
 as long as you have the right privileges. If you want to change the port,
 change zopehome/z2.py It is heavily commented. Look for the http port
 section, it shouldn't be a problem.
 
 Rik
 
 
if i donot run the httpd but run only the Zserver then http://localhost
will work?



___
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] [newbie] cgi-tasks howto? stupid question

2000-07-05 Thread Nils Kassube

[EMAIL PROTECTED] (Rajil Saraswat) wrote:
 
 No isee the rendered page in the browser but i donot see the dtml-var
 valname value. it just gives a blank.
 is something wrong here.

Weird. Are you absolutely, positively sure that you use the DTML
source you published here? I mean are you sure that the action
attribute of the form tag is pointing to the right method? Or
is it perhaps possible that the source in the print method somehow
was changed? 

Please check twice, I made similiar mistakes in the past. Like
everyone else doing software development... :-)

Cheers,
Nils
--
[EMAIL PROTECTED]   | [EMAIL PROTECTED] (preferred)
[EMAIL PROTECTED] | [EMAIL PROTECTED]



___
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] [newbie] cgi-tasks howto? stupid question

2000-07-05 Thread Dieter Maurer

Rajil Saraswat writes:
  i tried out this but this isnt working  out for me. can you point out the
  error.
  
  my index_html file is
  dtml-var standard_html_header
  FORM method=post action=http://localhost:8080/3inet/print
  Enter name: INPUT type=text name=valnameBR
  
  INPUT type=submit
  /FORM
  dtml-var standard_html_footer
  
  
  the print file is
  dtml-var standard_html_header
  h2 
  dtml-var valname
  /h2
  dtml-var standard_html_footer
Try dtml-var REQUEST in you "print file".
You get a beautifully formated view of the complete HTTP Request
send by the browser.

Often this helps to analyse such problems.


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 )




Re: [Zope] [newbie] cgi-tasks howto? stupid question

2000-07-05 Thread Dieter Maurer

Rajil Saraswat writes:
  if i donot run the httpd but run only the Zserver then http://localhost
  will work?
"http://localhost" would contact port "80".

At least under Unix all ports up to 1024 are priviledged.
Only servers running as root can bind to them.
For security reasons, you probably would not like to run Zope as root.

Today, I read in the list, that even if you start Zope as root, the actual
ZServer uses a different user (to be configured).
Then this would remove the above mentioned security issues.
If this is indeed true, you may try to use Zope with port 80.
There is an option to "z2.py" which allows you to specify
which port to use for the HTTP server.


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 )




Re: [Zope] [newbie] cgi-tasks howto? stupid question

2000-07-04 Thread Nils Kassube

[EMAIL PROTECTED] (Rajil Saraswat) wrote:

 browser with the name as valname. Then how do i print this valname thru
 dtml.

This is easy. 

dtml-var valname

See the rules for "Name Lookup" in the DTML Reference Guide. There
are circumstances where it's not so simple... 

 ofcourse i checked out with the guides but could locate cgi calls,

That's so because the documentation sucks^H^H^H^H^Hneeds to
be improved. Digital Creations is aware of this.

 ps: dont kick me out, everybody has to have a start.

We are all gentle tolerant people here. Well, most of the time.

Cheers,
Nils
--
[EMAIL PROTECTED]   | [EMAIL PROTECTED] (preferred)
[EMAIL PROTECTED] | [EMAIL PROTECTED]



___
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] [newbie] cgi-tasks howto? stupid question

2000-07-04 Thread Nils Kassube

[EMAIL PROTECTED] (Rajil Saraswat) wrote:

 i tried out this but this isnt working  out for me. can you point out the
 error.

The DTML source is okay. This should work. 

 when i submit the form the print page is outputted but the value of the
 textbox(valname) is not outputted. whats wrong?

What do you mean by "the print page is outputted"? Do you see
the source? Or is only the dtml-var valname part not displayed?

Cheers,
Nils
--
[EMAIL PROTECTED]   | [EMAIL PROTECTED] (preferred)
[EMAIL PROTECTED] | [EMAIL PROTECTED]



___
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 )