🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1793

Re: Has this CGI problem been solved (BCB 6 CGI cannot run under Windows 2003 Server)?

#1793
From: Hans Galema
Date: Wed, 07 Jul 2004 11:48
87 lines
3535 bytes
Lua Kim Teng wrote:

> My program is a simplest one, one line only:
> 
> Response->Content="Hello";

That is not the simplest one. Moreover I asked you if you used
special components or techniques. So you are using a special
component that has a property Response.

Which component is that ? It is not TIdHTTP is it ? As you
would not need IIS at all then.

> I am using Stand alone CGI. I transfer the program called bcb6cgi1.exe to my
> Windows 2003 server. I set the IIS to allow execution of
> 
> http://www.colips.org/cgi-bin/testcgi/bcb6cgi1.exe
> 
> and I received:
> HTTP 500 - Internal server error
> Internet Explorer
> If you do not believe, please run the above URL. I am sure you will get the
> same result.

I did. I got a specific errorreport:
Internal Server Error 500
Exception: EAccessViolation
Message: Access violation at address 77F4831D in module 'ntdll.dll'. Write of
address 40006D09

So are you using a NT dll on Windows 2003 Server ?

> Please give me your CGI and let me run on my machine.

helloworld.cpp:

#pragma hdrstop
#include <condefs.h>
#include <stdio.h>


//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char **argv)
{
                  // no headers
		 printf ("Content-Type: text/html\n\n");
		 printf ( "<html>\n" );
		 printf ( "<head>\n" );
		 printf ( "<title>hello world</title>\n" );
		 printf ( "</head>\n" );
		 printf ( "<body bgcolor=\"yellow\">\n" );
		 printf ( "<hr>\n" );

		 printf ( "<h1><font color=\"blue\">\n" );
		 printf ( "<center>\n" );

		 printf ( "Hello World" );

		 printf ( "</font></h1>\n" );

		 printf ( "</center>\n" );
		 printf ( "<hr>\n" );
		 printf ( "</body>\n" );
		 printf ( "<html>\n" );

		 return 0;
}

Please compile with bcb6. If that does not run you can get helloworld.exe
compiled and linked with bcb3 from me. If the latter then does run I will
consider eating my hat.

> You may also try my other CGIs compiled using BCB5 under exacting the same
> conditions.
> http://www.colips.org/cgi-bin/testcgi/bcb5cgi1.exe
> 
> This program works.

Indeed.

> I was told by the Singapore support person that CGIs compiled by BCB6 will
> not run under Windows 2003.

The Support person of which software/company ? Did you ask for the reason too ?

Hans.
Technical Details
Message-ID: <40ebe2cd@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.cwix.com!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40ea988c$1@newsgroups.borland.com> <40eaa096$1@newsgroups.borland.com> <40ebc94b@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,4f6d467f58b2d9dc
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 07 Jul 2004 13:48:49 +0200
From: Hans Galema <dontusethis@dontusethis.nl>
User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: Has this CGI problem been solved (BCB 6 CGI cannot run under
 Windows 2003 Server)?
References: <40ea988c$1@newsgroups.borland.com> <40eaa096$1@newsgroups.borland.com> <40ebc94b@newsgroups.borland.com>
In-Reply-To: <40ebc94b@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <40ebe2cd@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089200845 129.125.201.248 (7 Jul 2004 04:47:25 -0700)
Lines: 90
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.cwix.com!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail