fastcgi

How do I find out the currently running PHP executable?

From inside a PHP program I want to know the location of the binary executing it. Perl has $^X for this purpose. Is there an equivalent in PHP? This is so it can execute a child PHP process using itself (rather than hard code a path or assume "php" is correct). UPDATE I'm using lighttpd + FastCGI, not Apache + mod_php. So yes, the...

How do I ping a FastCGI server?

How do I check if a FastCGI server is alive and running normally beyond just making a TCP connection? I have a number of remote, stand-alone FastCGI servers. I want to monitor the FastCGI server itself to ensure its alive. Simply making a request of the web server is not enough as it will automatically route around a dead server. Tha...

[alert] (22)Invalid argument: FastCGI: process manager exiting, setgid() failed

I am trying to start the Apache server and I am going to use Fast CGI. When I try to start it, I get following error message in error_log. [alert] (22)Invalid argument: FastCGI: process manager exiting, setgid(4294967295) failed So it looks like it is setting the group id and at that time it gave this alert message. Any idea about...

web based application server Implementation

I intend to create a web based application server. The server is implemented in C and I wish to create a web based interface instead of a specific client application. Could anyone please suggest what approach/technology I can use to implement ? Thank you. -Mac ...

Is HTTP Authentication possible with PHP on IIS FastCGI?

I've just migrated from PHP 5.2.3 using php5isapi.dll to PHP 5.3.0 using FastCGI and php-cgi.exe. On this site I have hooks for windows/ntlm/http authentication doing something like this: if(empty($_SERVER["REMOTE_USER"])) { header("HTTP/1.1 401 Unauthorized"); exit; } $winuser = $_Server["REMOTE_USER"]; //parse $winuser to make sur...

HTTP Proxy/FastCGI/SCGI not closing connection when client disconnected - bug or feature?

I'm working on Comet support for CppCMS framework via long XMLHttpRequest polls. In many cases, such request is closed by client before any response from server was given -- for example the page is closed, user moves to other page or it is just refeshed. At the server side I expect that I would recieve the notification that connection i...

Python egg found interactively but not in fastcgi

In agreement to this question, and its answer. I added the path of the egg and it worked. However, when I run python interactively and I import flup, it works without any problem or additional path specification. Where is the difference ? Edit: It appears that while doing fastcgi stuff, the .pth files are not parsed, but this is only a ...

What's a good strategy to restart downed FastCGI processes automatically?

I've got a Perl based FastCGI app that rarely goes down. However, when it does go down, the restart is not automatic. Restarting Apache manually always does the trick but that does address improving the uptime of the app. I'm thinking of using a cron job in conjunction with a script that uses WWW::Mechanize to periodically check on the ...

Apache's mod_php OR FastCGI? Which is good for Wordpress?

Hi guys, I have basic idea about running PHP in different configurations like mod_php, cgi, FastCGI, etc. In my findings and test I found FastCGI is slightly better. I like FastCGI's support for SuEXEC most. Wait I do not want to get into benchmarking business here again. If you surf web, you will find people proving one way is faster ...

PHP App (ExpressionEngine) slow to load on IIS 7, MySQL, FastCGI

I'm working on debugging a slowness issue I've got with running ExpressionEngine (a PHP application) on IIS 7. I don't think this is actually an issue with ExpressionEngine, but rather an issue with my PHP/MySQL setup. The problem shows itself thusly: Go to webite address IE "spins" for 10-15 seconds, waiting to load. During this ti...

[WEB-CGI-C++] I want to start developing CGI, but I am very new at this.

Hi I want to develop my next web project in C++ as FastCGI but I don't know how to start and google wasn't very friendly about this. I really don't know much about fastCGI or others libraries that makes cgi persistent... Tried to read some stuff, but it seems to be used along Linux with all those .configure Makefiles etc... can anyone ...

Lighttpd, FastCGI, Django - how to restart automatically?

I am using Lighttpd + FastCGI + Django on a dev machine. I start FastCGI server via manage.py's command line option. Problem is that I do make changes to sources quite often and I need to get FastCGI to pick up those changes automatically, just as "./manage.py runserver" does. Is there a command-line option for that, perhaps, or any ot...

CGI program that outputs a gif image, and other non-HTML content

I am writing a CGI program (in C++) that will output the following data in its response: (inline) GIF image (i.e. octect stream) JSON Javascript XHTML All the CGI examples I have seen are "trivial" and return only one data type. How can I return a response that contains all of the above ? ...

Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

Hello, I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of recommendations for lighttpd and fastcgi. Is this setup faster than apache+mod_wsgi for serving dynamic django pages (I'm already convinced that...

nginx with mod_wsgi

I generally run web apps behind nginx with FastCGI. I wanted to experiment with mod_wsgi, however it seems quite out of date. The author mentions that it worked on version 0.5.34, however I'm running 0.7.62 now. The wiki article warns of compilation problems with the module and later versions of nginx. Has anybody used mod_wsgi with ...

How do I get linux server to use local PHP.ini in a shared environment?

I'm on shared server environment (Dreamhost.com uses Linux/Debian). I followed their instructions @ http://wiki.dreamhost.com/Advanced%5FPHP%5Fconfiguration on setting up a local PHP5 instance on my user account so that I could use APC (php5 accelerator) A couple of caveats is that I dont have php5 installed on the root directory "/ho...

Make Apache wait longer before delivering HTTP 408 request timeout

My configuration: Apache 2.2.4 PHP 5.2.4 (fastCGI) Windows XP pro I have a script that takes more than a minute to run but after exactly 60 seconds (proven by Fiddler) the server always delivers a 408 timeout. My PHP max execution time is set to 120 seconds. After doing some reading I've tried putting a "Timeout 120" directive in my A...

Drupal + Nginx + Php-cgi : 502 Bad Gateway error

We are running Drupal 5.x on Nginx with php-fastcgi. Things were working fine for a while. All of a sudden, we (users) are running into 502 Bad Gateway error. Restarting PHP-cgi, nginx.. rebooting machine etc did not help. Did anyone else run into this type of issue? What are the possible suspects? ...

flup/fastcgi cpu usage under no-load conditions

I'm running Django as threaded fastcgi via flup, served by lighttpd, communicating via sockets. What is the expected CPU usage for each fastcgi thread under no load? On startup, each thread runs at 3-4% cpu usage for a while, and then backs off to around .5% over the course of a couple of hours. It doesn't sink below this level. Is thi...

Passing one va_list as a parameter to another

I'm creating an application using the fastcgi library, and their method of printing is a little verbose. I'm trying to wrap their fprintf function in my own method: I would like to turn FCGX_FPrintF(out, char* fmt, ...); into write(char* strFormat, ...); I've found the magic of va_list but can't find an easy way to pass va_l...