Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2000 18:12:53 -0500 (CDT)
From:      Tom Duffey <tduffey@wi.rr.com>
To:        freebsd-questions@freebsd.org
Subject:   Apache+mod_ssl+PHP error
Message-ID:  <Pine.LNX.4.21.0009111751230.7968-100000@linuxpower.p00t.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0009111751230.7968-100000>