1. Xitami.EuCGI

I have a problem with using euphoria, with the xitami web server...It
seems the problem is with the euphoria program, not the server...
anyways, whenever I try to use the CGI program, I get a euphoria, error,
bad file number (-1).  It appears that  the environment variables aren't
being picked up by the eu program.  I've set up the xitami server
properly, to make use of such variables (CGI_STDOUT,CGI_STDIN, etc.
etc.)...

So, I ask, Daniel, in particular, how have you got everything set up?

Thank you,
Greg

--
Greg Phillips
i.shoot at rednecks.com
http://euphoria.server101.com
--

Useless fact of the day:

The thumbnail grows the slowest; the middle nail grows the fastest

new topic     » topic index » view message » categorize

2. Re: Xitami.EuCGI

At 02:15 AM 03-03-1999 , you wrote:
>I have a problem with using euphoria, with the xitami web server...It
>seems the problem is with the euphoria program, not the server...
>anyways, whenever I try to use the CGI program, I get a euphoria, error,
>bad file number (-1).  It appears that  the environment variables aren't
>being picked up by the eu program.  I've set up the xitami server
>properly, to make use of such variables (CGI_STDOUT,CGI_STDIN, etc.
>etc.)...
>
>So, I ask, Daniel, in particular, how have you got everything set up?
>
>Thank you,
>Greg

Hi Greg.

Yep... I got the same stuff. The problem is that Xitami doesn't send the
appropiate path for the CGI_STDIN and CGI_STDOUT files. I had to correct
them personally by doing :

cgi_stdout = getenv("CGI_STDOUT")
cgi_stdout = "..\\" & cgi_stdout

The problem is that (if your are using the default Xitami configuration)
these files paths are relative to the Xitami main directory (c:\xitami),
not from the cgi-bin directory.

BTW I'm working on other EuCGIs now: a guestbook system. In fact the "add
guest" CGI is ready. Go to http://www.dabersoft.xitami.net/ I added a nice
"menu" of available resources, follow the EuCGI link. I hope to have
running on some more minutes the view guests EuCGI. Come and visit me so I
know it works!


Regards,
         Daniel  Berstein
         [daber at pair.com]

new topic     » goto parent     » topic index » view message » categorize

3. Re: Xitami.EuCGI

The first Euphoria guestbook CGI system (just 2 CGIs in fact) is done and
available from:


http://www.dabersoft.xitami.net/

If you are lucky enough to catch me connected :P

Visit me and sign the guestbook.


Regards,
         Daniel  Berstein
         [daber at pair.com]

new topic     » goto parent     » topic index » view message » categorize

4. Re: Xitami.EuCGI

>The first Euphoria guestbook CGI system (just 2 CGIs in fact) is done and
>available from:

I downloaded Xitami and installed it on my 2nd computer, so I can learn how
to do CGI stuff, too. :) In the docs, its seems that .BAT files are
supported, too, but I haven't tested yet. (I used the #! exw file style
thing :)

Quick question about databases (like guestbooks) done in CGI:

How would you keep two or more users using the same script at the same time
from trampling all over the datafile as it's being written to? I know that
usually files are locked in a network envornment, but how would this be done
in Euphoria?

(Now, let's see... I'm only trying to complete 5 or 6 totally unreleated
projects at this time...)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Xitami.EuCGI

At 10:14 AM 05-03-1999 , you wrote:
>>The first Euphoria guestbook CGI system (just 2 CGIs in fact) is done and
>>available from:
>
>I downloaded Xitami and installed it on my 2nd computer, so I can learn how
>to do CGI stuff, too. :) In the docs, its seems that .BAT files are
>supported, too, but I haven't tested yet. (I used the #! exw file style
>thing :)

I've read that .BAT files may be unsecure (don't know why). One good thing
about 32-bit CGIs opposed to 16-bit (and .bat I presume) is that the
webserver can kill the process after a given timeout.

>Quick question about databases (like guestbooks) done in CGI:
>
>How would you keep two or more users using the same script at the same time
>from trampling all over the datafile as it's being written to? I know that
>usually files are locked in a network envornment, but how would this be done
>in Euphoria?

Key question. I haven't implemented no locking funcitonality on my EuCGIs
yet (BTW I'm downloaded the ADO/ODBC SDK and looking how to implement it on
Euphoria). I don't expect to have yet concurrent users (no one has signed
my guestbook yet).

A way to do it might be have a flag file or registry entry that tell the
file is under update. The CGI should wait for until a given timeout to see
if the flag is cleared.

This shouldn't be done by the write_to_dabatase CGI... it may crash and
leave the file eternally locked, but by a DBMS. You can create your own
EuDBMS that run's on systenm startup and recieves requests to read/write to
the database. The ideal interprocess comunication would be DDE, but it's a
bit complicated a first. A simpler solution would be a SendMessage() with
the message being the operation to perform, wParam as an LPSTRZ to the
database filename and lParam holding other requiered parameters (record
number?). Or even better, use shared memory (mmmm... looks like DDE ;) ).


>(Now, let's see... I'm only trying to complete 5 or 6 totally unreleated
>projects at this time...)

Good. I always do the same ;) Someday I'll finish them all.


Regards,
         Daniel  Berstein
         [daber at pair.com]

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu