Page 1 of 4 1234 LastLast
Results 1 to 40 of 122

Thread: VB6 FastCGI Server

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    VB6 FastCGI Web App Server Framework

    NOW ON GITHUB - SOURCE CODE IN THIS THREAD WON'T BE UPDATED ANYMORE - GO TO GITHUB INSTEAD!! https://github.com/jpbro/VbFcgi

    This is a FastCGI web application server & framework written in VB6 for use with Nginx (and possibly other web server that support FastCGI).

    It handles FCGI_BEGIN_REQUEST, FCGI_END_REQUEST, FCGI_PARAMS, FCGI_STDIN, FCGI_STDOUT, and FCGI_STDERR records/communications quite nicely (currently being tested against the Nginx webserver). It can also launch itself as multiple processes to work against Nginx load-balancing features.



    Usage
    First you need to compile the latest source code (to vbFcgiHost.exe), then copy the compiled file and the vbRichClient5 DLLs (vbRichClient5.dll, DirectCOM.dll, and vb_cairo_sqlite.dll) to the same deployment folder.

    LATEST SOURCE CODE NOW ON GITHUB - SOURCE CODE IN THIS THREAD WON'T BE UPDATED ANYMORE - GO TO GITHUB INSTEAD!! https://github.com/jpbro/VbFcgi

    Next, you need a properly configured Nginx web server running, optionally with upstream load-balancing servers defined. For example, in nginx.conf, you might have something like this defined:

    Code:
    http {
       upstream backend {
             # Load-balancing across multiple FCGI listeners defined below
    	 server 127.0.0.1:9000;
    	 server 127.0.0.1:9001;
    	 server 127.0.0.1:9002;
    	 server 127.0.0.1:9003;
       }
    
       location ~ \.fcgi$ {
    			root html;
    			fastcgi_keep_conn on;
    			fastcgi_pass backend;  # This is where we've configured FCGI to be shipped out to our multiple listener process for load-balancing
    			fastcgi_index Default.aspx;
    			fastcgi_split_path_info ^(.*cgi)(/.*)$;
    			fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
    			fastcgi_param PATH_INFO $fastcgi_path_info;
    			fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
    			include fastcgi_params;
    	}
    
       # REST OF YOUR NGINX CONFIG
    }
    Next, start your vbFastCgi.exe process(es) from the command line (to match the load balancing configuration above you would use the following command line:
    vbfcgihost.exe /spawn 4 /host 127.0.0.1 /port 9000)

    You should see a browser page similar to the screenshot at the bottom of this page.

    That's it (other than coding your own responses)!




    Useful Resources
    Nginx Site: http://nginx.org/

    vbRichClient Site: http://www.vbrichclient.com

    FastCGI Spec: http://www.fastcgi.com/devkit/doc/fcgi-spec.html




    The following list of Gaps in Understanding and Known Issues will be updated as I go.

    Questions/Gaps in Understanding
    • The FastCGI protocol mentions that the web server can send SIGTERM to the FCGI server to ask it to close cleanly. Not sure how/if this is done in the Windows Nginx implementation since it handles it's FCGI communications over a TCP pipe and I've never received any message that I can identify as being related to SIGTERM.
    • Just bumped into SCGI as an alternative to FastCGI. Would it be better to use this protocol?
    • How should we handle the mixed "" "/" use in CGI parameters like DOCUMENT_ROOT on Windows? For example: DOCUMENT_ROOT = C:\Users\Jason\Downloads\nginx-1.7.9/html. Should I just convert all forward slashes to back slashes?
    • Answered by Olaf in Post #9 What does the CTcpServer.DataArrival FirstBufferAfterOverflow parameter mean? How should it be handled when TRUE?




    Known Issues
    • Not responding to all FCGI Roles. This is most likely a WONTFIX as I only need the RESPONDER role.
    • Not processing all FCGI record types (as of 0.0.5 only FCGI_DATA not supported, and I've never encountered it in the wild. The spec only says "FCGI_DATA is a second stream record type used to send additional data to the application." so I'm not sure when it applies, or what to do with the data in the stream.
    • FIXED IN 0.0.2 RELEASE Occasionally getting a "The connection was reset" error. Ngnix reports error: #5512: *263 upstream sent invalid FastCGI record type: 2 while reading upstream?





    NOW ON GITHUB - SOURCE CODE IN THIS THREAD WON'T BE UPDATED ANYMORE - GO TO GITHUB INSTEAD!! https://github.com/jpbro/VbFcgi

    Legacy Source Code vbFcgiHost.zip

    Version 0.0.8
    • Added support for parsing out HTTP query strings to key/value(s) pairs. Keys can have multiple values.
    • Added support for parsing out Cookies into Key/Value pairs.
    • Added htmlEscape function to ensure we're not sending special characters to the browser
    • Some tidy up, added missing variable type declarations on some functions.


    Version 0.0.7
    • Significant performance improvement by caching vbRichClient5.cCrypt object for re-use in DataArrival event (and elsewhere).


    Version 0.0.6
    • Changed the command line parameters (one fewer required, shorter switches)
    • When in SPAWNER mode, the process will monitor the LISTENER mode process for crashes, and restart crashed processes if necessary.
    • Mutex names are now instance specific based on the EXE path, allowing you to run multiple SPAWNER instances of vbFcgiHost.exe.
    • Additional comments and code cleanup


    Version 0.0.5
    Lots of changes - special thanks to Olaf for directing me to information about nginx load balancing across multiple FCGI listeners. This means we can avoid using threads, and just run multiple vbFcgiHost processes.
    • Renamed to vbFcgiHost (with a single vbFcgiHost.exe).
    • Now UI-less.
      To start listeners, use commandline vbfcgihost.exe /spawncount X /spawnstartport Y where X is the number of listener processes you want to create, and Y is the starting port number. For example, vbfcgihost.exe /spawncount 4 /spawnstartport 9000 will create 4 listener processes, one for each port from 9000 -9003.
      To stop listeners, use commandline: vbfcgihost.exe /stop
    • Now processing STDIN records
    • Better STDERR handling
    • Added new gc_MaxStdinInMemorySize configuration constant (bytes). STDIN streams at or below this size will reside in memory, STDIN streams above this size will be shuffled off to the filesystem.
    • Lots of code cleanup, new comments, and general improvements all around.


    Version 0.0.3
    • Added the gc_MaxResponseLoopSeconds configuration variable to allow you to tweak performance for multiple active requests (vs. relying on RC5 Timer granularity for short but many requests, or getting stuck on many but long requests).
    • General cleanup, and some error condition improvements
    • More comments!


    Version 0.0.2
    • Fixed bad value for FCGI_END_REQUEST constant (should have been 3, was 2)


    Version 0.0.1
    • So far we can process BEGIN, PARAMS, and STDIN requests from the web server, and respond with a basic web page listing all the received CGI parameters.
    • We can also handle Unicode transfer to the serve rin UTF-8 encoding.




    Browser Results Screenshot
    Name:  screenshot_appdemo.jpg
Views: 2253
Size:  46.6 KB

    Process Diagram
    You're only responsible for writing the stuff in BLUE. The startup/monitoring script/service is optional of course - you can just spawn the necessary process from a command line if you prefer Everything else is handled by the VBFCGI framework or third-party libraries/processes.

    Name:  diagram_processes.jpg
Views: 2537
Size:  45.9 KB
    Last edited by jpbro; Oct 14th, 2018 at 09:27 AM. Reason: NOW ON GITHUB - LATEST SOURCE UPDATES WILL NO LONGER BE POSTED HERE

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    First bug fix released (bad constant value for FCGI_END_REQUEST).

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [Experimental] VB6 FastCGI Server

    Nginx web server already is a FastCGI server. Maybe you can explain where this code of yours fits in.

    Is it a second server sitting between a FastCGI program and Nginx web server or something? Or is this a FastCGI client class used to write VB6 FastCGI programs?

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    It's entirely possible I've got terminology wrong - I've only just started mucking about with Nginx and FastCGI this weekend.

    Based on my reading of a few different resources (and what I'm getting from Nginx over TCP) I thought I was creating a FastCGI "server", which would parse FCGI records, and pass this on to an FCGI "application", which would pass a response back to my "server", which would parse it into an FCGI response and send that back to the Nginx web server. Looking again, maybe my entire end of things is just an FCGI "application" according to the spec.

    In any case, I'll clean up the terminology as it becomes clearer to me, but here's what I'm doing:

    Nginx has a fastcgi_pass configuration variable, which can be set to something like 127.0.0.1:9000. I can then bind to my program to 127.0.0.1:9000 and start receiving what appear to be raw FastCGI records like Params, STDIN, over TCP from Nginx.

    From there I'm parsing out the raw FastCGI records and building objects based on those records in VB6 (this is what I thought was the FCGI "server" part of my code, but I'm willing to admit it looks like this is the wrong term). From there I can build HTTP responses (this is what I thought was the FCGI application portion, but my terminology may again be wrong.) to send back to my FCGI server, which would then respond to web server in the form of FCGI StdOut, StdErr records. Nginx takes the STDOUT response and delivers that to the browser.

    Essentially, my current and possibly inaccurate mental model (or at least bad terminology for this mental model) is this:

    Browser > Web server > FCGI Server > FCGI Application > FCGI Server > Web Server > Browser

    Which perhaps instead should perhaps be this:

    Browser > Web/FCGI Server > FCGI Application > Web/FCGI Server > Browser

    Colour Key: Nginx and My Demo Code

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    So my confusion is based on the following sentences from the FastCGI spec. Interesting terms in bold:

    This specification has narrow goal: to specify, from an application perspective, the interface between a FastCGI application and a Web server that supports FastCGI.

    AND

    FastCGI is designed to support long-lived application processes, i.e. application servers. That's a major difference compared with conventional Unix implementations of CGI/1.1, which construct an application process, use it respond to one request, and have it exit.

    My initial reading of the above lead me to believe that what I was creating an application server which I guess I shortened to just server or FCGI server, perhaps wrongly in terms of clarity.

    Later parts of the FCGI spec seem to drop the word server entirely (unless referencing the web server), and reference the FastCGI application, or even just the application.

    Some searching of other FCGI code out there that is performing the similar task has shown me that they are sometimes even called FCGI Interfaces - as a go-between the web server's raw FCGI requests, and something like Perl CGI scripts.

    My current thinking is that what I'm working on would properly be called an FCGI Application Server, and that this can just be shortened to FCGI Application, but my confidence is not terribly high in this regard.
    Last edited by jpbro; Feb 11th, 2015 at 12:56 PM.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update Released.

    0.0.3
    • Added the gc_MaxResponseLoopSeconds configuration variable to allow you to tweak performance for multiple active requests (vs. relying on RC5 Timer granularity for short but many requests, or getting stuck on many but long requests).
    • General cleanup, and some error condition improvements
    • More comments!



    Questions/Gaps in Understanding
    • For Olaf, if you are reading: What does the RC5 CTcpServer.DataArrival FirstBufferAfterOverflow parameter mean? How should it be handled when TRUE?

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by jpbro View Post
    FastCGI is designed to support long-lived application processes, i.e. application servers. That's a major difference compared with conventional Unix implementations of CGI/1.1, which construct an application process, use it respond to one request, and have it exit.

    My initial reading of the above lead me to believe that what I was creating an application server which I guess I shortened to just server or FCGI server, perhaps wrongly in terms of clarity.
    At a certain point words like server and client can get confusing because they describe roles, and any given bit of running code can have more than one role at the same time.

    But it sounds like what you are making is an interface API: code to help a VB6 "application server" communicate with a FastCGI web server.


    All of that is less interesting to me than the reasons or possible use cases for ever doing any of this. Why would anyone want to? Is this just a matter of showing how it can be done? Because I don't see any practical use for it today.

    If a VB6 application needs to be able to respond to HTTP requests you can just write the code inline or use a 3rd party component. Such programs can't really use FastCGI, because in that relationship they need to be under the thumb of the FastCGI web server and shouldn't have a visible user interface at all. Normally such a server starts and stops such programs as needed.

    I can live with "just because" as a reason, but as I said I can't imagine anyone using it as part of a practical solution to anything.

  8. #8
    Addicted Member
    Join Date
    Jun 2002
    Location
    Finland
    Posts
    169

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by dilettante View Post
    I can live with "just because" as a reason, but as I said I can't imagine anyone using it as part of a practical solution to anything.
    I can see many reasons other than "just because".

    One example. You have www-server on Amazon and some legacy VB6 apps around world. Those legacy apps talks to external devices, HVAC, Pumps, Vending Machines, etc.
    With VB6/FastCGI you can easily build one www-interface to you devices, everything in one url http://MyLegacyDevices

    Sometimes rs232/rs485 is only interface for older devices. Of course there is other solutions to connect older devices to internet but usually they are not cheap.

  9. #9
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by jpbro View Post
    • For Olaf, if you are reading: What does the RC5 CTcpServer.DataArrival FirstBufferAfterOverflow parameter mean? How should it be handled when TRUE?
    The cTcpServer (Listener-) Class can be started with a "BufSize-Parameter", which one can
    adjust (with a good reserve, depending on the expected "worst-case-timing-behaviour").

    E.g. when you design your own simple client-protocol as:
    [4Bytes which represent a Long-Value, describing the byte-length of the following Blob-Packet]
    [Blob-Bytes the Client sends, according to the preceding, simple 4Byte-Header]

    And the Client then sends (very fast):
    [4byte-header][Blob][4byte-header][Blob][4byte-header][Blob]...

    ...to the Server (which does automatic buffering) - then you can only rely on that simplified
    protocol to work "properly aligned" (inside your Servers DataArrival-Event), when you stay
    "in sync" with the 4Byte-Headers, never missing a single Byte in the Stream, from the time
    the connection was accepted at the Server-end.

    The automatic Buffering will help with the "never missing a single Byte"-part -
    but in the (potential) case it runs out of space (because you didn't dequeue fast enough
    within DataArrival), then there *will* be Bytes missing, since in that case (incoming bytes
    exceed the yet available queue-space) the connection in question will automatically clear
    the Buffer-queue completely (now having enough space again, to buffer the next
    incoming bytes, and so the buffering continues ... - but you will need an information
    about that "hickup" -> with FirstBufferAfterOverflow = True...

    This way you will know you're out of sync (within the Servers DataArrival-Event) and can
    undertake "special efforts" (which you normally avoid for performance-reasons), to find
    the right "syncing-point" again (the beginning of a new 4Byte-Header "by other means",
    which performance-wise can be costly - and is normally not necessary)...

    So, that's it in a nutshell.
    Easiest way to ensure "resyncing" in such a case (using such a simple, but fast performing protocol),
    is to simply disconnect that client (which will get noticed at the clientside in the appropriate Disconnect-
    Event - and thus the Client can react to that relative fast, by simply performing a re-connect -
    resulting in a new assigned "accepting-socket" on the end of the cTCPServer-Instance - including
    a fresh Buffer-Queue - and a properly "aligned" new protocol-handling on this new connection...


    Olaf
    .
    Last edited by Schmidt; Feb 11th, 2015 at 05:24 PM.

  10. #10
    Addicted Member
    Join Date
    Jun 2002
    Location
    Finland
    Posts
    169

    Re: [Experimental] VB6 FastCGI Server

    Quick question to Olaf, will there be websocket support in your cWebServer.

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by pekko View Post
    Quick question to Olaf, will there be websocket support in your cWebServer.
    Not planned anytime soon currently...

    Other than the cRPCListener-Class, the cWebServer is not working multithreaded so far,
    mainly thought as a "simple to fire-up" Process-internal WebServer, to ensure App-
    internal Browser-Interaction - or to allow for simple "App-Remote-Scenarios" (e.g. when
    you want to press a few App-Buttons on certain Forms remotely over your Phone or Tablet -
    stuff like that).

    Feel free to submit a CodeBank-entry in case you want to implement it in the appropriate
    Request-Handler-Event of cWebServer - and in case you did some nice "Ground-Work",
    I'd be willing to take part in the efforts to "make it more stable" or so - but I don't
    have the time currently to start something like that on my own, "for the fun of it"...

    Olaf

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update Released.

    Version 0.0.5
    Lots of changes - special thanks to Olaf for directing me to information about nginx load balancing across multiple FCGI listeners. This means we can avoid using threads, and just run multiple vbFcgiHost processes.

    • Renamed to vbFcgiHost (with a single vbFcgiHost.exe).
    • Now UI-less.

      To start listeners, use commandline vbfcgihost.exe /spawncount X /spawnstartport Y where X is the number of listener processes you want to create, and Y is the starting port number. For example, vbfcgihost.exe /spawncount 4 /spawnstartport 9000 will create 4 listener processes, one for each port from 9000 -9003.

      To stop listeners, use commandline: vbfcgihost.exe /stop
    • Now processing STDIN records
    • Better STDERR handling
    • Added new gc_MaxStdinInMemorySize configuration constant (bytes). STDIN streams at or below this size will reside in memory, STDIN streams above this size will be shuffled off to the filesystem.
    • Lots of code cleanup, new comments, and general improvements all around.

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update Released.

    Version 0.0.6
    • Changed the command line parameters (one fewer, shorter switch names)
    • When in SPAWNER mode, the process will monitor the processes in LISTENER mode for crashes, and restart crashed processes as necessary.
    • Mutex names are now instance specific based on the EXE path, allowing you to run multiple SPAWNER instances of vbFcgiHost.exe


    Regarding the command line changes, starting in SPAWNER mode now uses the following switches:

    /spawn X
    Spawn X processes in LISTENER mode.

    /host X
    Bind to adapter on IP address X

    /port X
    Start binding on port X, +1 for each additionally spawned listener process

    /stop
    Stops all running vbFcgiHost processes started from the same path.
    Last edited by jpbro; Feb 22nd, 2015 at 10:29 PM.

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update Released.

    Version 0.0.7
    • Significant performance improvement by caching vbRichClient5.cCrypt object for re-use in DataArrival event (and elsewhere).

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update Released.

    Version 0.0.8

    I recommend you get the latest vbRichClient5 for use with this version, though I don't think it is mandatory.

    Changes:

    • Added support for parsing out HTTP query strings to key/value(s) pairs. Keys can have multiple values.
    • Added support for parsing out Cookies into Key/Value pairs.
    • Added htmlEscape function to ensure we're not sending special characters to the browser
    • Some tidy up, added missing variable type declarations on some functions.

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Hate to dig up an old thread of mine that generated little interest, but I've moved along quite a bit with this project over the past 8 months or so (including some exciting feedback from users), and I'm curious if anyone is interested in a WEB<>VB6 code bridge over Nginx/FCGI or not. It's a nice way to bridge your legacy VB6 code with the modern device world such as tablets/smartphones (of course, you have to do all the HTML, JS, CSS yourself, but Nginx does all of the hard work, and my FCGI classes do all the bridging).

    While I started with a vanilla VB6/vbRichClient5 solution (provided above), I now ask because I've since moved to use more of my own private + third party libraries more often. I'm afraid I'll pass the point of no return soon (if I haven't already) where it will take too much of my free time (i.e. more than I have available) to decouple the freely distributable vs. non-freely distributable code so as to still be of use to the remaining VB6 community.

    So I guess this is a "speak now or forever hold your peace" kind of moment
    Last edited by jpbro; Oct 13th, 2018 at 01:00 PM.

  17. #17
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: [Experimental] VB6 FastCGI Server

    G'Day JPBro

    It is really interesting what you have done with this code.

    I recently returned to a VB6 app. & I'm looking at now creating my 1st CGI VB6 'app.'

    Quote Originally Posted by jpbro View Post
    So I guess this is a "speak now or forever hold your peace" kind of moment

    So I'm hoping I'm not tooooooooo late !!!!

  18. #18

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Hi jg.sa! Not necessarily too late - my personal version of the FCGI application server has evolved quite a bit since my last post here on the public version, and like I said I'm now using some closed source pay-to-license libraries for parts, so I will have to spend some time re-implemented stuff using freely available libraries and code. I'm thinking it might be worthwhile to put it up on GitHub, so I'll try to find the time to do this soon (I'll post back here when it is available).

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by dilettante View Post
    All of that is less interesting to me than the reasons or possible use cases for ever doing any of this. Why would anyone want to? Is this just a matter of showing how it can be done? Because I don't see any practical use for it today.
    Almost 2 years for a reply from me, how's that for responsiveness

    For me there are 2 primary reasons for the existence of this project:
    • To use as much of my existing VB6 code (developed over years) for an network enabled application based on vbRichClient5 RPC classes, and be able to get data from that application to the browser with a minimum amount of effort, duplication of effort programming-wise.
    • To take advantage of Nginx's HTTPS, load balancing, and proxying features.


    For the first point, I already have a client-server system programmed and working well in VB6, but the client portion is naturally Windows only. Users are demanding more access via tablets & smart phones which I want to provide. Being able to use all of my existing backend code, and just add some interfacing code to generate HTML was very appealing. The beta web app took less than a week to develop, because all of the heavy lifting was already done on the backend for the full featured native client application.

    The second point should be self-evident - there's nearly infinitely less effort in using Nginx then trying to roll my own HTTPS server with load-balancing and proxying features. My users' data can be sensitive, so HTTPS was required - even the experts sometimes muck up when dealing with HTTPS implementations, so that was a can of worms I did not want to open myself.

    Why Nginx specifically? It can be distributed easily under 2-cluase BSD license without requiring a second installer/purchasing additional licenses. That "no second installer" part is also one of the same reasons I chose SQLite via vbRichClient5. My users appreciate the simple and straightforward installation that my application provides as not all of them have IT departments at their behest.

    Quote Originally Posted by dilettante View Post
    I can live with "just because" as a reason, but as I said I can't imagine anyone using it as part of a practical solution to anything.
    So definitely not "just because" - I'm using FCGI application server code as part of a practical solution today (and for almost 2 years now). It has performed well in real-world use, and saved me a tonne of time getting my existing Windows-only application onto the web (albeit in a pared-down form right now - not all of the features of the native app are available on the web version).

    This configuration ensures that my users can access their data from any device, anywhere - laptop, desktop, smartphone, tablet - on the LAN or out in the field, and that they can do so with minimal configuration or fuss on their end.

    For those who prefer images, here's a basic look at it (just whipped this up now, so there may be errors, but it should get the message across):

    Name:  Network Diagram.jpg
Views: 3261
Size:  35.0 KB

  20. #20
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: [Experimental] VB6 FastCGI Server

    G'Day JPBro

    In one word W O W

    What you have done is amazing

    I have approx. 10 desktop VB6 apps. I have been using personally as well as having sold/rented them in the past, but it was just a hobby not even paying for the costs of servers ( I host my own ) & the static IPs ( I have 9 ) and the software licenses etc., all of them are what I call Web 0 ( Client / Server ), this was mainly due to the need for them not to go Jurassic park on me & I wanted really good security around what emails were being sent, how many were being sent and to who they were being sent !!!

    One app. allows children to send email, but not receive, this same app can also be used to allow staff to send email as the boss, but not receive & this app could have been easily used to send spam. Think of a retail situation & the staff can order from suppliers of bread with the bosses email, but the staff cannot read the incoming emails - like bank statements in Outlook.

    In the past I was going to make an effort to setup a dealer network to manage the apps. as you need advanced knowledge of SMTP to setup and manage these apps. Basically I'm using a loop hole in the way ISPs setup their SMTP servers in OZ & NZ, dont know if this is the same in the rest of the world, but I have always suspected it is.

    As an old IBM programmer of Assemble, Fortran, Cobol, C, Ada ... I have setup a web sites using IBM Domino, but I always wanted to be 'free' of big blue, I have got NGinx front ending Domino HTTP & I have built a 'Proof of Concept' web site for dealers to register and it allows them to manage (Add, Delete, Modify) the To email addresses/contacts as the app. has no way of permitting the To list to be managed locally, this means I always know exactly who a user can send To & hopefully control the possible spammer - notice I didn't say 'stop'.

    All of my customers are using PCs, but I always wanted a design that would allow for mobile, because I have a customers who has a locksmith business and they wanted to be able to send from tablets in the field & I got them to buy cheap Win X tablets instead.

    So it is really good timing for me to have found this post.

    Can you flick me a link so I can 'Sign up' ???

    As I said I have built a VB6 CGI app. & I'm not certain it is 'appropriate' code as I live in rural Oz in a town of approx. 2000ppl I dont know anyone else who can code let alone Web 0 I have always wondered if I should have found a framework to see how the 'professionals' are doing VB6 CGI, before I start down the path of creating my own.

    I used info from pages like

    http://www.aivosto.com/visdev/cgi.html
    http://www.angelfire.com/mi4/bvo/vb/vbgb.htm

    So my CGI is a 'mashup' of what I have read & scrounged.

    Can you point me to a page that provides a really good VB6 CGI framework ?

    TIA

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Thanks for the kind words jg.sa and thanks for your interest in the project!

    I've just migrated everything to GitHub here: https://github.com/jpbro/VbFcgi

    I've also made some improvements to the code to make it easier to develop your own FCGI applications as separate DLLs (almost acting as a plugin to the VbFcgiHost.exe that is included and will hopefully remain fairly static/unchanged except for bug fixes).

    The biggest barrier getting existing VB6 stuff onto the web will be if you haven't coded the "server" side of your current client-server applications to be UI-less, as any UI will just get in the way here. If you have a server-side DLLs with public methods that you can call that return things like strings, recordsets, etc... then you can reference those DLLs in the VbFcgiApp.dll and code against them in the IFcgiApp_BuildResponse method. That's where you'll build your HTML responses (or JSON or whatever you want to respond to the browser with) and then send it back over using the methods of the CFcgiUpstream object that gets sent with every IFcgiApp_BuildResponse call.

    I'm sure that sounds really confusing, so if you're like me you'll want to take a look at some demo code. I've included a small FCGI demo application in the Git repository for study, so I recommend giving that a look. Feel free to get back to me here (or on GitHub) if you have any questions.

    Enjoy!

    Re: A good VB6 CGI framework - Sorry I don't know of any. I've firmly planted myself in my VB6 FCGI framework at this point!

  22. #22
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: [Experimental] VB6 FastCGI Server

    G'Day JPBro

    Quote Originally Posted by jpbro View Post
    Thanks for the kind words jg.sa and thanks for your interest in the project!
    Stop blushing

    Quote Originally Posted by jpbro View Post
    I've just migrated everything to GitHub here: https://github.com/jpbro/VbFcgi
    Thanks for doing that, I will DL ASAP

    Quote Originally Posted by jpbro View Post
    I've also made some improvements to the code to make it easier to develop your own FCGI applications as separate DLLs (almost acting as a plugin to the VbFcgiHost.exe that is included and will hopefully remain fairly static/unchanged except for bug fixes).
    Ok, that is good for me, I cant believe that you would have any 'Bugs'

    Quote Originally Posted by jpbro View Post
    The biggest barrier getting existing VB6 stuff onto the web will be if you haven't coded the "server" side of your current client-server applications to be UI-less, as any UI will just get in the way here. If you have a server-side DLLs with public methods that you can call that return things like strings, recordsets, etc... then you can reference those DLLs in the VbFcgiApp.dll and code against them in the IFcgiApp_BuildResponse method. That's where you'll build your HTML responses (or JSON or whatever you want to respond to the browser with) and then send it back over using the methods of the CFcgiUpstream object that gets sent with every IFcgiApp_BuildResponse call.
    I have built a few server 'addins' for IBM systems so I am very familiar with the concepts, the first thing I add to any of the CGI code I DL is a debug text file.

    But, FCGI is all new to me !!!

    Quote Originally Posted by jpbro View Post
    I'm sure that sounds really confusing, so if you're like me you'll want to take a look at some demo code. I've included a small FCGI demo application in the Git repository for study, so I recommend giving that a look. Feel free to get back to me here (or on GitHub) if you have any questions.
    No you are not

    Quote Originally Posted by jpbro View Post
    Enjoy!
    I will, I'm really looking forward to using VB6 text manipulation facilities to generate HTML

    Quote Originally Posted by jpbro View Post
    Re: A good VB6 CGI framework - Sorry I don't know of any. I've firmly planted myself in my VB6 FCGI framework at this point!
    I didnt think any were lurking that I hadnt found, I have been searching for a few months off and on now !!!

    I guess my biggest question is, why the code I have DLed does not have any JS for client side validation or using Angular or jQuery or ... FWs

    The code I'm thinking about will use a FW & do lots of good stuff like validation etc.

    I really wanted to understand how to use what I would call server side 'includes', I have many sites that use code like

    < script type="text/javascript" src="js-inc/head.js"> < /script>
    .
    .
    .
    < script type="text/javascript" src="js-inc/iframeinclude.js"> < /script>

    I started using this in the late '90s & I know it is not considered the best, but if you dont have a server like PHP or ASP etc. then this is the easiest

    BTW - I checked out your web site - statslog which is so good I might 'borrow' a copy

    I really like the site & the app concept, but I couldnt find any CGI except some code to serialise (Oz spelling, not US) the form.

    '/cgi-bin/trial.pl',
    serializedformdata,

    Can you flick me a link to a web site that has your CGI in it ?

    TIA

    Grasshopper

  23. #23

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    One thing I didn't mention previously in this thread is that the FCGI code (and the vbRichClient5 library that it uses for parts) works well on Linux under Wine (Windows compatibility layer https://www.winehq.org/).

    This has a few benefits:

    • There are a lot of reasonably priced VPS providers out there where you can install a Linux image and then install your FCGI app to make it available on the web. They are typically cheaper than the Windows alternatives.
    • Because Wine runs as separately per-user, it's almost like having multiple versions of Windows on a single computer. This allows you to offer different tiers of service with different pricing. For example, a single user might jump on a shared VPS for a lower price, while a small to mid-size company might want their own unshared VPS for a higher price. Larger enterprises might want their own co-located server, or run it all in-house (they may still insist on Windows but at least all options are available).
    • Wine is not like Windows 10 (always on automatic updates). You can more or less freeze yourself at a point in time/particular feature-set on the server-side without having to worry about one of Microsoft's half-baked updates ruining your day. As long as you keep your hosting Linux OS up to date for security patches, and lock it down in terms of unnecessary open ports, install software like fail2ban, logwatch, etc.. you should be reasonably safe.


    Just wanted to make it known that Linux is a viable possibility here, and that you're not 100% locked into MS if you use this.

  24. #24
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: [Experimental] VB6 FastCGI Server

    Hello Admins.

    I have tried to post here 3 x times today & I'm having issues with

    - Auto save saying it cant
    - Post that just dont
    - Having to login over & over again

    Whats happened to my posts ???

  25. #25

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Quote Originally Posted by jg.sa View Post
    G'Day JPBro
    Stop blushing
    Done


    Quote Originally Posted by jg.sa View Post
    Thanks for doing that, I will DL ASAP
    Very welcome! I hope this project gets some traction this time around.



    Quote Originally Posted by jg.sa View Post
    Ok, that is good for me, I cant believe that you would have any 'Bugs'
    Well prepare yourself to be disappointed Joking aside, there are almost definitely some bugs that will pop up, but I'll do my best to take care of them in a timely manner.



    Quote Originally Posted by jg.sa View Post
    I have built a few server 'addins' for IBM systems so I am very familiar with the concepts, the first thing I add to any of the CGI code I DL is a debug text file.

    But, FCGI is all new to me !!!
    Good to know you're coming in to it with a solid technical base. FCGI is relatively new to me too, so we'll do some learning together.


    I didnt think any were lurking that I hadnt found, I have been searching for a few months off and on now !!!

    Quote Originally Posted by jg.sa View Post
    I guess my biggest question is, why the code I have DLed does not have any JS for client side validation or using Angular or jQuery or ... FWs

    The code I'm thinking about will use a FW & do lots of good stuff like validation etc.
    JS, Jquery, Angular, or any other browser-side frameworks/libraries can be added when you build your HTML on the VB6/server-side. Alternately, you can have all of the JS files and web-pages as static resources on your web-server, and your VB6 FCGI app could just process AJAX queries and return JSON strings, text strings, etc... for dynamic parts. Part of the job upfront will be sitting down and figuring out what parts of the larger system (web server, FCGI application, browser) will be best served doing what.

    I really wanted to understand how to use what I would call server side 'includes', I have many sites that use code like



    Quote Originally Posted by jg.sa View Post
    I really like the site & the app concept, but I couldnt find any CGI except some code to serialise (Oz spelling, not US) the form...Can you flick me a link to a web site that has your CGI in it ?
    The demo FCGI app on GitHub is very basic and lean, and doesn't do any query parameter parsing or responding yet. It just builds a simple HTML page with the FCGI parameters it received and spits it back upstream. I will be adding soon the query parameter parsing stuff soon - it is already in my private version of the FCGI application server, but I used some paid third-party libraries to make my life a bit easier, so I'll have to work on some open-source replacements which might take a bit of time.

  26. #26

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Big update over at GitHub.

    It's important to note that binary compatibility has been broken. I don't think anyone is using this yet, but if you are then you should unregister the existing VbFcgiLib.ll and VbFcgiApp.dll before installing the latest versions an re-registering. Note that the IFcgiApp interface has changed, so if you've done any custom code you will have to modify it to support the new ProcessRequest() method (replaces the old BuildResponse method)

    I've added a number of new classes:

    CHttp, CHttpCookies, and CHttpQueryParams
    The CHttp object will be passed as part of the CFcgiRequest object to downstream FCGI apps. It has properties for CHttpCookies (for getting and setting cookies), and CHttpQueryParams (for getting query string parameters as sent from the upstream web browser).

    Also, the FCGI host can now handle multiple FCGI apps with different names. Here's how it works:

    When a URL is passed from the browser such as http://localhost/myapp.fcgi, the FCGI host will take the "myapp.fcgi" and look for that file in the same folder. It will then attempt to create an CFcgiApp class from that file. Note that .fcgi files are just regular VB6 Active DLL files with the extension changed.

    When you want to make your own FCGI app, simply start a new ActiveX DLL project, reference the VbFcgiLib.dll, and change the default Class1 class name to CFcgiApp.

    In your CFcgiApp class, add "Implements VbFcgiLib.IFcgiApp" to the General section, and then add "Private Sub IFcgiApp_ProcessRequest(po_Request As VbFcgiLib.CFcgiRequest, po_Response As VbFcgiLib.CFcgiResponse)". The IFcgiApp_ProcessRequest sub is where you do all of your response building.

    After compiling your DLL, make a copy in the same folder as VbFcgiLib.dll and VbFcgiHost.exe, and then rename the extension from .dll to .fcgi. That should be enough to make it accessible from the browser (assuming a properly configured web server and running VbFcgiHost.exe).

    I still have to add a bunch of comments, documentation, and update the demo to show how things like cookies and query parameter processing work, but I hope that will come soon.

  27. #27
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [Experimental] VB6 FastCGI Server

    Very nice. It's a great thread.

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Thanks @dreammanor!

    Another update at GitHub - I've updated the demo application to show how Cookies and Query Parameters can be used to generate dynamic page content.

  29. #29

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Some more updates at GitHub including some important bug fixes (told you there were bugs jg.sa! ).

    Biggest issue I have right now is that Cookies only seem to work with Firefox (Chrome, Edge, IE all fail). I've looked at the Network inspector in Chrome and it seems to be receiving cookies and sending them back on subsequent requests, but for some reason they aren't getting from Nginx to my FCGI app server. I'd appreciate any insights any of you might have on this!

  30. #30
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [Experimental] VB6 FastCGI Server

    I have to wait until my current project is completed before I can begin to learn and use your excellent code. I found a message that I don't know whether it's useful to you:

    https://serverfault.com/questions/61...-reverse-proxy

  31. #31

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Hi dreammanor, thanks for that link it was useful but unfortunately it didn't help. I tried editing my hosts file to get a domain to point to 127.0.0.1 and then I used that domain for my cookie, but I'm still not getting back from the webserver.

    I've done a bit more testing and I think there might be a bug in my FCGI parameter parsing (an off by one error or perhaps a miscalculation of the size of the payload from the webserver). What I've noticed by looking at the inspector is that Chrome is sending the Cookie header as the last entry of the request, but Firefox has it somewhere in the middle. When I copy and paste the request header from Chrome into the Firefox the developer tools window and resend, then Firefox exhibits the same problem as Chrome.

    I'll do some more testing and figure out where I'm going wrong, but thanks again for doing some research!

  32. #32

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Found the source of the problem - I was miscalculating when I should exit the loop that deserializes FCGI parameters by 1 record (8 bytes). I'll have an update posted to GitHub soon.

  33. #33

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Update has been posted to GitHub to fix the bad loop-end calculation for FCGI_PARAMS deserialization.

  34. #34

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    New update over at GitHub. Biggest new feature is an HTML builder/helper class that makes it easier to build HTML responses. For example:

    Code:
    Public Sub TestBuilderHtml()
       Dim x As New CBuilderHtml
       Dim l_TagIndex As Long
       
       x.AppendDocType htmldoctype_Html5
       x.OpenTags "html"
       l_TagIndex = x.OpenTags("head")
       x.AppendWithTag "Test page", "title"
       x.CloseOpenedTagsToIndex l_TagIndex
       x.Append vbNewLine
       
       x.OpenTags "body"
       l_TagIndex = x.OpenTags("table", "tr")
       x.AppendWithTag "This is a test & stuff.", "td"
       x.CloseLastOpenedTag
       x.OpenTags "tr"
       x.AppendWithTag "This is a test2.", "td"
       x.CloseOpenedTagsToIndex l_TagIndex
       
       x.OpenHyperlinkTag "http://www.github.com"
       x.Append "Visit GitHub"
       x.CloseAllOpenedTags ' Optional, calling Finished will also take care of this.
       
       x.Finished contentencoding_UTF16_LE
       
       Debug.Print x.Content
    End Sub
    Produces the following HTML:

    Code:
    <!DOCTYPE html>
    <html><head><title>Test page</title></head>
    <body><table><tr><td>This is a test &amp; stuff.</td></tr><tr><td>This is a test2.</td></tr></table><a href='https://www.github.com' >Visit GitHub</a></body></html>
    Enjoy!

  35. #35

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    PS: @dreammanor - your link re: cookies with IP addresses ended up being good knowledge for MS Edge. It doesn't accept cookies with an IP domain. Looks like Chrome does accept them now (as does IE).

  36. #36

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Just a test...keep getting a SOMETHING WENT WRONG page on my larger post

  37. #37

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    New updates over at GitHub here: https://github.com/jpbro/VbFcgi

    NOTE: This build breaks binary compatibility. I hope that is the last time (remember though, you don't need to register anything on your target machines, just your development machine. Please unregister anything you previously registered on your dev machine before registering the latest binaries).

    New features: It is now easier to build HTML using the updated HTML builder/helper (you no longer have to write bytes upstream yourself, just call the Finish method when you are done building your HTML and it will be passed upstream for you).

    Also added a new HTTP header builder/helper class. It will automatically include things like Content-Type, Content-Encoding, Content-Length (though you can over ride) based on what is in the active IBuilder object. You can also add custom header fields like Cookies, etc... This is all demonstrated in the vbFcgiApp demo, but I'm happy to answer any questions here about how to use it.

  38. #38

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Here's some sample code:

    [code]
    Private Sub IFcgiApp_ProcessRequest(po_Request As VbFcgiLib.CFcgiRequest, po_Response As VbFcgiLib.CFcgiResponse)
    Dim l_StartedBuildAt As Double
    Dim ii As Long

    Dim lo_Header As vbRichClient5.cStringBuilder
    Dim lo_IBuilder As VbFcgiLib.IBuilder
    Dim lo_Html As VbFcgiLib.CBuilderHtml
    Dim l_Title As String
    Dim l_SubTitle As String
    Dim l_SubTitleExample As String
    Dim l_SubTitleExampleUrl As String
    Dim l_VisitCount As Long
    Dim l_HttpHost As String
    Dim l_TagIndex As Long

    On Error GoTo ErrorHandler

    ' Make sure that FCGI parameters are complete built and the Upstream FCGI object has been set
    ' otherwise raise fcgierr_NotReadyForResponse
    ' Just a sanity check - this should never happen
    If po_Request.Fcgi.Params.State <> paramstate_Built Then Err.Raise fcgierr_NotReadyForResponse, , "FCGI Parameters incomplete."

    l_StartedBuildAt = libRc5Factory.C.HPTimer

    Set mo_FcgiParams = po_Request.Fcgi.Params
    Set mo_FcgiStdin = po_Request.Fcgi.Stdin

    l_HttpHost = po_Request.Fcgi.Params.ValueByEnum(stdparam_HttpHost)

    ' Build the HTML portion of the HTTP response

    ' Initialize the HTML builder/helper
    Set lo_Html = po_Response.Builders.Builder(builder_Html)

    With lo_Html
    .AppendDocType htmldoctype_Html5

    .OpenTags "html"

    l_TagIndex = .OpenTags("head")

    ' *** START DEMONSTRATION OF QUERY PARAMETER HANDLING
    If po_Request.Http.QueryParameters.Exists("title") Then
    l_Title = lo_Html.EncodeEntities(po_Request.Http.QueryParameters("title"))
    End If
    ' *** END DEMONSTRATION OF QUERY PARAMETER HANDLING
    If stringIsEmptyOrWhitespaceOnly(l_Title) Then
    l_Title = "vbFcgi Demo App"
    l_SubTitle = "Pass a ""title"" query to change the title of this page."
    l_SubTitleExampleUrl = "http://" & l_HttpHost & po_Request.Fcgi.Params.ValueByEnum(stdparam_ScriptName) & "?title=Greetings from planet earth!"
    End If

    .AppendWithTag l_Title, "title"

    .CloseOpenedTagsToIndex l_TagIndex ' Close <head> tag

    ' Build BODY
    .OpenTags "body"

    .AppendWithTag l_Title, "h1"

    If Not stringIsEmptyOrWhitespaceOnly(l_SubTitle) Then
    .AppendWithTag l_SubTitle, "h2"

    l_TagIndex = .OpenTags("p")
    .Append "Example: "
    .OpenHyperlinkTag l_SubTitleExampleUrl
    .Append .EncodeEntities(l_SubTitleExampleUrl)
    .CloseOpenedTagsToIndex l_TagIndex ' Close up to H3 tag
    End If

    l_TagIndex = .OpenTags("p", "b")
    .Append "<a href='https://www.github.com/jpbro/VbFcgi'>Learn more about VbFcgi on GitHub.</a>"
    .CloseOpenedTagsToIndex l_TagIndex ' Close B and P tags

    ' *** START DEMONSTRATION OF COOKIES
    l_TagIndex = .OpenTagWithAttributes("p", , , "color: orange; font-weight: bold;")
    If po_Request.Http.Cookies.Exists("visits") Then
    On Error Resume Next
    l_VisitCount = po_Request.Http.Cookies.CookieByKey("visits").Value
    On Error GoTo ErrorHandler

    If l_VisitCount = 0 Then
    ' Bad cookie value!
    .Append "Hey! Have you been mucking about with your cookies?"
    Else
    ' Display number of visits
    .Append4 "You have previously visited this page ", l_VisitCount, " time", IIf(l_VisitCount <> 1, "s.", ".")
    End If
    Else
    ' First visit
    .Append "This is your first visit, pleased to meet you!"
    End If
    .CloseOpenedTagsToIndex l_TagIndex ' Close P tag

    ' Increment "Visits" cookie
    po_Request.Http.Cookies.AddOrReplaceCookie "visits", l_VisitCount + 1
    ' *** END DEMONSTRATION OF COOKIES

    .Append4 "<p>", "The current date & time on the server is: ", Now, "</p>"
    .AppendWithTag "VbFcgi is " & ChrW$(&HAAA&) & ChrW$(&HE01&) & ChrW$(&H671&) & ChrW$(&H188&) & ChrW$(&H47B&) & ChrW$(&H257&) & ChrW$(&HFEC9&) & " capable via UTF-8!", "p"

    ' Build FCGI Parameters table
    .AppendWithTag "FCGI Parameters received from Upstream Webserver:", "h2"
    .OpenTags "table"
    For ii = 1 To mo_FcgiParams.Count - 1
    .OpenTags "tr"
    .AppendWithTag mo_FcgiParams.KeyByIndex(ii), "td"
    .AppendWithTag mo_FcgiParams.ValueByIndex(ii), "td"
    .CloseLastOpenedTag ' Close tr tag
    Next ii
    .CloseLastOpenedTag ' Close table tag

    ' Build response time
    Attached Images Attached Images  
    Last edited by jpbro; Dec 18th, 2017 at 10:22 AM.

  39. #39
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [Experimental] VB6 FastCGI Server

    Thank you, jpbro. The attachment is invalid, it may be deleted by the moderator.

  40. #40

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: [Experimental] VB6 FastCGI Server

    Hi dreammanor, thanks for pointing that out...I keep getting errors from the forum when I try to attach an image. I can see the image now, but maybe it will disappear again (hope not!).

Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width