C/C++ FastCGI

mistwang

LiteSpeed Staff
#2
File "echo" under examples/ directory is a shell script wrapper, you should looking for real executable binary under examples/.libs/ .
 
#3
ok I got .libs and "echo". Where should I put it now so it could be lunched as FastCGI.

I appreciate your help!

I've put it in cgi-bin but recieved:

Code:
lscgid: execve(): No such file or directory
 

mistwang

LiteSpeed Staff
#4
Not sure why you get that message, if you overwrote the wrapper script with real binary, it should work.

Have you tried executing echo from command line?

If you run the wrapper under examples/ directory, a file called lt-echo will be created under .libs/ dir, maybe you should try that one.

George
 
#5
I took echo from fcgi-2.4.0/examples/.libs and put it in lsws/DEFAULT/cgi-bin.

I've also restarted lsws. Whats wrong? Could you test it at your env? I would appreciate it. I spend whole my working day trying to lunch fastcgi c by lsws...
 
#7
Ok, I'm lost, can't make it.

Could you help me and tell how to define External App / Script Handler in Server Configuration panel for fastcgi/examples/.lib/echo script from FastCGI package (www.fastcgi.com)?

Where to put it and how to configure/run it?

I'm crushed...
 
#8
I can run echo as cgi with: localhost/cgi-bin/echo.

I've found out also that remaining scripts doesn't seem to work: size, log-dump.

It reports "500 Internal Server Error".

No matter!

Just want to know - how to run echo as fcgi???

I've even tried to set cgi-fcgi handler for .fcgi files and rename echo to echo.fcgi and lunch it from lsws/DEFAULT/html but got: " 503 Service Unavailable"
 
#12
From localhost/cgi-bin/echo runs as CGI - it spowns new pid every new request.

The goal is to run it as FastCGI - within one pid.

Can't make it. Pleas help guys...
 

mistwang

LiteSpeed Staff
#13
Yes, you need to define a external app for each fast cgi application. It is a bad idea to write too many fcgi, which only do one simple task like a CGI, you should combine features as you could.

In the case of /fcgi-bin/echo, you should not define a script handler, instead, you need to define a FCGI context with URL "fcgi-bin/echo" or what ever URL you want to access the fcgi app.
 
#14
mistwang said:
In the case of /fcgi-bin/echo, you should not define a script handler, instead, you need to define a FCGI context with URL "fcgi-bin/echo" or what ever URL you want to access the fcgi app.
Big thanks for your answer. How can I make that contex?
 
#16
Thank you for your answer. I have just found your great documentation about context.

I realised my silly questions was annoying for you. Sory for that. I appreciate your patience.

You are GREAT guys @ lsws!!
 
#17
Can't make it work. Check this out guys please - what's wrong?

Script


External Apps


Contex


EAecho running


Lunch it - ERROR


Log
 
#18
Ok, I've solved it!!

The reason was: lack of header informations in my script ("content...").

Everything works fine now.

Cheers!
 
#19
BTW is it possible to have such results:

simple-test-script.php
Code:
lsws (with fastCGI php): ~700req/s
apache2      (pure php): ~700req/s
simple-test-script.c
Code:
lsws, apache2 (both as fastCGI): ~1600req/s
 

mistwang

LiteSpeed Staff
#20
It doesn't looks right, I don't think the performance of lsws and Apache is in the same class, especially for the fcgi test.

Would you mind prividing more detail information about how the test is performed? What is the simple-test_script does? hardware, software used.
 
Top