php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42615 session build as shared causes ext/standard/tests/file/bug27508.phpt to fail
Submitted: 2007-09-10 17:57 UTC Modified: 2010-12-20 12:28 UTC
From: igor at ypass dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.2.4 OS: Solaris 10 x86
Private report: No CVE-ID: None
 [2007-09-10 17:57 UTC] igor at ypass dot net
Description:
------------
The command below works fine without -d "extension=session.so".  This issue was not present in 5.2.3 with the same build options.

Reproduce code:
---------------
/src/php-5.2.4/sapi/cli/php -c '/src/php-5.2.4/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=8191" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "extension_dir=/src/php-5.2.4/modules/" \
-d "extension=session.so" \
-d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -f "/src/php-5.2.4/ext/standard/tests/file/bug27508.php"


Expected result:
----------------
bool(false) refcount(1)
0
bool(false) refcount(1)
line1
line2
line3


Actual result:
--------------
Warning: fopen(): URL using bad/illegal format or missing URL in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 8

Warning: fopen(/tmp/foo7oaaaG): failed to open stream: No such file or directory in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 8

Warning: fwrite(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: fwrite(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: fwrite(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: feof(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30
bool(false) refcount(1)

Warning: fseek(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 35

Warning: ftell(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 25
0

Warning: feof(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30
bool(false) refcount(1)

Warning: feof(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30

Warning: fread(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 15

Warning: feof(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30

Warning: feof(): supplied argument is not a valid stream resource in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30

loops like this forever (eventually it stops with out of memory error)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-11 11:01 UTC] jani@php.net
See bug #27508 (just note to get the friendly url here :)
 [2007-09-11 11:36 UTC] jani@php.net
How about running simply 'make test' ? In 5.2.4 there is no such make line you have pasted here..
 [2007-09-12 20:21 UTC] igor at ypass dot net
Yeah, this error comes from 'make test'.  I just tried to make it easier for you. :)  I added -v to run-tests in Makefile.

=================
TEST /src/php-5.2.4/ext/standard/tests/file/bug27508.phpt
TEST 2718/3739 [ext/standard/tests/file/bug27508.phpt]
CONTENT_LENGTH  =
CONTENT_TYPE    =
PATH_TRANSLATED = /src/php-5.2.4/ext/standard/tests/file/bug27508.php
QUERY_STRING    =
REDIRECT_STATUS = 1
REQUEST_METHOD  = GET
SCRIPT_FILENAME = /src/php-5.2.4/ext/standard/tests/file/bug27508.php
HTTP_COOKIE     =
COMMAND /src/php-5.2.4/sapi/cli/php -c '/src/php-5.2.4/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=8191" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "extension_dir=/src/php-5.2.4/modules/" -d "extension=openssl.so" -d "extension=zlib.so" -d "extension=bcmath.so" -d "extension=bz2.so" -d "extension=calendar.so" -d "extension=ctype.so" -d "extension=dba.so" -d "extension=dom.so" -d "extension=exif.so" -d "extension=ftp.so" -d "extension=gd.so" -d "extension=gettext.so" -d "extension=gmp.so" -d "extension=hash.so" -d "extension=iconv.so" -d "extension=imap.so" -d "extension=json.so" -d "extension=ldap.so" -d "extension=mbstring.so" -d "extension=mcrypt.so" -d "extension=mhash.so" -d "extension=mime_magic.so" -d "extension=mysql.so" -d "extension=mysqli.so" -d "extension=ncurses.so" -d "extension=pcntl.so" -d "extension=pdo_sqlite.so" -d "extension=posix.so" -d "extension=pspell.so" -d "extension=readline.so" -d "extension=session.so" -d "extension=shmop.so" -d "extension=snmp.so" -d "extension=soap.so" -d "extension=sockets.so" -d "extension=sqlite.so" -d "extension=sysvmsg.so" -d "extension=sysvsem.so" -d "extension=sysvshm.so" -d "extension=tidy.so" -d "extension=wddx.so" -d "extension=xmlreader.so" -d "extension=xmlrpc.so" -d "extension=xmlwriter.so" -d "extension=xsl.so" -d "extension=zip.so" -d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -f "/src/php-5.2.4/ext/standard/tests/file/bug27508.php"  2>&1

Fatal error: Out of memory (allocated 170917888) (tried to allocate 166985750 bytes) in /src/php-5.2.4/run-tests.php on line 896
make: [test] Error 255 (ignored)
 [2007-09-13 10:16 UTC] jani@php.net
Why an earth are you building session as shared anyway..? (just curious since it doesn't make sense at all..)
 [2007-09-13 15:43 UTC] igor at ypass dot net
Why not if sessions are not used?  I am just trying to build a 'minimal' php binary.

Anyway, building the session extension statically fixes the issue.

Thanks for your help.
 [2007-09-19 13:52 UTC] jani@php.net
I can not reproduce this. Please provide the shortest possible configure line you can still reproduce this with.
 [2007-09-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-12-20 12:28 UTC] jani@php.net
-Package: Tidy +Package: Session related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC