Re: PHP problems (Warning: session_start(): read returned less bytes than requested)
Joost De Cock said:
> On Tuesday 03 August 2004 22:48, Bojan Baros hurled the following on the
> wire:
>> Hello Deb-users...
>>
>> I started having some problems with PHP since the last upgrade, but I am
>> not sure if it actually caused it. I primarly use my web server for the
>> Gallery. The system is 100% unstable dist.
>
>> Warning: session_start(): read returned less bytes than requested in
>> /usr/share/gallery/session.php on line 60
>
> Hello Bojan,
>
> This looks like PHP Bug #21877
> http://bugs.php.net/bug.php?id=21877
> but I'm not sure that it is present in your version.
> If it is the bug, you can code around it (look for examples in the bug
> report), but since it's not your code, you may not be so eager to :)
> What happens on line 60 in session.php. Or what version of gallery is
> setup,
> so I can check their webCVS.
>
> joost
>
Hello Joost.
Here's the code from session.php of the gallery (1.4.4-1):
/* emulate register_globals for sessions */
if (!$gallery->register_globals) {
if (is_array($HTTP_SESSION_VARS) && !empty($HTTP_SESSION_VARS)) {
foreach($HTTP_SESSION_VARS as $key => $value) {
$$key =& $HTTP_SESSION_VARS[$key];
}
} /* <======== LINE 60 */
elseif (is_array($_SESSION) && !empty($_SESSION)) {
foreach($_SESSION as $key => $value) {
$$key =& $_SESSION[$key];
}
}
}
The funny thing is that gallery worked well until this problem. I thought
that something changed in the gallery as well, so I tried the version from
testing (which is 1.4.3-pl2-1 I believe), and that one had problems.
I thing that somehow the sessions got mangled up, it might even be in the
apache for all I know. I tried downgrading it as well, but no dice.
I am going to play a little bit more with some php settings, turn on the
debug and so forth, and see what happens.
Bojan
Reply to: