From owner-freebsd-questions Mon Sep 11 16: 2:44 2000 Delivered-To: freebsd-questions@freebsd.org Received: from linuxpower.p00t.net (mke-160-240-116.wi.rr.com [24.160.240.116]) by hub.freebsd.org (Postfix) with ESMTP id B09BC37B424 for ; Mon, 11 Sep 2000 16:02:40 -0700 (PDT) Received: from localhost (trout@localhost) by linuxpower.p00t.net (8.10.2/8.10.2) with ESMTP id e8BNCr308074 for ; Mon, 11 Sep 2000 18:12:53 -0500 Date: Mon, 11 Sep 2000 18:12:53 -0500 (CDT) From: Tom Duffey To: freebsd-questions@freebsd.org Subject: Apache+mod_ssl+PHP error Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear FreeBSD Users, For quite some time I've been having a mysterious problem with PHP on every FreeBSD server I've used it with. I had hoped the problem was me, but now that I've experienced the same thing on a handful of FreeBSD 4.1-R machines I'm not so sure. First of all, I've used both the Apache13-modssl port and the same compiled from source. PHP is version 4.0.2 compiled from source. The problem is PHP is unable to write session data. I have worked through this with one of PHP's main developers (Sascha) and he had direct access to one of the machines with the problem. After triple checking Apache and PHP's configurations, he came up with the following: IIRC the problem was that Apache got an fd from open(2), then the PHP module started and got the same fd again. The strange thing was that Apache did not close the fd in the meantime. It's probably a bug in FreeBSD, at least noone has reported this problem on any other OS. The problem does not occur with the stock Apache+mod_ssl port + PHP. It only starts happening after I add a few virtualhosts to the configuration. In addition, it seems like (although I'm not positive yet) if I comment out all of the virtualhost log directives the problem goes away. I will try and confirm this. I must admit he's right about other operating systems not exhibiting this behavior. I have identical setups on Linux machines that work perfectly. The server I'm working on now has 3 IP-based virtualhosts in addition to the main Web site. At this point the problem is intermittent - every few days I get a few "failed to write session data" in Apache's error log. From past experience, I suspect that adding another virtualhost to this box would make the problem constant. Does anyone have any ideas? Thanks, Tom Duffey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message