I have a strange issue specific to my Django deployment under Python 2.6 + Ubuntu + Apache 2.2 + FastCGI.
If I have a template as such:
{% with True as something %}
{%if something%}
It Worked!!!
{%endif%}
{%endwith%}
it should output the string "It Worked!!!". It does not on my production server with mod_fastcgi.
This w...
I'm running on Mac OS X 10.5.6. I've built PHP 5.2.9 at /usr/local/php and enabled fast_cgi. I'm also using lighttpd as my server. I am confused as where the php fastcgi socket exists. My lighttpd server settings are:
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
...
I'm about to deploy a Django application on a nginx web server, and want to make sure I'm building the system correctly.
It seems to be common wisdom that if you are deploying Django on an apache server, then you should still put an nginx server in front of the application to serve static files, at which nginx is more performant.
If in...
I'm working on setting this up on Mac OS X Leopard.
I'm having a devil of a time getting PHP5 working as fastcgi under lighttpd. I've verified that I've compiled php with fastcgi enabled. I've tried configuring lighttpd as I've seen in various documentation.
The core bit that I'm not understanding is if php-cgi is supposed to create t...
I'm looking to make my CGI forum software FastCGI compatible.
The forum software consists of a few dlls and .exe (.cgi) files written in C and x86 assembly language. I also have a SQlite3 database.
Lighttpd runs all these cgi scripts as child processes and I much say that the whole thing works pretty damn well.
But I want to experiment...
Firstly, here's my script:
#!/usr/bin/python
import sys, os
sys.path.append('/home/username/python')
sys.path.append("/home/username/python/flup")
sys.path.append("/home/username/python/django")
# more path stuff
os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(me...
Anyone have any links or resource regarding writing a proper C++ FastCGI application? (on top of Apache using mod_fastcgi or mod_fcgid).
...
I am writing a C++ app on FastCGI using libfcgi++. When I do a POST or GET request, is there a library out there that would parse the different fields?
For example for a GET /fastcgi.fcgi?var1=data1&var2=data2 would return something that's easier to access var1 and var2?
Same for a multipart POST request.
...
What are the ups and downs of using FastCGI C++ vs. PHP/Python/Perl to do the same job.
Any performance or design pitfalls or using one over the other? Even your opinions are welcome. (Tell me why one or the other rocks, or one or the other sucks).
...
Hi,
I have a django app running on apache with fastcgi (uses Flup's WSGIServer).
This gets setup via dispatch.fcgi, concatenated below:
#!/usr/bin/python
import sys, os
sys.path.insert(0, os.path.realpath('/usr/local/django_src/django'))
PROJECT_PATH=os.environ['PROJECT_PATH']
sys.path.insert(0, PROJECT_PATH)
os.chdir(PROJECT_PAT...
The problem is my .pl script is downloaded as a blank file instead of being executed.
I read: http://redmine.lighttpd.net/wiki/lighttpd/ApplicationsUsingLighttpd
My dispatch.fcgi is the following: (it is located in usr/bin/
#!perl
#!/usr/bin/perl
use strict;
use CGI::Fast;
use Embed::Persistent; {
my $p = Embed::Persistent->new();
whi...
Hi everyone,
There's not much documentation surrounding the python-fastcgi C library, so I'm wondering if someone could provide a simple example on how to make a simple FastCGI server with it. A "Hello World" example would be great.
...
using Fast CGI I can't get it to read the php.ini file. See my phpinfo below.
System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001
Build Date Mar 5 2009 19:43:24
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\...
does FastCGI work well with PHP? It seems that some people running Ruby on Rails have problems with FastCGI, but is it fine with PHP?
...
How does one debug a FastCGI application? I've got an app that's dying but I can't figure out why, even though it's likely throwing a stack trace on stderr. Running it from the commandline results in an error saying:
RuntimeError: No FastCGI Environment: 88 - Socket operation on non-socket
How do I set up a 'FastCGI Environtment' f...
I was under the impression that FastCGI allowed you to kinda load in your web app once, and then you just "provide" FastCGI with some function, like myHandleHTTPRequest($url), that would then be called whenever a request came. This way you'd get much better performance as your app is ready in memory all the time, right?
But I'm starting...
How do you build your own FastCGI interface in PHP?
I'd like to do something similar to what they're doing in Perl, but in PHP. Is it even possible? Would it be faster?
(That is, I'd like to be able to load a web app framework once into memory, and then just have FastCGI call a method I provide for every request. So not the more generi...
Background
Below is a typical piece of Perl code (sample.pl for the sake of discussion) that grabs submitted form data using CGI, passes the form data to DBI which will then retrieve the required rows from MySQL and then hands the results over to Template Toolkit to render into a HTML document for display.
Code listing for sample.pl :
...
I have successful executed following commands:
tar xzvf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure --prefix=/usr/local/fcgi
make && make install
tar xzvf ruby-fcgi-0.8.7.tar.gz
cd ruby-fcgi-0.8.7
ruby install.rb config -- --with-fcgi-include=/usr/local/fcgi/include --with-fcgi-lib=/usr/local/fcgi/lib
But I get this error when I r...