|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-11 13:17 UTC] meat at reed dot edu
This problem first occurred for me on PHP 4.3.2, and installing the CVS snapshot for 6-10-2003 did not help. When calling session_start() for the first time, in a script as simple as this one: <?php session_start(); ?> This warning appears in the browser: Warning: session_start(): read failed: Value too large for defined data type (75) in /usr/local/httpd/webapp/ html/tools/lib/std.php on line 19 Line 19 in the above script is simply "session_start()". If I preface the call with an @ to turn off warnings/errors, then the script works as intended. If I remove the @ while the session is active, the error is not given, but as soon as I log out (i.e. call session_destroy()), it comes back. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 16:00:01 2025 UTC |
ok, i also had this bug with 4.3.2 on a RH 6.2 system and could reproduce it. the php source code for this shows in 4.2.2: ------------------------------------- if (n != sbuf.st_size) { efree(*val); return FAILURE; } ------------------------------------- while in 4.3.2: ------------------------------------- if (n != sbuf.st_size) { if (n == -1) php_error_docref(NULL TSRMLS_CC, E_WARNING, "read failed: %s (%d)", strerror(errno), errno); else php_error_docref(NULL TSRMLS_CC, E_WARNING, "read returned less bytes than requested"); efree(*val); return FAILURE; } ------------------------------------- so basically its the same code as in 4.2.2 just with some warning-messages added. so i assume the reason for the warnings was also there in 4.2.2. but with 4.2.2 the whole stuff worked, so maybe that warning should be safe to ignore. i just commented the 2 warnings out in the source code, works for me now (altough not a clean solution;) i think the whole stuff might be caused by some 32/64 bit troubles in the system. this is what i found somewhere else: ------------------------ At a glance I'd say an lstat limit. There's an lstat64() call whose returned structure has wider size fields. That's the core reason for this ugly open64/lseek64/... fiasco - binary compatability :-( Given that system calls are a binary API you're pretty much stuck with this. ---------------------------