php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #15239 Apache's httpd.conf recommends something that will break file writing
Submitted: 2002-01-27 04:02 UTC Modified: 2002-02-15 15:11 UTC
From: doktor1 at earthlink dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: doktor1 at earthlink dot net
New email:
PHP Version: OS:

 

 [2002-01-27 04:02 UTC] doktor1 at earthlink dot net
Here's something you might want to add to any function's documentation that has to do with writing to files - like fopen(), session_start(), etc.

Apache's default httpd.conf currently ships with a section that looks like this:

User nobody
Group "#-1"

There is a section above that with a somewhat confusing instruction to use "Group nogroup" if you run SCO 3. It doesn't mention Linux, but does go into details of why you shouldn't use #-1 if your kernel can't use GIDs above 60,000. Let's assume some or most people tuning httpd.conf don't know whether that's true about Linux. :)

Anyway, if your httpd.conf looks like that under Linux (2.4 for sure, dunno about 2.2), PHP will not be able to open files. It'll complain about an invalid argument. That applies to session_start() and fopen() - I've tried both.

The solution is to use "Group nogroup". Once I changed my httpd.conf to use that instead of #-1, I was suddenly able to write files again.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-27 04:04 UTC] doktor1 at earthlink dot net
Correction to above... "will not be able to open files" should be "will not be able to open files for writing".
 [2002-02-14 13:27 UTC] nohn@php.net
i think, that's an apache problem, not an php problem.
 [2002-02-15 14:48 UTC] doktor1 at earthlink dot net
You're right, but it bears mentioning.
 [2002-02-15 15:11 UTC] nohn@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 05:01:28 2024 UTC