Why is php in CGI Mode not supported?

General chat forum
DO NOT post bugs/feature requests for WoWRoster, PvPLog, UniUploader, or UniAdmin here

Why is php in CGI Mode not supported?

Postby KillerCow » Mon Sep 10, 2007 5:32 pm

I ask this question, because my webspace is running php in CGI mode...

I want to set up a roster for my guild and just tested the roster... all worked fine till I switched from php4 to php5. The DB connections created by the roster seem to be somehow "persistent". After some use of the roster, no DB connections can be established, because there are "too many DB connections".

Does anybody has a clue for this or can tell me, why the roster is not "CGI-ready"?
KillerCow
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Wed Jan 17, 2007 4:42 am

Why is php in CGI Mode not supported?

Postby PleegWat » Mon Sep 10, 2007 7:14 pm

All of us devs run home servers, which consist of apache running php as a module. There are some slight differences in cgi mode, which are not documented, so they're hard to track, especially if you're not running cgi mode yourself.
It's more or less the same story with IIS: None of us use it, so we can't really track the bugs.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Why is php in CGI Mode not supported?

Postby MattM » Mon Sep 10, 2007 8:33 pm

PleegWat wrote:All of us devs run home servers, which consist of apache running php as a module. There are some slight differences in cgi mode, which are not documented, so they're hard to track, especially if you're not running cgi mode yourself.
It's more or less the same story with IIS: None of us use it, so we can't really track the bugs.


There are some NASTY bugs which pop up in a lot of IIS-ISAPI setups.

If you haven't experienced them, you are one lucky guy :wink:

Sometimes IIS-CGI is the only stable way in a "microsoft shop". Although performance may not be as good, it is stable.
MattM
UA/UU Developer
UA/UU Developer
Gimpy Developer
Gimpy Developer
 
Posts: 886
Joined: Tue Jul 04, 2006 9:53 pm
Location: USA

Why is php in CGI Mode not supported?

Postby Diska » Tue Sep 11, 2007 2:29 am

I've thought about running PHP in CGI mode on my Linux server in the past but I ran into some trouble with software I was running (I think it was a PHP accelerator).
The reason I wanted to switch to CGI mode is because it allows PHP scripts to run as a different user (usually you want the scripts to run under the user who's uploading the files). This is a big security advantage. If you have multiple users on your server they won't be able to access eachother's files by using clever PHP scripts and you'll never run into the trouble where PHP scripts create files with the user of the webserver as owner.
PHP in CGI mode has it's uses and is absolutely not limited to the Windows platform.
A more modern solution to the above mentioned problems would be to use usermode linux or some sort of virtualisation but that gives a lot of overhead and is less easy to administrate.

If anyone has a better solution to those problems I'd love to hear about them but I don't want to get too much off-topic here, I just wanted to point out that PHP in CGI mode is not only used to make buggy platforms work stable ;)
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest

cron