Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 28 OCT 2008 05:41:59PM Paxton Scott wrote:

Greetings!

In my application that works fine with oecgi, I have found a case where I get a server error "…Premature end of script headers: oecgi2…."

Can anyone suggest where to look for this problem?

This is a new installation, just copied over oecgi2.exe

Have fun,

Paxton


At 29 OCT 2008 10:24AM Bob Carten wrote:

Paxton -

Premature end of script usually means that your inet program has hit the debugger. You can see what is happening if you run the soekterver so that the engines are visible. A simple way to do that is to set the engineserver to diply engines, then run it manually.

On the windows instance hosting the engineserver

start a cmd prompt

cd \OiDirectory

SC STOP OengineServer

notepad eserver.cfg, change Startupflags from 65 to 1

start java -jar oesocketserver.jar -D 2

The above steps wll let you observe the web requests as they execute, and if the program debugs you can step through it.

Note: Any time you change you inet routines you need to restart the engineserver, so it will restart the oengine(s), so they will load the new version of the program.

- Bob


At 29 OCT 2008 11:38AM Paxton Scott wrote:

Bob,

Thanks for this information, I will work on it.

But, since my INET_ works OK with oecgi, and has been for a long time, does this mean that there are other considerations that I should be aware of in constructing my INET_ to run cleanly with oecgi2 (OEngineServer)?

I have also seen this error in testing my php substitute for oecgi2.

Have fun,

Paxton


At 29 OCT 2008 12:24PM Bob Carten wrote:

since my INET_ works OK with oecgi, and has been for a long time, does this mean that there are other considerations that I should be aware of in constructing my INET_ to run cleanly with oecgi2 (OEngineServer)?

AFAIK OECGI and OECGI2 are interchangable. One thing that is different is that the socketserver will reuse engines whereas OECGI (in dynamic mode) creates a new engine for each task. This could lead to subtle errors. For example, I had an intermittent error caused by a named common mismatch in two programs. If program A ran first, when a second request called program B it failed because the common was too short. We never saw the problem under OECGI because it could not occur when each request got a clean engine.


At 29 OCT 2008 11:33PM Glenn Groves wrote:

[notag]I have found that (on occassion) OECGI and OECGI2 are not quite interchangeable, i.e. they do some things in a slightly different way… I have not had trouble with this for some time and I do not remember all the details.

What I do remember was that there was something different in the way they handled data being output, and to get around that I ended up returning @FM as the first part of the 'return' data if my inet_… program was being run by OECGI2. (My program looks for oecgi2 in Request<SCRIPT_NAME$> to determine if it is being run by oecgi2 or not.) If I remember correctly that causes OECGI2 to ignore anything before the @FM. That prevented anything (error messages or otherwise) returned from OI from causing trouble in the display of the page on the browser. It forced only my intentional 'return' data, that followed the @FM, to be sent back to browser. My inet_… program returns the @FM as the first character if run by OECGI2, and does not return the @FM if being run by OECGI.

Also, my inet_… program does not output the Content-type if run by OECGI2, and does if run by OECGI. From memory returning the Content-type via OECGI2 caused the Content-type information to be displayed within the browser.

I also remember an issue with data coming back from the browser, i.e. OECGI and OECGI2 pass the data back in a slightly different form. Apparently OECGI2 passes back the data in the recommend 'Web' encoding, while OECGI does not quite do all the same encoding - I think OECGI does less encoding. I was able to resolve that by making my routines 'decode' correctly, i.e. my routines 'decoding' data sent back worked for OECGI2, and caused no harm for OECGI, i.e. they decode regardless of whether OECGI or OECGI2 was used as it is either the correct thing to do or is harmless to do.

I am placing this post in the hopes that someone with more knowledge in this area will remember the details of the above, and provide appropriate details (or corrections). I.e. I realise that the information above may not be enough to allow developers to change their applications to work with both OECGI and OECGI2.

Also, it is possible that some of what my inet_… related routines do - as described above - is now out of date, i.e. may not be required etc. I only change things when they break, and the methods described above still work for me so I keep using them.[/notag]


At 05 NOV 2008 10:20AM Pascal Landry wrote:

I have found at least one item for which oecgi and oecgi2 are not interchangeable.

The use of "Select table By column keyword cursorvar Then | Else" is permitted in oecgi but oecgi2 returns this error on IIS6

"CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers."

Pascal Landry


At 05 NOV 2008 02:02PM Bob Carten wrote:

Glenn and Pascal

Thanks for the info.

We will be posting a fix to OECGI2 for the trailing null character mentioned in the first post of this thread.

I'm curious about the Reduce issue. I suspect it has to do with the user context used by OECGI versus the context of the OEngineserver. Specifically, I bet one has the right or drive map to make sort files while the other does not. Just a guess though.

"CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers."

This is usually a sign of a debug.

to see the debugger

change eserver.cfg to use StartupFlags=1,

stop the oengineservice,

start the oengineserver manually with

cd \revsoft\openinsight 8.0.7

start java -jar oesocketserver.jar -D 2

run your query, see if it hits the debug.

- Bob


At 05 NOV 2008 02:13PM Pascal Landry wrote:

I have resolved my issue of sort with some code change within my inet_ function. What I changed from sript 1 and 2 are the cursor value and the readnext key value "@ID".

This code will result in a misbehaved cgi error:

Select [/color]"DISTRICT_MASTER" [/color]By [/color]"NAME" [/color]Assigning [/color]1 [/color]Then 
    [/color]Done=[/color]0 
    [/color]Loop 
        ReadNext @ID Using [/color]1 [/color]By AT Else [/color]Done=[/color]1 
    [/color]Until [/color]Done 
        [/color]IF @ID [/color]NE [/color]"NS" [/color]and [/color]Xlate([/color]"DISTRICT_MASTER"[/color],[/color]@ID[/color],[/color]10[/color],[/color]"X"[/color]) [/color]Then 
            [/color]html := [/color]':[/color]@ID[/color]:[/color]'"' 
            [/color]If [/color]district EQ [/color]@ID Then [/color]html := [/color]' SELECTED' 
            [/color]html := [/color]]'[/color]:Xlate([/color]"DISTRICT_MASTER"[/color],[/color]@ID[/color],[/color]1[/color],[/color]"X"[/color]):[/color]''[/color]:cr$ 
        [/color]End 
    Repeat 
[/color] 
End[/color][/color][/size]         
               

This code will not:

Select [/color]"DISTRICT_MASTER" [/color]By [/color]"NAME" [/color]Assigning [/color]0 [/color]Then 
    [/color]Done=[/color]0 
    [/color]Loop 
        ReadNext [/color]ID [/color]Using [/color]0 [/color]By AT Else [/color]Done=[/color]1 
    [/color]Until [/color]Done 
        [/color]IF [/color]ID NE [/color]"NS" [/color]and [/color]Xlate([/color]"DISTRICT_MASTER"[/color],ID,[/color]10[/color],[/color]"X"[/color]) [/color]Then 
            [/color]html := [/color]':ID:[/color]'"' 
            [/color]If [/color]district EQ ID [/color]Then [/color]html := [/color]' SELECTED' 
            [/color]html := [/color]]'[/color]:Xlate([/color]"DISTRICT_MASTER"[/color],ID,[/color]1[/color],[/color]"X"[/color]):[/color]''[/color]:cr$ 
        [/color]End 
    Repeat 
     
End[/color][/color][/size]         
               

At 05 NOV 2008 02:21PM Pascal Landry wrote:

Bob,

Of course I checked this after I posted, because that's the type of guy that I am…

The error is caused by the cursor value only in my case. Cursor 0 is the only value that will work …why I had another value before, I'm not sure but it worked fine with oecgi.

Pascal Landry


At 05 NOV 2008 04:28PM Bob Carten wrote:

Thanks Pascal

I'll see if I can duplicate the problem

-Bob

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/17e3ee3e0bb4f962852574f000773363.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1