Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16825 - Apache/PHP session files not being read
Summary: Apache/PHP session files not being read
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 21870
  Show dependency tree
 
Reported: 2003-03-04 09:41 UTC by Fabian Hirschmann
Modified: 2006-02-04 06:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Hirschmann 2003-03-04 09:41:21 UTC
There's a PPC only bug in PHP ([...]/php-*/ext/session/mod_files.c / line 275?).
The Problem isn't permissions or/and the php.ini.

PHP is failing to read sessions files after register some Session variables in it. 

The Script (see below in "Step to Reproduce") works well on other non-PPC
systems. Same Problem with older PHP versions.

Reproducible: Always
Steps to Reproduce:
1. Set up Apache with php
2. Copy this script to the htdocs root (as session.php):

-----------------------------------------
<?php
/* session.php */
session_start();
if (!isset ($_SESSION['count'])) {
    $_SESSION['count'] = 0;
}
printf ("<html><body><a href='session.php'>count %d</a></body></html><br>",
++$_SESSION['count']);
?> 
-----------------------------------------

3. Edit /etc/php4/php.ini -> session.use_trans_sid = 1
4. Turn off cookies in your browser
5. Load the PHP script in you browser
6. tail -f the current session file in /tmp/
7. Klick on "count 1"
Actual Results:  
PHP reported: 

Warning: session_start() [function.session-start]: read returned less bytes than
requested in /home/httpd/htdocs/session.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache
limiter - headers already sent (output started at
/home/httpd/htdocs/session.php:3) in /home/httpd/htdocs/session.php on line 3

Expected Results:  
count up from 1 (1, 2, 3, 4, ...) while klick on "count x"

php/mod_php version: 1.3.1
apache version: 1.3.27-r3

=================================================================
System uname: 2.4.20-ben7 ppc 
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="oss dvd xv jpeg nls mitshm gif sdl oggvorbis motif mozilla png truetype ppc
gdbm berkdb slang readline gpm tcpd pam libwww ssl perl python esd imlib qt
opengl ipv6 X gtk gnome -kde"
COMPILER="gcc3"
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-O3 -pipe -mcpu=750"
CXXFLAGS="-O3 -pipe -mcpu=750"
ACCEPT_KEYWORDS="ppc"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache"
Comment 1 Mark Guertin 2003-03-07 14:01:59 UTC
I have confirmed this, but have yet been able to track down why.. I'm suspecting something in php's read code.

Do you know if this applies to non gentoo versions of php? (my php machine is _very_ slow)
Comment 2 Mark Guertin 2003-04-11 11:43:59 UTC
has anyone looked at this?  It's still sadly broken and unusable
Comment 3 Mark Guertin 2003-04-11 11:45:51 UTC
moving this to major severity, any PHP based stuff that tries to use sessions (most advanced stuff does), is completely unusable currently due to this
Comment 4 Jan Lehnardt 2003-04-15 04:09:52 UTC
Hi folks,
I cannot reproduce this on my Debian PPC (Linux version 2.4.20 (root@jan) (gcc version 2.95.4 20011002 (Debian prerelease)) #2 Wed Feb 19 18:38:53 CET 2003)
I get the expected results and no error messages.
I am running php5 latest cvs and apache 1.3.26.
If you need more information or want me to test certain stuff, just drop me a mail at jan@php.net
Comment 5 Jan Lehnardt 2003-04-15 18:04:31 UTC
I was able to reproduce the bug with php4.3.x-dev (from snaps.php.net some minutes ago) and the 4.3.1 release.
Comment 6 Mark Guertin 2003-04-17 16:46:44 UTC
Hmm, I guess there are no developers even responding to this, sadly

is there -anyone- out there dev wise?  any response would be appreciated.

If this is in fact an upstream issue, then someone really needs to resurrect a working 
build for PPC

building from source I didn't have this problem, so it may be somehting specific to a 
conigure option used.
Comment 7 Graham Forest 2003-04-17 18:50:02 UTC
I am paying attention. There is only so much I can do, due to my lack of knowledge of PHP, but this issue is definitely on my mind. I'll talk to Jan about it.
Comment 8 Luca Barbato gentoo-dev 2003-06-28 16:33:18 UTC
seems an upstream problem, reported and reproduced on debianppc too.

seems fixed in the cvs
Comment 9 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 02:00:03 UTC
thnxs upstream developers. Going to close this bug on ppc and reassign to robbat2.

PPC is in need of a php cvs snapshot ebuild. As current stuff breaks
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-07-15 14:28:12 UTC
For wanting a PHP snapshot build, could you please specify how recent a build you want ?

If you have time on your hands (I'm really busy at work this week) please provide me a link to a tarball that you know works, and handle ebuilds for it.
I want to test any CVS snapshot throughly on x86 first, due to the potentional for breakage.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 19:02:20 UTC
I've put PHP4.3.3_rc3 into the tree, with ACCEPT_KEYWORDS="-* ~ppc"

It fails on these tests for x86:

InterBase: BLOB test [ext/interbase/tests/004.phpt]
Bug #24142 (round() problems) [ext/standard/tests/math/bug24142.phpt]
Bug #24063 (serialize() missing 0 after the . on scientific notation) [ext/standard/tests/serialize/bug24063.phpt]

please test it heavily.
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 19:04:52 UTC
Closing as it should hopefully work.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-25 18:15:38 UTC
closing again.