[Xitami] Need some help from the Xitami OS/2 users. :)

Paul Reid xitami@lists.xitami.org
Tue, 28 May 2002 11:44:15 -0400


> I compiled the counters and the all compiled smoothly with no
> errors at all.  However Xitami seems to ignore them.

How do you call them in your HTML? Where did you put them so Xitami
would find them and know that they are to be executed? "Xitami seems
to ignore them" is really not much clue.

But back up. Do they run from the command line? Assume you have
compiled "amy.c" to "C:\Xitami\cgi-bin\amy.exe". Open a DOS command
window and type "C:\Xitami\cgi-bin\amy.exe". You should get a whole
lot of gibberish. If you look fast (or capture it in a file), the
first few bytes spell "GIF89a". (Actually, I think it says
"Content-type: image/gif" and two line-feeds before that.)

Does it do that?

It might not, because the code tests the environment variable
"PATH_INFO" (probably doing things different depending on if it
thinks a webserver called it). So try it this way:

C:
CD \Xitami\cgi-bin
set PATH_INFO=foo
amy > amy.txt
copy amy.txt amy.gif

(I assume that OS/2 command line syntax is DOS-Windows-ish. Check
it, especially the exact syntax for SET.)

Open amy.txt in a text reader, it should start "Content....GIF89a"
and be a lot of gibberish after that. Open amy.gif in an image
viewer, it should be a picture.

If it works from command line if PATH_INFO is not blank, the problem
may be that Xitami does not always supply PATH_INFO. in amy.c,
change PATH_INFO to SCRIPT_NAME (twice) and re-compile.

 -PRR