Questions tagged [fastcgi]

FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.

FastCGI is an open interface web servers can use to run applications as separate isolated processes. It is an enhancement of the original NCSA CGI interface specification, with a range of improvements. The primary improvement over the standard CGI approach offered by FastCGI is performance, hence the name.

FastCGI is supported by a broad range of Web Servers (such as Apache, nginx, lighttpd).

730 questions
1
vote
0 answers

command line alias inside php exec

Is there any possibility to define shell alias for commands executed via php system, exec etc functions? I'm running multiple versions of PHP using fastcgi and I need to run the right version of PHP when I execute exec('php -f script.php'); inside…
Peter Krejci
  • 123
  • 5
1
vote
0 answers

User Uploaded Images– Blank Post – Connection reset by peer / FastCGI: incomplete headers

To give a little background, I have a website that permits users to upload images. WordPress is used as a content management system and the posts are immediately published with the image inserted as the featured image of the post. From that point…
panoramic
  • 21
  • 1
  • 7
1
vote
1 answer

Joomla Extension Uninstall Causes 502 Bad Gateway

We have a VPS with some PHP websites hosted on our Ubuntu 12.04 LTS servers using NGINX. In a Joomla 3 site, when uninstalling an extension that errors out, the page shows an NGINX error page with a 502 Bad Gateway rather than showing the error…
RNickMcCandless
  • 133
  • 1
  • 9
1
vote
0 answers

Lighttpd fastcgi remote instance operation

This article suggests that it is relatively easy to scale an application by getting lighttpd to spawn php-fastcgi instances on multiple machines. What I do not understand is this - how does a PHP script spawned on another machine get access to…
DroidOS
  • 173
  • 7
1
vote
2 answers

nginx fastcgi rewrite: primary script unknown

I have following nginx configuration: location / { try_files $uri $uri/ index.html =404; if (!-e $request_filename) { rewrite ^/(.+)$ index.php?url=$1 last; } } location ~ .php$ { # protection from known…
Tombart
  • 2,143
  • 3
  • 27
  • 48
1
vote
0 answers

Running two different PHP fast-cgi instances on windows with OPCache enabled

I'm trying to run two different php 5.5 instances on Windows (one with XDebug, one without, same php executable, different php.ini files) over fast-cgi in Apache 2.4, ideally both with opcache enabled. However when I enable opcache for both one of…
Patrick Huy
  • 111
  • 2
1
vote
0 answers

PHP-FPM errors only when running as a system service on Fedora 20. (File not found / Primary script not found)

I am trying to setup NGINX with PHP-FPM on a Fedora 20 box and I am getting the "File not found / Primary script unknown" errors only when starting php-fpm as a system service. I am using a default setup in NGINX with the default fastcgi.conf…
Marcus
  • 11
  • 1
1
vote
1 answer

nginx wont cache images when they are read through php files

I have .php file which is loading images to hide their location. Every images are correctly caching through this directive: location ^~ \.(jpg|jpeg|png|gif|ico|css|js)$ { expires max; valid_referers server_names blocked…
Slupek
  • 11
  • 1
  • 3
1
vote
2 answers

nginx: fastcgi_cache_path empty

I wanted to try fastcgi_cache on my nginx 1.5.8 setup as shown here. In nginx conf, http section, I added: fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m; In server section: set $cache_uri…
MultiformeIngegno
  • 1,687
  • 9
  • 26
  • 31
1
vote
0 answers

Setting up nginx, rewrite and fastcgi

This problem has been driving me nuts for the last couple of days... Working on an application that needs authentication and exists of different parts (CMS, API, frontend) we ran in to some problems with sharing sessions/cookies/cross-origin…
thomasjonas
  • 111
  • 1
1
vote
1 answer

How to redirect URLs without break a FastCGI app?

(I consider this question a duplicate of Lighttpd redirect from www.domain.com to domain.com, but that one didn't get enough attention and it's too old). I'm trying to deploy an app over lighttpd+FastCGI and encrypt all the traffic. It works well if…
Tae
  • 113
  • 7
1
vote
1 answer

Enable FastCGI on Litespeed

How would I enable my Litespeed server to process .fcgi files using a FastCGI module? I tried setting the handler to fcgid-script already but that doesn't work. Syntax: AddHandler fcgid-script .fcgi Options +ExecCGI Just to avoid confusion, I am…
Jeroen
  • 111
  • 5
1
vote
0 answers

Apache2 mod_proxy_fcgi closes a connection after each request

I set up mod_proxy_fcgi do go with apache and php-fpm. If I read the FCGI spec correctly, the typical flow for the communication between a server is to keep the connections between the web server and the FastCGI server open while they are active.…
julkiewicz
  • 141
  • 2
  • 7
1
vote
2 answers

Unicode characters in nginx fastcgi links

I have a django project hosted over nginx with fastcgi. Django has some urls that user cyrillic characters. But when I try to open page with such link, django tells that it doesn't have such model, because the link got escaped and is taken to django…
neko259
  • 13
  • 2
1
vote
1 answer

Make mod_rewrite rules process before fcgi sees the request

Is there a way to have the mod_rewrite rules in my .htaccess file take effect before PHP behind fcgi sees the request? I have an email validation link that I want to redirect from root to the login page before PHP marks it in the database as…
joshperry
  • 325
  • 1
  • 2
  • 14