php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #4426 php when run w/ binfmt_misc does not work w/ apache
Submitted: 2000-05-12 11:39 UTC Modified: 2006-04-03 09:33 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: kstone at trivergent dot net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.0 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 29 = ?
Subscribe to this entry?

 
 [2000-05-12 11:39 UTC] kstone at trivergent dot net
Running php with binfmt_misc on linux is beautiful.  You set it so that .php3 files are run automagically by /usr/bin/php3.  This allows you to do things like ./index.php3.  (No #! at the top of the file at all.)  You can run php under suexec transparently and without anyone modifying their code.  


The problem is that main.c does some environment variable checking.  If it sees "SERVER_NAME", etc, it assumes that it should be in cgi mode.  Putting a "cgi=0"; after the checks fixes that problem.  


It might be nice to offer that as a standard option to "configure".  It's a really neat way to use php.  It fixes a lot of security problems with cgi mode, lets you run with suexec, etc.  There is an option "--force-cgi-mode", would it be possible for someone to add a "--force-no-cgi-mode" or "--force-interpreter-mode" ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-10 14:19 UTC] jimw@php.net
refiled against 4.0.
 [2006-04-03 09:33 UTC] tony2001@php.net
As far as I understand, this is no longer valid, since we have separate server APIs and none of them require to modify the code.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 19:01:31 2024 UTC