Questions tagged [php-cgi]

55 questions
1
vote
0 answers

Apache:How to config for php-cgi.exe

I have configured apache for using php-cgi as follows: AllowOverride All Options +ExecCGI AddHandler cgi-handler .php Action cgi-handler /local-bin/php-cgi.exe Require all…
1
vote
2 answers

nginx fastcgi caching - multiple different expire times

I need to set up NGINX so that different locations would have different expire times for caching and some would have caching disabled. This is my current setup: fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=CACHE:200m…
Darksworm
  • 21
  • 1
  • 5
1
vote
0 answers

Simultaneously enable gzip and $STR_REPLACE in CGI in apache

I have a code in my CGI script for text replacement (for example replace 'red' with 'blue') $STR_SEARCH='red' $STR_REPLACE='blue' I am using the below code in .htaccess for enable replace function: (RequestHeader unset Accept-Encoding) This work…
alex body
  • 11
  • 1
1
vote
1 answer

How to internal redirect from one virtualhost to another Apache

I'm upgrading my application to new PHP version. For that I created two virtualhosts one server PHP 5.3 application and another with PHP 5.6. My virtualhosts are like, ServerName php53app.com DocumentRoot…
Nisam
  • 113
  • 6
1
vote
1 answer

502 Bad Gateway - Nginx, spawn-fcgi, WordPress

I host several sites on a CentOS VPS, and all was working fine until one of the WordPress sites on the server started returning a 502 Bad Gateway error. Other sites work fine. The WordPress site will load if I rename the BuddyPress plugin directory,…
doublesharp
  • 207
  • 1
  • 3
  • 12
1
vote
3 answers

WT-NMP - PHP-CGI randomly stops running with no error log

We have recently installed WT-NMP and are currently running Php-Cgi with php 5.4.24. We are running fairly simple php scripts and when testing everything is running fine. Over the weekend we wanted to keep the server running test it over a longer…
1
vote
0 answers

OOM Issues with FastCGI - FastCgiServer config getting ignored

I'm using apache2 with mod_fastcgi to run PHP on a private shared server. I have combined this with suexec so I can run each virtual host as it's own UNIX user, keeping Wordpress owners happy. One site occasionally gets a wave of traffic due to…
MrNorm
  • 153
  • 9
1
vote
3 answers

No input file specified on nginx and php-cgi

I'm trying to run nginx and php-cgi on my Windows PC, I've got up to the point where I want to move the html directory back two directory's so I can sort of create a structure. The only problem I have now is that PHP doesn't pick up any .php file. I…
Sandeep Bansal
  • 125
  • 1
  • 5
1
vote
1 answer

Nginx and Nagios passing through FastCGI Handler, 403 Error

I'm currently working on the renewal of my Web plateform and switching from Apache to Nginx. So I've to test all our administrative and internal applications before doing it. Well, so far, I didn't face any problems, BUT it would be a little bit too…
Dr I
  • 943
  • 16
  • 33
1
vote
2 answers

website connection reset on first load

i'm using nginx with php-cgi. lately a problem has arose where if you don't view my site for a while, like 3-4 minutes, and then open it again, the first request you send will return connection reset by peer in the browser. if you refresh, operation…
Tar
  • 265
  • 4
  • 11
1
vote
1 answer

Multiple PHP versions running as cgi

I'm trying to install a second version of PHP, to run alongside the current version of php. I've compiled the latest php source from github (5.5-DEV), and I'm trying to run it as CGI. Here is my virtual host config:
Pierre
  • 133
  • 2
  • 7
1
vote
0 answers

php5cgi keeps dying and nginx gives 502 Bad Gateway

I have nginx on my server (Ubuntu 11.10). i have created the script below in /etc/init.d/php5cgi to start/stop/restart php5-cgi. the problem is that php5-cgi dies from time to another which makes my website (nginx) giving 502 Bad Gateway (and i dont…
Alaa Alomari
  • 638
  • 5
  • 18
  • 37
1
vote
2 answers

When accessing PHP files, nginx throws an 404 error

Right, sorry for the previous, recent questions I've asked about nginx, this is just doing my head in. I've enabled PHP using fastcgi_php and it works just fine, however, when I access to a PHP file, e.g. http://domain.com/info.php (which applies…
MacMac
  • 1,931
  • 8
  • 30
  • 38
1
vote
2 answers

php-cgi shows mysql modules but throws "Call to undefined function mysql_connect()" error

I have compiled PHP 5.3.6 from source on Mac OS X 10.6 using the --with-mysqli=mysqlnd option. The output of both php -m and php-cgi -m show the mysqli and mysqlnd modules. When I run a simple test PHP file containing a mysql_connect(...) using the…
Chris Hart
  • 125
  • 6
1
vote
2 answers

How to restart php-cgi automatically with spawn-fcgi

I'm running nginx with php as fcgi. It's working just fine, however, php-cgi keeps on exit()ing after serving 500 requests. I tried increasing that value (PHP_FCGI_MAX_REQUESTS), and that worked, but that seems to be a workaround. Then I set it to…
mrm8
  • 65
  • 2
  • 4