CGI.Request_URI

Greetings -
After an upgrade from MX6 to MX7 including the updater patch,
I've noticed the CGI.Request_URI variable does not seem to behave
the same way it used to. I'm running Apache 2.0.54.
I noticed the behavior because a redirect script I wrote no
longer has access to the original cgi.request_uri variable.
In MX6, I used the variable in a switch statement to look for
redirect pages at the top of my missing template. When a bad
request would come in, I'd check to see if the page should be
redirected based on the value of cgi.request_uri.
Now, in MX7, when my missing template fires, the value of
cgi.request_uri is always missing.cfm - which leads me to believe
that apache is handling the request and the cgi variable is getting
lost in the process.
Anyone experience this or have a good work around?
Thanks-
Pt

It talks about it here:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=ColdFusion_Documentation&file=00000194.htm

Similar Messages

  • New problem printing from financial websites - print button sends file to a "cgi" extension and adobe cannot open and print.

    I used to be able to print my bank statements directly from the website to my printer. Now the print program sends the file to a file with a "cgi" extension and saves it on my desktop but as an Adobe file. When i open it to print, Adobe says it is not supported or corrupt. running windows 7 on PC.

    mmsteer,
    I think I may be able to help you with this problem, which I was having with CS4 when I first upgraded to Lion, and others were having with CS3. This fix is courtesy of Aisolve on these discussion boards:
    Remove the Adobe PDF PPDs from the following folders:
    OS/Library/Printers/PPDs/contents/Resources/en.lproj,
    OS/Library/Printers/PPDs/contents/Resources/Zh_CN.lproj,
    OS/Library/Printers/PPDs/contents/Resources/Ja.lproj,
    OS/Library/Printers/PPDs/contents/Resources/ko.lproj,
    OS/Library/Printers/PPDs/contents/Resources/Zh_TW.lproj,
    Be sure to go to your system Library, not your user Library.
    Also, regarding my current problem, I spoke with an Apple tech person and found that the 10.7.2 upgrade apparently is the culprit, and is incompatible with wireless printing to my Lanier printer. I CAN print connected through USB. That's a work-around for now, but I'll need to contact Lanier about upgrading their driver for OS X 10.7.2.
    Aisolve was helping me with this issue, too, and assures me that if I'm able to generate a postscript file (which I was), and able to generate a PDF by distlling it through Adobe Distiller (which I am), then I can safely assume that the problem lies with the hardware, in this case the printer driver. This lines up with what Apple told me.

  • Trying to get lighttpd to upload a file through perl cgi

    Hi, I'm quite new in these things, so I might be doing something obvious wrong, but I'd like some help on this.
    I'm trying to make a webpage where people can upload files, this is the html page (located at /srv/html/index.html):
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>lighttpd Test Page</title>
    </head>
    <body>
    <div style="text-align:center; font: 12px sans-serif;">
    <span style="font-weight: bold; font-size: 20px;">
    Arch Linux
    </span>
    <br><br>
    This is a test page for the lighttpd Web Server.<br>
    <form action="/cgi-bin/upload.pl" method="post" enctype="multipart/form-data">
    <input type="file" name="fileName" size="40">
    <input type="submit" value="Send">
    <input type="reset">
    </form>
    </div>
    </body>
    </html>
    And the backend (in /srv/html/cgi-bin/upload.pl):
    #!/usr/bin/perl -wT
    use strict;
    use CGI;
    use CGI::Carp qw ( fatalsToBrowser );
    use File::Basename;
    $CGI::POST_MAX = 1024 * 1024 * 5000; # 5GB filesize limit
    my $safe_filename_characters = "a-zA-Z0-9_.-";
    my $upload_dir = "/srv/jail/";
    my $query = new CGI;
    my $filename = $query->param("fileName");
    if ( !$filename )
    print $query->header ( );
    print "There was a problem uploading your file (filesize limit may be exceeded).";
    exit;
    my ( $name, $path, $extension ) = fileparse ( $filename, '\..*' );
    $filename = $name . $extension;
    $filename =~ tr/ /_/;
    $filename =~ s/[^$safe_filename_characters]//g;
    if ( $filename =~ /^([$safe_filename_characters]+)$/ )
    $filename = $1;
    else
    die "Filename contains invalid characters";
    my $upload_filehandle = $query->upload("fileName");
    open ( UPLOADFILE, ">$upload_dir/$filename" ) or die "$!";
    binmode UPLOADFILE;
    while ( <$upload_filehandle> )
    print UPLOADFILE;
    close UPLOADFILE;
    print $query->header ( );
    print <<END_HTML;
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Done!</title>
    </head>
    <body>
    <p>Uploading done!</p>
    </body>
    </html>
    END_HTML
    My server config:
    # lighttpd configuration file
    # use it as a base for lighttpd 1.0.0 and above
    # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
    ############ Options you really have to take care of ####################
    ## modules to load
    # at least mod_access and mod_accesslog should be loaded
    # all other module should only be loaded if really neccesary
    # - saves some time
    # - saves memory
    server.modules = (
    # "mod_rewrite",
    # "mod_redirect",
    # "mod_alias",
    "mod_access",
    # "mod_cml",
    # "mod_trigger_b4_dl",
    # "mod_auth",
    # "mod_status",
    # "mod_setenv",
    # "mod_fastcgi",
    # "mod_proxy",
    # "mod_simple_vhost",
    # "mod_evhost",
    # "mod_userdir",
    "mod_cgi",
    # "mod_compress",
    # "mod_ssi",
    # "mod_usertrack",
    # "mod_expire",
    # "mod_secdownload",
    # "mod_rrdtool",
    "mod_accesslog" )
    ## a static document-root, for virtual-hosting take look at the
    ## server.virtual-* options
    server.document-root = "/srv/http/"
    ## where to send error-messages to
    server.errorlog = "/var/log/lighttpd/error.log"
    # files to check for if .../ is requested
    index-file.names = ( "index.php", "index.html",
    "index.htm", "default.htm" )
    ## set the event-handler (read the performance section in the manual)
    # server.event-handler = "freebsd-kqueue" # needed on OS X
    # mimetype mapping
    mimetype.assign = (
    ".pdf" => "application/pdf",
    ".sig" => "application/pgp-signature",
    ".spl" => "application/futuresplash",
    ".class" => "application/octet-stream",
    ".ps" => "application/postscript",
    ".torrent" => "application/x-bittorrent",
    ".dvi" => "application/x-dvi",
    ".gz" => "application/x-gzip",
    ".pac" => "application/x-ns-proxy-autoconfig",
    ".swf" => "application/x-shockwave-flash",
    ".tar.gz" => "application/x-tgz",
    ".tgz" => "application/x-tgz",
    ".tar" => "application/x-tar",
    ".zip" => "application/zip",
    ".mp3" => "audio/mpeg",
    ".m3u" => "audio/x-mpegurl",
    ".wma" => "audio/x-ms-wma",
    ".wax" => "audio/x-ms-wax",
    ".ogg" => "application/ogg",
    ".wav" => "audio/x-wav",
    ".gif" => "image/gif",
    ".jar" => "application/x-java-archive",
    ".jpg" => "image/jpeg",
    ".jpeg" => "image/jpeg",
    ".png" => "image/png",
    ".xbm" => "image/x-xbitmap",
    ".xpm" => "image/x-xpixmap",
    ".xwd" => "image/x-xwindowdump",
    ".css" => "text/css",
    ".html" => "text/html",
    ".htm" => "text/html",
    ".js" => "text/javascript",
    ".asc" => "text/plain",
    ".c" => "text/plain",
    ".cpp" => "text/plain",
    ".log" => "text/plain",
    ".conf" => "text/plain",
    ".text" => "text/plain",
    ".txt" => "text/plain",
    ".dtd" => "text/xml",
    ".xml" => "text/xml",
    ".mpeg" => "video/mpeg",
    ".mpg" => "video/mpeg",
    ".mov" => "video/quicktime",
    ".qt" => "video/quicktime",
    ".avi" => "video/x-msvideo",
    ".asf" => "video/x-ms-asf",
    ".asx" => "video/x-ms-asf",
    ".wmv" => "video/x-ms-wmv",
    ".bz2" => "application/x-bzip",
    ".tbz" => "application/x-bzip-compressed-tar",
    ".tar.bz2" => "application/x-bzip-compressed-tar",
    # default mime type
    "" => "application/octet-stream",
    # Use the "Content-Type" extended attribute to obtain mime type if possible
    #mimetype.use-xattr = "enable"
    ## send a different Server: header
    ## be nice and keep it at lighttpd
    # server.tag = "lighttpd"
    #### accesslog module
    accesslog.filename = "/var/log/lighttpd/access.log"
    ## deny access the file-extensions
    # ~ is for backupfiles from vi, emacs, joe, ...
    # .inc is often used for code includes which should in general not be part
    # of the document-root
    url.access-deny = ( "~", ".inc" )
    $HTTP["url"] =~ "\.pdf$" {
    server.range-requests = "disable"
    # which extensions should not be handle via static-file transfer
    # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    ######### Options that are good to be but not neccesary to be changed #######
    ## bind to port (default: 80)
    server.port = ###
    ## bind to localhost (default: all interfaces)
    #server.bind = "127.0.0.1"
    ## error-handler for status 404
    #server.error-handler-404 = "/error-handler.html"
    #server.error-handler-404 = "/error-handler.php"
    ## to help the rc.scripts
    server.pid-file = "/var/run/lighttpd/lighttpd.pid"
    ###### virtual hosts
    ## If you want name-based virtual hosting add the next three settings and load
    ## mod_simple_vhost
    ## document-root =
    ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
    ## or
    ## virtual-server-root + http-host + virtual-server-docroot
    #simple-vhost.server-root = "/srv/http/vhosts/"
    #simple-vhost.default-host = "www.example.org"
    #simple-vhost.document-root = "/htdocs/"
    ## Format: <errorfile-prefix><status-code>.html
    ## -> ..../status-404.html for 'File not found'
    #server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
    #server.errorfile-prefix = "/srv/http/errors/status-"
    ## virtual directory listings
    #dir-listing.activate = "enable"
    ## enable debugging
    #debug.log-request-header = "enable"
    #debug.log-response-header = "enable"
    #debug.log-request-handling = "enable"
    #debug.log-file-not-found = "enable"
    ### only root can use these options
    # chroot() to directory (default: no chroot() )
    #server.chroot = "/"
    ## change uid to <uid> (default: don't care)
    server.username = "http"
    ## change uid to <uid> (default: don't care)
    server.groupname = "http"
    #### compress module
    #compress.cache-dir = "/var/cache/lighttpd/compress/"
    #compress.filetype = ("text/plain", "text/html")
    #### proxy module
    ## read proxy.txt for more info
    #proxy.server = ( ".php" =>
    # ( "localhost" =>
    # "host" => "192.168.0.101",
    # "port" => 80
    #### fastcgi module
    ## read fastcgi.txt for more info
    ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
    #fastcgi.server = ( ".php" =>
    # ( "localhost" =>
    # "socket" => "/var/run/lighttpd/php-fastcgi.socket",
    # "bin-path" => "/usr/bin/php-cgi"
    #### CGI module
    cgi.assign = ( ".pl" => "/usr/bin/perl",
    ".cgi" => "/usr/bin/perl" )
    #### SSL engine
    #$SERVER["socket"] == "0.0.0.0:443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
    # server.errorlog = "/var/log/lighttpd/error-ssl.log"
    # accesslog.filename = "/var/log/lighttpd/access-ssl.log"
    # server.document-root = "/home/lighttpd/html-ssl"
    #### status module
    #status.status-url = "/server-status"
    #status.config-url = "/server-config"
    #### auth module
    ## read authentication.txt for more info
    #auth.backend = "plain"
    #auth.backend.plain.userfile = "lighttpd.user"
    #auth.backend.plain.groupfile = "lighttpd.group"
    #auth.backend.ldap.hostname = "localhost"
    #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
    #auth.backend.ldap.filter = "(uid=$)"
    #auth.require = ( "/server-status" =>
    # "method" => "digest",
    # "realm" => "download archiv",
    # "require" => "user=jan"
    # "/server-config" =>
    # "method" => "digest",
    # "realm" => "download archiv",
    # "require" => "valid-user"
    #### url handling modules (rewrite, redirect, access)
    #url.rewrite = ( "^/$" => "/server-status" )
    #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
    #### both rewrite/redirect support back reference to regex conditional using %n
    #$HTTP["host"] =~ "^www\.(.*)" {
    # url.redirect = ( "^/(.*)" => "http://%1/$1" )
    # define a pattern for the host url finding
    # %% => % sign
    # %0 => domain name + tld
    # %1 => tld
    # %2 => domain name without tld
    # %3 => subdomain 1 name
    # %4 => subdomain 2 name
    #evhost.path-pattern = "/srv/http/vhosts/%3/htdocs/"
    #### expire module
    #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
    #### ssi
    #ssi.extension = ( ".shtml" )
    #### rrdtool
    #rrdtool.binary = "/usr/bin/rrdtool"
    #rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"
    #### setenv
    #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
    #setenv.add-response-header = ( "X-Secret-Message" => "42" )
    ## for mod_trigger_b4_dl
    # trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
    # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
    # trigger-before-download.trigger-url = "^/trigger/"
    # trigger-before-download.download-url = "^/download/"
    # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
    # trigger-before-download.trigger-timeout = 10
    ## for mod_cml
    ## don't forget to add index.cml to server.indexfiles
    # cml.extension = ".cml"
    # cml.memcache-hosts = ( "127.0.0.1:11211" )
    #### variable usage:
    ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
    #bar = 1
    #var.mystring = "foo"
    ## integer add
    #bar += 1
    ## string concat, with integer cast as string, result: "www.foo1.com"
    #server.name = "www." + mystring + var.bar + ".com"
    ## array merge
    #index-file.names = (foo + ".php") + index-file.names
    #index-file.names += (foo + ".php")
    #### include
    #include /etc/lighttpd/lighttpd-inc.conf
    ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
    #include "lighttpd-inc.conf"
    #### include_shell
    #include_shell "echo var.a=1"
    ## the above is same as:
    #var.a=1
    The site is running over https with a self signed ssl-cert, if that matters. If I try to upload a file, the browser just quickly reloades the page, the filename still in the input field. The file isn't uploaded and the page that the script should display when completed doesn't show neither.
    Does anyone know how to troubleshoot this? I'm not getting any errors, it just doesn't work..

    I haven't used Websphere before so I can't say much about that. Try putting <%@ page language="Java" %> at the top of your jsp page.
    Try putting your java files into a package and see if that helps. I read somewhere that Tomcat once had issues with running classes that weren't in a package. Make sure to put the package statement at the top of your Java files if you do.
    Websphere says it caught an unhandled exception. Instead of having your method throw and Exception put your code in a try-catch block and then print a stack trace to see if it says anything when it trys to read and write data.
    Try{
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("doUpload.txt")));
        ServletInputStream in = request.getInputStream();
        int a=0;
        a=in.read();
        while (a!= -1){
            pw.print((char) a);
            a=in.read();
        pw.close();
    }catch(Exception e){
      e.printStackTrace();
    }Sorry I can't really give you more help.
    -S-

  • I am using CGI Vis examples in LV6.1, and the VI simply opens when I click on a link. What am I doing wrong?

    I am running Labview 6.1 and am simply trying to learn about the CGI VIs from the examples. I set up the Web Server root directory and I have the cgi-bin directory in it. When I view the provided index.htm file using http://localhost/index.htm, I see the web server document (so the server is working???). I go to the CGI examples and click on the link for CGI Basics. Everytime I click on the link, the vi tries to download with a prompt for SAVE or OPEN. If OPEN is selected the vi opens but does not run. I thought it might be a problem with the browser being on the same machine, so I went to a machine without Labview installed and it still tries to download th
    e vi locally from the server. I assumed from the documentation that the vi runs on the server and sends a request back in html form. I must have missing something or setup wrong. Any help would be deeply appreciated!
    Setup (In case it matters)
    Labview 6.1
    Internet Developers Toolset 5.0
    Windows XP Pro and Windows 2000 Pro (Tried both)
    Internet Explorer 6.0
    Happy New Year to all!!!

    I am not sure what the problem could be and I am a little confused about the exact steps you took. I launch LabVIEW, start the HTTP server, point my web browser to http://localhost/index.htm. This brings of a page entitled G Web server. I click on the button to "View CGI Examples" which redirects by browser to http://localhost/examples/index.htm . I click on CGI Basics and go to http://localhost/examples/basics.htm .
    This page has four groups of examples and within each group there are several examples. All of the examples I clicked on redirected my browser. Is this what you see?
    Was the message to save or open from the browser or from LabVIEW? If it was from LabVIEW, then you might consider mass compiling the VIs on your computer. You can do this
    by opening LabVIEW >> tools >> advanced >> mass compile.
    You might also try a reinstall of the Internet Toolkit. The examples may have been corrupted.
    Finally, LabVIEW 6.1 introduced remote front panels. You might find them easier to use than CGI scripting.

  • Enable CGI in Apex Apache

    Hello All,
    I've recently installed APEX. Everything from "apex" development point of view works just fine. But I amm having a hard time setting up/enabling CGI/Perl script in the Apache server.
    I have used the standard setup therefor, my http server is http://myserver:7777/pls/apex. Now I've modified my http.conf file with the follwoing entries:
    AddType application/x-httpd-cgi .cgi
    AddType application/x-httpd-cgi .pl
    ScriptAlias /cgi-bin/ "/opt/oracle/product/10.2.0/apex/Apache/Apache/images/cgi-bin/"
    # "/opt/oracle/product/10.2.0/oms10g/Apache/Apache/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    <Directory "/opt/oracle/product/10.2.0/apex/Apache/Apache/images/cgi-bin">
            AllowOverride None
            Options None
            Order allow,deny
            Allow from all
    </Directory>I have change the permission on the folder and create a file called test.pl. When I run it I always get 500 Internal error. After checking the logs it complains about some premature headers and then states that the file does nto exist. This should really not be the case, because the test.pl is just about the simplest form possible and the apache settings ( at least I think, are to be correct). I test this by doing:
    http://myserver:7777/cgi-bin/test.pl
    #!/usr/bin/perl
    print "Content-type: text/plain\n\n";
    print "testing...\n";Did I go wrong somewhere? Can anybody direct me in the correct direction. I have also ran the following to get some info on my env.
    begin
    owa_util.print_cgi_env;
    end;
    /Here is the output:
    PLSQL_GATEWAY = WebDb
    GATEWAY_IVERSION = 3
    SERVER_SOFTWARE = Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
    GATEWAY_INTERFACE = CGI/1.1
    SERVER_PORT = 7777
    SERVER_NAME = myserver
    REQUEST_METHOD = POST
    PATH_INFO = /wwv_flow.show
    SCRIPT_NAME = /pls/apex
    REMOTE_ADDR = 10.6.100.47
    SERVER_PROTOCOL = HTTP/1.1
    REQUEST_PROTOCOL = HTTP
    REMOTE_USER = APEX_PUBLIC_USER
    HTTP_CONTENT_LENGTH = 292
    HTTP_CONTENT_TYPE = application/x-www-form-urlencoded
    HTTP_USER_AGENT = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
    HTTP_HOST = myserver:7777
    HTTP_ACCEPT = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
    HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
    HTTP_REFERER = http://myserver:7777/pls/apex/f?p=4500:1003:1620410303274728::NO:::
    HTTP_ORACLE_ECID = 81038208787,1
    HTTP_ORACLE_CACHE_VERSION = 10.1.2
    WEB_AUTHENT_PREFIX =
    DAD_NAME = apex
    DOC_ACCESS_PATH = docs
    DOCUMENT_TABLE = wwv_flow_file_objects$
    PATH_ALIAS =
    REQUEST_CHARSET = UTF8
    REQUEST_IANA_CHARSET = UTF-8
    SCRIPT_PREFIX = /pls
    HTTP_COOKIE = LOGIN_USERNAME_COOKIE=admin; ORA_WWV_REMEMBER_UN=ADMIN:ORIFLAME; ORA_WWV_USER=7E9E816ED5CDC688; ys-active_tab=s%3Atab_1;ys-ext-comp-1026=o%3Acollapsed%3Db%253A1; ys-ext-comp-1081=o%3Awidth%3Dn%253A800%5Eheight%3Dn%253A465%5Ex%3Dn%253A240%5Ey%3Dn%253A108; ys-east-panel=o%3Acollapsed%3Db%253A0; ys-purchase-panel=o%3Acollapsed%3Db%253A0; ys-chart-region-1=o%3Acollapsed%3Db%253A0; WWV_CUSTOM-F_2787700778075484_123=1F474351E340C827; ys-ext-comp-1286=o%3Awidth%3Dn%253A1100%5Eheight%3Dn%253A652%5Ex%3Dn%253A90%5Ey%3Dn%253A117Thank you in advance for any assitance anybody can provide.
    Regards
    Jan

    Usually a Wallet is created at installation time with a dummy certificate for SSL.
    If you are planning to use a certificate from any commercial CA, you should go ahead and create a new Wallet, then create the certificate request and send it to the CA to get your certificate.
    After that change the ssl virtual host configuration to point to the new wallet.

  • 9i report services need info. on CGI and RWSERVLET

    We are trying to use the reports 9i against forms 6i. I need to info. on how we can differentiate the two types of service(whether it is CGI or rwservlet).
    Setup1:
    1. Run rwserver -install server=TESTCGI
    2. This creates the service and the testcgi.conf file
    3. Make the compatibility to 6i in rwservlet.properties
    4. In tnsnames specify the host=host1 port=1949
    (Is this that all that I need to CGI?)
    Setup2:
    1. Run rwserver -install server=TESTSERVLET
    2. This creates the service and the testservlet.conf file
    3. Make the service manual so that it doesn't startup on its own.
    4. Make the compatibility to 6i in rwservlet.properties
    5. Also specify server_name=TESTSERVLET
    6. Now start the service by typing http://host:8888/reports/rwservlet
    (This sometimes start the service(I can see an icon) and is this the CGI service that is started by the servlet??. Sometimes it can't start the service giving port binding error. If I start the service TESTSERVLET by going to the services window and type the url http://host:8888/reports/rwservlet/showenv works fine.
    I don't get any port bind error.
    7. Is this case also do I need a tnsnames entry? If so what should be the port?
    8. Is servlet internally calls CGI and is this how it works?
    9. Why is that it can't start the service automatically when started using servlet sometimes?
    I am little confused about both the architecture..Any help will be appreciated.

    See comments in line:
    1. Is report server and the listener(the one usually on
    port 1949) are different processes altogether?9i Reports Server will start up a proxy server in a separate process, if
    <compatible version="6i"/>
    is set in server config file <server_name>.conf. The proxy server, which is running in a different process, will listen on the port.
    2. If I issue the command, rwserver server=TESTSERVER(I
    have no tnsnames entry for this server at this moment
    in the tnsnames.ora file in the 9iR2 home) does it
    start the report server alone? or the report server and
    the listener process? rwserver server=TESTSERVER will start 9i TESTSERVER, but only start the proxy server if <compatible version="6i"/> is set. In the case that <compatible version="6i"/> is set, but no tnsnames entry for this server, the proxy will not be able to start, because it does not no which port to listen to.
    3. If the above command starts the listener process by
    itself which port does it use? (We had the option to
    specify the port in previous releases, but not anymore
    I guess. It used to be something like <executable>
    port=<portno> in previous releases)Again, the port is defined in tnsnames.ora.
    4. I assumed that specifying the entry for the report
    server in the tnsnames.ora before starting the server
    would start the listener process in the appropriate
    port.
    a. I made an entry in tnsnames.ora as SUPPORTSERVER
    port=1949.
    b. I ran the command rwserver server=SUPPORTSERVER
    c. Did a netstat -a on the machine. Didn't see any
    process listening on port 1949.
    So my question is how do we specify the listening port?
    where do we specify the listening port? If in
    tnsnames.ora why I didn't see any listener process on
    1949?Specifying the port in tnsnames.ora itself will not start the proxy server, you will need to uncomment <compatible version="6i"/> in $OH/reports/conf/<server_name>.conf. So make sure this and port number are both set correctly.
    5. How do I determine what client Iam using? Is it like
    below:
    a. If I use only the following url
    http://<web_server>.<domain_name>:<port>/<alias>/rwservlet?<parameters>
    am I making use of servlet/oc4j? Does this mean servlet
    has to be used only as a url?Yes, you are running report using Reports servelt. A servlet in its nature needs to be invoked in a web environment.
    b. If I use the following url
    http://<web_server>.<domain_name>:<port>/<alias>/rwcgi.exe?<parameters>
    am I making use of cgi? Does this mean the cgi has to
    be used only as a url?Yes, you are running report using CGI. A cgi program in its nature needs to be invoked in a web environment.
    However, you don't have to run them from url. You can have your own program call Reports servlet/cgi, then return the result.
    c. If for RUN_REPORT_OBJECT it uses ZRC, am I not using
    servlet/oc4j? Since the document says, the servlet is
    more stable than CGI, I want to use the servlet/oc4j.
    Does this mean I should use only the above url and not
    the RUN_REPORT_OBJECT?RUN_REPORT_OBJECT will not go through servlet. You can use show_document call to send request to servlet.
    Hope this helps,
    -Jeff

  • Oracle Reports Server CGI - Report Job was cancelled upon user request.

    I am running reports on the web through Forms using Run_Report_Object built in. I am using Oracle 9iAS Enterprise Edition Release 1(1.2.2.2.2), Forms 6i Patch 9 (6.0.8.18.3) and Reports 6i Patch 9 (6.0.8.18) using CGI implementation. Most reports are running fine, but I have one that produces 125 pages and we are getting the following messages in the browser:
    Error: The requested URL was not found, or cannot be served at this time.
    Oracle Reports Server CGI - Report Job was cancelled upon user request.
    However if you look at the Reports Server Queue Status thru the browser it shows that the report did finish, but it took 16 minutes. But the user gets the above message in their browser window.
    Is there a way to get the first page of the report to display, while the rest of the report finishes, so the browser window doesn't timeout and display the above error?
    Any help would be greatly appreciated.

    hi ,
    There is no limit on the report run time. The most probable reason why you are getting the 'Report cancelled upon user request' message is the users might have hit the "cancel Report" button which is displayed when it is running in 'SYNCHRONOUS MODE'. do not hit that button as it will terminate the report. to increase the speed of returning the results by the report, try improving the sql that you use in the report, or if you have DBA rights try adding in INDEXES on the columns of the tables used by the report.
    Hope this helps
    Manoj

  • Using socket or CGI for report generation

    I have a 100+ c executables(.exe) which accepts arguments and will generate report.These executables lies in a linux server. Through my web application, based on the functionality i need to invoke these .exe and have to generate the report.
    I am using JSF/servlet to generate the query string(i.e. exe name with its relevant parameters).
    I have two option to do the same.
    1. Through socket programming send the request from client(JSP) to linux server that accepts the input and it process the request and send the report back.
    2. Send the request from client web browser(JSP) running in JBOSS to the apache web server via CGI and it execute the exe and generate the report.
    could you let me know which is the efficient way of generating the report. If there is any other option let me know.

    It's more that there is no disadvantage in your case. The usual objection to CGI (and indeed one reason why we have servlet containers at all) is that you have to start a new process per request, but you have that problem anyway because of your hundreds of C programs.

  • How to set reg.cgi for VideoPhoneLabs

    i start with stratus .i try set it to work with my dedicated apache server and sql but have no clue how to do it or where to put this file on my server.
    i realy have probleme with reg.cgi
    for now i did www/cgi-bin/reg.cgi and in the xml i set my websiteurl = "http://88..../cgi-bin/"
    also how to complete reg.cgi for have it to talk with my db ?
    here the reg.cgi file.
    help please ...
    #! /usr/bin/python --
    reg.cgi by Michael Thornburgh.
    This file is in the public domain.
    IMPORTANT: This script is for illustrative purposes only. It does
    not have user authentication or other access control measures that
    a real production service would have.
    This script should be placed in the cgi-bin location according to
    your web server installation. The database is an SQLite3 database.
    Edit the location of the database in variable "dbFile".
    Create it with the following schema:
    .schema
    CREATE TABLE registrations (
        m_username VARCHAR COLLATE NOCASE,
        m_identity VARCHAR,
        m_updatetime DATETIME,
        PRIMARY KEY (m_username)
    CREATE INDEX registrations_updatetime ON registrations (m_updatetime ASC);
    # CHANGE THIS
    dbFile = '.../registrations.db'
    import cgi
    import sqlite3
    import xml.sax.saxutils
    query = cgi.parse()
    db = sqlite3.connect(dbFile)
    user = query.get('username', [None])[0]
    identity = query.get('identity', [None])[0]
    friends = query.get('friends', [])
    print 'Content-type: text/plain\n\n<?xml version="1.0" encoding="utf-8"?>\n<result>'
    if user:
        try:
            c = db.cursor()
            c.execute("insert or replace into registrations values (?, ?, datetime('now'))", (user, identity))
            print '\t<update>true</update>'
        except:
            print '\t<update>false</update>'
    for f in friends:
        print "\t<friend>\n\t\t<user>%s</user>" % (xml.sax.saxutils.escape(f), )
        c = db.cursor()
        c.execute("select m_username, m_identity from registrations where m_username = ? and m_updatetime > datetime('now', '-1 hour')", (f, ))
        for result in c.fetchall():
            eachIdent = result[1]
            if not eachIdent:
                eachIdent = ""
            print "\t\t<identity>%s</identity>" % (xml.sax.saxutils.escape(eachIdent), )
            if f != result[0]:
                print "\t\t<registered>%s</registered>" % (xml.sax.saxutils.escape(result[0]), )
        print "\t</friend>"
    db.commit()
    print "</result>"

    Persistent binding is effectively provided by STMS (MPxIO) - is there anything in particular you're wanting to do that STMS doesn't provide?

  • Correct Forum? CGI and Server behaviour on Solaris at system()-call

    Hi to you all,
    Do not know if i am in the correct forum, but maybe it is a Webserver problem.
    I have Sun ONE Webserver 6.1 running on Solaris.
    Craete some CGI`s in C.
    Now I have a problem with one CGI, which have to call a Shellscript via system() call.
    The Client just calls the CGI with some parameters, which will write the informations in a file with some additional informations from a database, after that, the script should be startet and do some printjobs in the background.
    The CGI and the Shell-script is working fine. My Problem is, that the system() call always waits, until the ShellScript has finished, so the Webserver send the "data successful written" site after a couple of minutes, it should send it immeditatly to the client, so the session is closed.
    I have tried to put the shellscript in background with "&", also with nohup and a second shell script which justs starts the first script, also with all combinations of nohup and "&" for background process.
    also i tried with "pclose(popen(SCRIPT,"W");" to call the script, it is always the same, the session will close only, when the script has been finished.
    In an other Forum I found an entry, that , however, IPlanet webserver always will do this in this way. The session will be closed, when all called processes has benn fisnished.
    Any Ideas to solve my problem?

    The web server reads from the CGI program's stdout. It knows the HTTP response is complete when the CGI program closes its stdout.
    When you call system(), the child process inherits the CGI program's stdout and keeps it open until it finishes. If you want the child process to run asynchronously from the HTTP response, you should give the child process a new stdout with > /dev/null. (You'll still need to place the child process in the background with &.) Alternatively, you can fork(), close(1), then exec().

  • How to retrieve data from a CGI to SAP?

    Hi guys,
    I'm looking for a way to retrieve information from a CGI page into SAP. This CGI generates a XML with the response from the parameters I use on the URL.
    I can xsl transform the result into ABAP variables, but first I need to know how to get that information.
    As anyone come across this or knows how to do it?
    Thanks in advance,
    Ricardo

    Hi,
    In your case, Include prog is part of FM, no need to treat it as an Entity.
    Now, Your Answer -
    In SCRIPT - IN Page Window -->
         PERFORM GET_MVAT_TIN IN PROGRAM Z_SCRIPT_PERFORMS_ABAPDB3
         USING &VBDKR-KUNRE&
         CHANGING &STCD1&
         CHANGING &STCD2&
         ENDPERFORM
         IF &STCD1& <> ' '
         <B>MVAT Number :</> &STCD1&
         ENDIF
    Then go to SE38 --> Creat prog with type - Subroutine pool
    In that Write FORM statement for this PERFORM.
    FORM get_mvat_tin TABLES inttab STRUCTURE itcsy
                             outtab STRUCTURE itcsy.
      DATA : v_kunre TYPE kna1-kunnr,
             v_stcd1 TYPE kna1-stcd1,
             v_stcd2 TYPE kna1-stcd2.
      LOOP AT outtab.
        CLEAR outtab-value.
        MODIFY outtab.
      ENDLOOP.
      READ TABLE inttab INDEX 1.
      v_kunre = inttab-value.
      IF v_kunre CA sy-abcde.
      ELSE.
        UNPACK v_kunre TO v_kunre.
      ENDIF.
       " Here You can take your Funcion module ***************************
      SELECT SINGLE stcd1 stcd2 FROM kna1 INTO (v_stcd1, v_stcd2)
                                         WHERE kunnr = v_kunre.
      IF sy-subrc = 0.
        READ TABLE outtab INDEX 1.
        WRITE v_stcd1 TO outtab-value.
        MODIFY outtab INDEX 1.
        READ TABLE outtab INDEX 2.
        WRITE v_stcd2 TO outtab-value.
        MODIFY outtab INDEX 2.
      ENDIF.
    ENDFORM.                                

  • How to Add a New CGI-Handler to Web Server?

    I need to setup a website that will have pages coded in "LiveCode" (http://livecode.com/), an English-like scripting language, that can be used as an 'easier-to-program' replacement for PHP. It has its own interpreter ("livecode-server"), which is supposed to work under Apache as a cgi script. The idea is that the programmer writes web pages in LiveCode, composed of HTML with embedded LiveCode scripting, and these pages are saved using their own extension (".lc"). When a ".lc" page is requested, Apache should send the page for processing by the 'livecode-server' cgi.
    The installation instructions for 'livecode-server' are quite simple. They state that it should be able to be easily installed via an '.htaccess' file, like this:
    1) in the website's root directory, add a ".htaccess" file with the following directives:
    Options ExecCGI
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-server
    2) put the 'livecode-server' executable inside your 'cgi-bin' folder
    These instructions are obviously for users in a shared host environment, but I thought I should be able to do the same with OS X Web Server. But... where can I find a site's "cgi-bin" folder?
    Any guidance is truly appreciated.

    I tried using a custom httpd_livecode.conf file, and storing it in /Library/Server/Web/Config/apache2/other, but without success. To be totally honest, I'm not certain as to whether the configuration is not loading, or whether there is just something wrong with my syntax, and right now I just don't have the time to troubleshoot.
    I did manage to get it working with the .htaccess file, which was quite easy, once I knew where to put the executable - which, as you mentioned, had to be in /Library/Server/Web/Data/CGI-Executables.
    So, for future reference, the 'recipe' for adding a new cgi handler via .htaccess is:
    place the cgi executable (usually a language parser or interpreter) into
    /Library/Server/Web/Data/CGI-Executables
    make sure the parser/interpreter (and any accompanying files or directories) are readable and executable (usually permissions should be set to '755')
    in your site folder, add a .htaccess file with the following contents:
    Options ExecCGI
    AddHandler script-type .extensionType
    Action script-type /cgi-bin/script-interpreter
    In the case of LiveCode, my .htaccess file looks like this:
    Options ExecCGI
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-server
    And the 'livecode-server' executable, as well as its accompanying files, were downloaded directly from the LiveCode website, and placed in /Library/Server/Web/Data/CGI-Executables.
    last of all in Server.app, in the Advanced settings for your site, make sure you have enabled "Allow overrides using '.htaccess' files"

  • How can I replace the Python cgi script with CF

    I am testing the sample app and want to just use CF to track
    peer ids.
    Can you give me the api to the web service calls.
    I can then create the CFC to handle this.
    In order to use the sample application that you built, you
    need to setup your web server and host the provided Python script
    (reg.cgi) for exchanging peer IDs. Please note that setting up the
    web service is not needed for the hosted VideoPhone sample. In
    VideoPhoneLabs.mxml, please set WebServiceUrl accordingly. You may
    also use Google Apps to host this web service (minimal
    modifications required).
    The Python script should be placed in the cgi-bin location
    according to your web server installation. The database is an
    SQLite3 database. In reg.cgi, please edit the location of the
    database in variable dbFile.
    You also need to create a database scheme using the
    followings:
    CREATE TABLE registrations (
    m_username VARCHAR COLLATE NOCASE,
    m_identity VARCHAR,
    m_updatetime DATETIME,
    PRIMARY KEY (m_username)
    CREATE INDEX registrations_updatetime ON registrations
    (m_updatetime ASC);

    the sample web service we provided has the following API:
    to record peerID "1234" for username "foo", do
    http://your.domain/cgi-bin/reg.cgi?username=foo&identity=1234
    you should get back an XML document with result.update=true
    or false depending on whether the database was updated.
    to look up the peerID for username "foo", do
    http://your.domain/cgi-bin/reg.cgi?friends=foo
    you should get back an XML document like:
    <?xml version="1.0" encoding="utf-8"?>
    <result>
    <friend>
    <user>foo</user>
    <identity>1234</identity>
    </friend>
    </result>
    there will be no "identity" entry if the user is not found.
    the lookup is case-insensitive but case-preserving, so if you
    looked up "Foo", the user field would be "Foo" but there'd be an
    extra "registered" field with the username as it was registered.
    -mike

  • How can i call a CGI script from java?

    The subject pretty much says it all. I want to call a perl cgi script so i can read from/write to files on a server. I don't know how to sign applets and this would be the easiest way for me, if someone could please tell me.

    Let me get this clear. Basically what u want to do is to just call a URL, right?
    U can do it by using the following code:
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    public class testhttp
    public static void main(String[] args)
    try
    URL url = new URL ("http://../testcgi.cfm");
    HttpURLConnection cxn =
    (HttpURLConnection)url.openConnection();
    cxn.setRequestMethod("POST");
    cxn.setUseCaches(false);
    cxn.setDoOutput(true);
    cxn.setDoInput(true);
    ByteArrayOutputStream bytes = new
    ByteArrayOutputStream(400);
    PrintWriter writer = new PrintWriter (bytes,true);
    writer.print("application=map&release=1&items=prog1");
    writer.flush();
    cxn.setRequestProperty("Content-
    Length",String.valueOf(bytes.size()));
    cxn.setRequestProperty("Content-
    Type","application/x-www-form-urlencoded");
    bytes.writeTo(cxn.getOutputStream());
    System.out.println(bytes);
    String currentLine;
    BufferedReader in = new BufferedReader (new
    InputStreamReader(cxn.getInputStream(),"8859_1"));
    while((currentLine = in.readLine()) != null) {
    System.out.println(currentLine); }
    catch(Exception e) { e.printStackTrace(); }
    There is also a library called HTTP client which can be found at:
    http://www.innovation.ch/java/HTTPClient/index.html
    It's very simple to use and the documentation is all there, but their web server seems to be down right now.
    Anyway, hope my post helps.

  • Not able to get SSL related CGI Environment Variables?

    We are currently using APEX 3.2.0.x, OHS 10.1.3.x, and 11gR1 on linux. The APEX application we've been developing will be accessed via SSL and x509 certificates such that a client certificate is passed from a user's browser to the OHS, the information will be read from the certificate, and if the user's cert information exists in a user table associated with the application, they will have the role they've been assigned as an existing user within the application. Otherwise, the user will be a guest and have a minimum role accessing the application.
    We are certainly not guru's when it has come to setting up and configuring SSL and certs, but we have gotten to the point where we have all of the required certs created and installed, and the client cert passes it's information successfully to the OHS to get to the "home" page of the application via the Rewrite statement in the httpd.conf/ssl.conf that points to the appropriate https url. We are now at the point where we need the APEX application page to read the cert information, and this is where we are having problems.
    We have created an "On Load - Before Header" process and temporary item on the "home" page to display CGI environment variables to see what we're getting. It's a PLSQL Anonymous block like this:
    DECLARE
    lUserName VARCHAR2(100);
    BEGIN
    SELECT NVL(owa_util.get_cgi_env('REMOTE_USER'),'NOT POPULATED') INTO lUserName FROM DUAL;
    :P1_REMOTE_USERNAME := lUserName;
    END;
    We can grab any of the cgi environment variables that are listed in the OHS mod_plsql User's Guide. We cannot seem to be able to get any of the SSL CGI environment variables though. We are adding the SSL variables to the dads.conf via the PlsqlCGIEnvironmentList parameter (ex: PlsqlCGIEnvironmentList SSL_CLIENT_S_DN_CN) and bouncing the OHS as needed. Unfortunately, we have not been successful in getting any of them to show up in the item on the APEX page.
    As far as we can tell, we have the SSL/OHS/Certs configured, but may be there is another SSL directive or some other configuration item that we've missed that needs to be set in order for SSL CGI environment variables to be available to the owa_util.get_cgi_env function. If anyone can tell us what we may have missed, it would be appreciated.
    thanks
    bob

    Hey John,
    what we have found that we were not sure of is that we need to use Rewrite rules and conditions in the ssl.conf to grab the ssl cgi environment variables and "put" them into the request header to hold them like this:
    RewriteCond %{SSL:SSL_SERVER_S_DN} (.*)
    RewriteRule .* - [E=SSLS_DN:%1]
    RequestHeader add X-SSL-SERVER-S-DN %{SSLS_DN}e
    Then in the dads.conf put the request header reference in there with the plsqlcgienvironmentlist parameter like this:
    PlsqlCGIEnvironmentList HTTP_X_SSL_SERVER_S_DN
    Restart the OHS, and then grab the HTTP_X_SSL_SERVER_S_DN variable(s) via the owa_util.get_cgi_env in the APEX page to pull the value out with an anonymous block in an On Load - Before Header process like this:
    DECLARE
    lUserName VARCHAR2(100);
    BEGIN
    SELECT NVL(owa_util.get_cgi_env('HTTP_X_SSL_SERVER_S_DN'),'NOTHING HERE') INTO lUserName FROM DUAL;
    END;
    It's the Rewrite rules and putting them into the request header that we were not totally sure about as far as how and where you put the environment variables to make them accessible to the dads.conf with the PlsqlCGIEnvironmentList parameter that in turn makes them accessible to APEX. We're still not 100% sure this is the correct method, but it's working. We don't recall reading in any of the APEX docs, APEX forum threads, or other documentation about needing Rewrite rules and conditions to put the cgi environment variables into the request header to make them accessible to APEX. So, that seems to be our missing piece of the puzzle here.
    Anyway, I think we're okay for the moment, and may be this thread will help someone else out in the future. Thanks for your help John, and will give you a helpful plug on the forum for this thread. BTW, I do have your book, so it was nice to see someone as advanced with APEX as yourself reply to the posting.
    Thanks
    Bob

Maybe you are looking for