Re: calling stored procedure /webserver

From: <Steve_Kilbane_at_cegelecproj.co.uk>
Date: 1996/07/30
Message-ID: <4tlcdp$h49_at_jupiter.sdd.cegelecproj.co.uk>


> Can some one explian what is the right way to call a stored procedure
> thru the netscape browser. Iam currently running/testing out webserver
> 1.0 on 7.3.2 database.I've setup the listener on a port(eg:8000) and
> also set up an agent(DEMO).I also have created a procedure(tsthtp)
> which has just got one line htp.print('hello').

Hmm. can't remember whether you need to use htp.htmlOpen, etc. - I think you do, otherwise, you'll find that the browser isn't getting a mime type before the text, and will treat that as an error. However, that's not what you're seeing here...

> Now, when I try to issue the following...
> http://165.120.90.10:8000/DEMO/owa/tsthtp
>
> its coming out saying 'Requested URL not found..'

Here's my collected list of WebServer gotchas (I'd email this directly, but I missed the original post).

steve

[note: I use port 8080 in the following...]

Q. Why do I get "Requested URL was not found on this server"?

Symptom:
When attempting to access URLs such as:

http://host:8080/ows-bin/cpl/owa/tw.ping

the server responds with "Requested URL was not found on this server".

Causes:
(i) This is due to there not being a mapping in the cpl listener's

	Virtual Directory Mappings configuration, of the form:
	/home/oracle/ows2/bin/ CN /ows-bin/cpl/
	so the "owa" program isn't found.
(ii) You're accessing a directory, /xxxx/, and the directory isn't readable
	by the Web Server process.
(iii) The Web Server is configured to not generate directory listings
	automatically, and there isn't an index.html file (or whatever you've
	picked as your index file name).


Fix:
(i) Create the virtual directory mapping, halt the listener, and

        restart it.
(ii) Check and fix the directory permissions. Note also the directory rescanning

        issue below.
(iii) Make sure that either the Web Server will create indices itself, or that

	there is a readable index file under the name you've specified. If altering
	the server configuration, halt and restart the server. If changing file
	ownership or permissions, note the directory rescannign issue below.




Q. Why do I get "Request failed. We were unable to process your request at this time. Please try again later"?

Symptom:
When attempting to access URLs such as:

http://host:8080/ows-bin/cpl/owa/tw.ping

the server responds with "Request failed. We were unable to process your request at this time. Please try again later."

Cause:
(i) The listener can't read the configuration file owa.cfg. (ii) The listener is attempting to invoke the PL/SQL procedure named, but can't, for some reason.

Fix:
(i) Make sure that the file /home/oracle/owa2/admin/owa.cfg (or

	whatever is the moral equivalent on your system) is readable by
	the user running the Web Server.
(ii) (a) Check that the user for the listener has the permissions to
         invoke such functions: do "exec tw.ping" in sqlplus. There won't
         be any output, but it should say that it ran ok. If necessary, try
	reloading the stored procedures into the database.
     (b) Make sure that the names of the input fields in the form
         match up exactly with the names of the parameters in the
         script. There must be a one-to-one mapping.
     (c) If you've got multiple-value fields, such as SELECTs,
         make sure they're of the right type (defined in the
         OWA_UTIL package), and that there's an extra value
         supplied by a hidden field to force at least one value
         to be selected.
(iii) If all else fails, the procedure is probably raising an
      exception. Put OTHERS exception handlers around everything
      and call barf(errstr('procedure name')), or the moral equivalent
	on your system.


Q. I've change the permissions of my script to make it readable and executable, but the webserver hasn't noticed. Why is this?

Symptom: webserver doesn't notice file permissions have changed.

The webserver caches the modification time of the directory, and of all the files within it. If a URL is not available because of permissions problems, and you fix that, the webserver will continue to say that the URL is not available, because the directory modification date hasn't changed, so it doesn't bother to check the file itself. Renaming the file to something and back again will make the webserver see the change. This is configurable, however. On the Web Listener configuration page, there is a parameter which determines how long the Web Server will go without re-scanning a directory that appears to have not changed yet, including the ability to never rescan unless the modification date changes.



Q. I want to do some more advanced authentication. What are my options?
  1. Mainly, the best we've come up with is using Netscape-style cookies in conjunction with some sort of login form. The PL/SQL procedure that processes the form returns a cookie to the browser which the browser will hold on to and include with future requests, until you send it a new cookie, or the browser session ends.This avoids having to have user identifiers in the URL.
  2. Right, I'm storing userids in a table. How do I encrypt the passwords?
  3. Port crypt. :-) More seriously, I don't have an answer for this.
  4. Can I use a differnet web server from the one included by Oracle?
  5. With WebServer 1.x, yes. With WebServer 2.x, no. Apparently this restriction will be removed for WebServer 3.x.
Received on Tue Jul 30 1996 - 00:00:00 CEST

Original text of this message