All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
3 answers
598 views

CGI scripts: when can you return a document, instead of an HTTP response?

Script 1 below is bash, and is at https://example.com/cgi-bin/test. It produces the output 'Under construction' when fetched. It echos Status and Content-type headers, and some HTML. If I instead try ...
QF0's user avatar
  • 183
0 votes
0 answers
85 views

When is a new PHP-CGI process created?

My production server has been having a OOM issue. Upon investigating I find that a major memory eater is PHP-CGI processes. Each of my website, be it Joomla or Wordpress, is having 3 - 6 PHP-CGI ...
shenkwen's user avatar
  • 199
1 vote
0 answers
4k views

nginx site shows blank page. No errors

Background I'm trying to get an nginx /php-fpm7 site up and running on an alpine linux server. Problem No errors appear when i navigate to it. Cert is good. And the in the /var/log/access.log ...
dot's user avatar
  • 187
0 votes
1 answer
619 views

Pin point 500 Error which seems to orginating from FastCGI Module

I have a php application which I have been hosting on IIS that has suddenly stopped working and returns a server 500 error. In an attempt to troubleshoot it I have added a Failed Request Tracing Rule ...
Niana 's user avatar
  • 101
0 votes
0 answers
442 views

How can I configure Nginx to use PHP in CGI-mode?

The Nginx tutorial shows PHP 5 being used in FastCGI mode on Windows, but PHP 4 doesn't support php-cgi.exe so it must be run in traditional cgi mode, There are two ways to set up PHP to work with ...
Evan Carroll's user avatar
  • 2,393
0 votes
0 answers
878 views

SetEnvIf doesnt work from htaccess

I'm trying to overcome the infamous missing Auth header problem with Apache, PHP and CGI. If I set this in a virtual host, I can successfully read the Bearer token from the Authorization header. ...
Nick Wiltshire's user avatar
1 vote
0 answers
560 views

Apache:How to config for php-cgi.exe

I have configured apache for using php-cgi as follows: <Directory "c:/wamp64/cgi-bin"> AllowOverride All Options +ExecCGI AddHandler cgi-handler .php Action cgi-handler /local-...
Mohsen Movahed's user avatar
2 votes
1 answer
4k views

Returning HTTP status 204 for GET /generate_204 using uhttpd?

To deal with the Android captive portal detection for my specific setup, I need to return an HTTP status code 204 whenever I get a GET request for /generate_204. I currently use uhttpd as my webserver,...
Markus A.'s user avatar
  • 419
2 votes
2 answers
5k views

php servers without apache/nginx/cgi stack

In many languages, you build web frameworks from the ground up (i.e. from unix sockets) and layer on abstractions. If I want to build a web framework from scratch in OCaml or C, I first build a socket ...
eatonphil's user avatar
  • 183
1 vote
1 answer
117 views

Supporting embedded PHP on a CGI app with IIS

We have a CGI pageserver (.exe) written in Delphi running on IIS. We'd like to be able to embed PHP in these pages at some point in the near future--say, for a captcha or CMS integration--but are ...
John Crux's user avatar
1 vote
0 answers
110 views

ps x shows weird command: -f html/index.php

Just went to check one of my websites and was greeted by the message: "CGIWrap Error: Real UID could not be changed!". Went in via SSH and tried "ps x" which showed me tons of processes that that ...
Splatbang's user avatar
  • 111
0 votes
2 answers
2k views

FCGI and upload_tmp_dir PHP directive are not working correctly

I run PHP as FCGI! I'm setting upload_tmp_dir option as value /home/domain.com/tmp. When executed phpinfo() for double-check it's confirmed that the settings above are correct. Nevertheless, when ...
Ilia Ross's user avatar
  • 1,096
1 vote
1 answer
899 views

Server Showing Default CGI page on my VPS hosting [closed]

I am getting default cgi [http://xx.xxx.xxx.xxx/cgi-sys/defaultwebpage.cgi]page even after placing index.php in the root/public_html folder. The Httpd Conf on my VPS have the following entry <...
Clain Dsilva's user avatar
1 vote
1 answer
3k views

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 ...
Pierre's user avatar
  • 133
0 votes
1 answer
112 views

Apache: Run standard-PHP side by side with Fast-CGI

I'd like to run a server that 'delegates' certain requests to a C++-Script via FastCGI - how can I configure Apache to do so? It would just be enough to redirect requests to a specific page I could ...
David's user avatar
  • 51
1 vote
1 answer
2k views

Running single Apache Vhost on PHP 5.3 using CGI, other sites use PHP 5.2 on Apache module

I've been trying to setup my development server to serve one of my Apache virtual hosts over CGI using PHP 5.3.14. The Apache server I have setup is Apache 2.2.3 with PHP 5.2.10 running as an Apache ...
m4olivei's user avatar
  • 111
2 votes
3 answers
483 views

Setting the server to look for index.php file by default

I am a web developer and I've requested our Sys-Admin to setup a server for my team that will be used as a development environment. The PHP is running as a CGI. When i try to open http://myaddress/ I ...
Дамян Станчев's user avatar
0 votes
1 answer
3k views

Nginx + fastcgi to run PHP script , but it kept telling me "File not found"

Here's part of config in the server block: I was unable to execute any php script , I placed a file named test.php under /var/html , but when I point to http://localhost/test.php , I got a result: ...
daisy's user avatar
  • 747
2 votes
1 answer
260 views

How to serve php requests through a single persistent php-cgi instance?

How to set up PHP Version 5.2.17 on Apache/2 to serve php requests through a single persistent php-cgi instance?
LLub's user avatar
  • 153
0 votes
1 answer
1k views

How to switch from CGI/FastCGI Server API to DSO?

Apache: How to switch from CGI/FastCGI Server API to DSO? I want to switch back and forth. I found this answer for the reverse step, but I need the the first part: Apache: How to switch to CGI/...
Mark's user avatar
  • 9
-3 votes
1 answer
83 views

Display static pages with a RAND seed, expiry? [closed]

In Apache, is there any way (using scripts like CGI and PHP, etc.) that will fetch all static content (html, images, and files within a specified size range) and send it to the user as a randomized ...
U4iK_HaZe's user avatar
  • 633
3 votes
2 answers
928 views

how to spawn php-cgi automatically when it exits?

I am using php-cgi on ubuntu(with nginx), and the command to start it is: spawn-fcgi -a 127.0.0.1 -p 9100 -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid but sometimes the php-cgi process will exit ...
Bin Chen's user avatar
  • 165
1 vote
0 answers
232 views

lamp php ubuntu 10.04 with cgi I get accesses to '/var/www/...' instead of '/usr/lib/cgi-bin/...'

I have a basic php cgi configuration problem on top of the apache web server in Ubuntu 10.04 . I am trying to setup cgi so as to answer one of the urls localhost/cgi-bin/index.php or localhost/index....
branco's user avatar
  • 11
3 votes
2 answers
801 views

PHP as a CGI binary vs. PHP as an Apache module

What are the benefits of running PHP as a CGI binary compared to running PHP as an Apache module? Are there: Security benefits? Stability benefits? Performance benefits? I've always installed and ...
Aaron's user avatar
  • 722
1 vote
1 answer
640 views

PHP CGI for apache virtual host

I'm using PHP5.3 as module for Apache2.2(Windows). For one virtual host i need use PHP4 as CGI for .php files. This is my config <VirtualHost *:80> DocumentRoot "E:\projects\php\wp\dev" ...
Kein's user avatar
  • 111
0 votes
1 answer
858 views

Git Server on Shared Hosting

Are there any revision control systems (git preferred) that could run on shared hosting server presumably by being launched as CGI scripts?
Eric Pruitt's user avatar
0 votes
1 answer
4k views

Prevent CGI Timeout in Apache with PHP

I have a PHP process which the user runs in the browser, but tends to take a fairly long time - upwards of 5 minutes. We just switched to a new server, and when we try to run the script now, it ...
Aaron Marks's user avatar
1 vote
0 answers
343 views

PHP giving 500 internal server error on new server

I am trying to run a simple PHP script which displays phpinfo() but I am getting 500 internal server error. What could be the reason? Is it because PHP handler is set to suPHP and I shall change it to ...
user avatar
1 vote
1 answer
247 views

How to convert php5 cgi to module?

I installed PHP5 on my debian lenny system as cgi. Now I found that flush() in php is only working for php installed as module. Anyone know how to (re)install php5 as module? (apache2) Thanks :)
MilMike's user avatar
  • 206
16 votes
3 answers
37k views

How to pass $_GET variables to a PHP script via the command line?

I am trying to create a webserver that serves PHP scripts. Currently, it works as follows: The client requests /index.php?test=value The server invokes php index.php The server feeds the HTTP request ...
Nathan Osman's user avatar
  • 2,725
1 vote
1 answer
2k views

Install PHP both as CGI and CLI

I'm trying to set up development environment for some old projects in PHP 5.1.4. It needs to run as CGI (or fastcgi) under apache and I would like to have cli binary. My configure options are: ./...
dev-null-dweller's user avatar
1 vote
1 answer
693 views

How can I use Python's CGIHTTPRequestHandler as a dev server for PHP

I love how to try a Rails app out, I just type script/server. I wish there were a way to do something similar from the top level directory of a PHP project. This answer to the question "Downloading ...
Nicholas H.'s user avatar
1 vote
3 answers
270 views

PHP Cron Job without PHP Binary?

I am looking to run a PHP script with a cron job, but it seems I don't have a PHP binary. Looks like I don't have PHP installed as a CGI, so without reinstalling/configuring my PHP, what is the best ...
user avatar
0 votes
1 answer
606 views

Suppress PHP Headers running cgi PHP from Ruby

I originally posted this on StackOverflow and it was suggested that I try posting this here because, "It might be something like the configuration in CGI is different than the configuration for your ...
Matthew J Morrison's user avatar
8 votes
4 answers
3k views

What Apache/PHP configurations do you know and how good are they?

I wanted to ask you about PHP/Apache configuration methods you know, their pros and cons. I will start myself: ---------------- PHP as Apache module---------------- Pros: good speed since you don't ...
Vladislav Rastrusny's user avatar
2 votes
2 answers
153 views

Is there another way to run Apache2 securely for end users without using CGI mode?

Is there another way to run Apache2 securely for multiple end users (like hosting hundreds of blogs) without using CGI mode as required by suPHP? It just seems so inefficient to use CGI mode for PHP ...
ServerChecker's user avatar
1 vote
1 answer
5k views

Local .htaccess strangely allowed running PHP in CGI/FastCGI mode in Apache under shared hosting environment

I am using a shared web hosting service. Running phpinfo, I can see the Server API shows CGI/FastCGI rather than Apache 2 Handler. In this article: http://docs.joomla.org/...
bobo's user avatar
  • 599
0 votes
1 answer
3k views

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 ...
Aaron's user avatar
  • 111
0 votes
1 answer
127 views

How do you setup your domains to use same php.cgi but different PHP.ini

I thought I had this figured out. I built a php.cgi, but rather than have a copy of php.cgi in the /cgi-bin/ dir for each domain I have. I create a sym link to a common directory so they could all ...
qodeninja's user avatar
  • 2,753
1 vote
2 answers
322 views

Need to determine how php files are being rendered in a LAMP configuration (CGI, FastCGI, or mod-php)

How do I determine how our php files are being rendered in a simple LAMP configuration? phpinfo shows: -- Configure Command -- --enable-force-cgi-redirect --enable-fastcgi -- Server API -- CGI/...
Chris Williams's user avatar
0 votes
2 answers
2k views

Can't execute index.php in root folder when PHP is installed as CGI binary

I'm trying to make a website on my school's server, but they have PHP installed as CGI, so .php files can only run in the cgi-bin folder. This is somewhat problematic if I want my index to be a .php ...
Tony Stark's user avatar
6 votes
3 answers
4k views

PHP as CGI or Apache Module?

I've always believed that PHP works better installed as an Apache module, but recently, someone on a local forum pointed out that running PHP as CGI is better security-wise. I've done some googling ...
Ionuț G. Stan's user avatar
0 votes
2 answers
6k views

PHP 5.3 on IIS gives 404 error in CGI mode

Slowly losing my mind here. I had PHP 5.2 working fine (ISAPI) under IIS, but for some extension I needed 5.3. So no worries, I installed this but it turns out ISAPI is not supplied anymore. I ...