From:             tim at timcrider dot com
Operating system: Fedora Core 2
PHP version:      5.0.0RC3
PHP Bug Type:     Scripting Engine problem
Bug description:  stream fails to close if malformed interface is used

Description:
------------
While playing around with interfaces I came across this error message.

/data/BUILD/php/main/streams/streams.c(374) : Stream of type 'STDIO'
0xf7085204 (path:permissionInterface.php) was not closed

If you do not include permissionInterface.php, and actually write out that
code the error does not occur. The error does not occur also if the
interface is properly formatted.

Here is some general info:

PHP 5.0.0RC3 on Fedora Core 2

Libs:
-lcrypt -lexslt -lcrypt -lpq -lpanel -lncurses -lmysqlclient -lming -lm
-lmhash -lmcrypt -lltdl -lfreetype -lpng -lz -ljpeg -lz -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lgcc -lxml2 -lz -lm -lxml2 -lz -lm -lodbc -lxml2
-lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxslt -lxml2 -lz -lm
-lcrypt

Includes:
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM

LDFlags:
-rdynamic -rdynamic -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/local/libxml2-2.6.9/lib -L/usr/local/lib
-L/usr/local/openssl-0.9.7d/lib -L/usr/local//lib -L/usr/local/lib/mysql
-L/usr/local/pgsql/lib



Reproduce code:
---------------
#!/usr/local/bin/php -q
<?php

 require_once "permissionInterface.php";

/** BEGIN CONTENTS OF permissionInterface.php
 interface permissionInterface 
 {
    public function authenticate(){ }
    public function getUserProfile();
    public function getUserGroups();
    public function logout();

 }
END CONTENTS OF permisionInterface.php **/

 class bar implements permissionInterface
 {
   private function __construct() { }
   public function authenticate() {}
   public function getUserProfile() {}
   public function getUserGroups() {}
   public function logout(){}
 }

 $phoo = New bar;

 print_r($phoo);

?>

Expected result:
----------------
Fatal error: Interface function permissionInterface::authenticate() cannot
contain body in /home/tim/projects/permissionWheel/permissionInterface.php
on line 5


Actual result:
--------------
Fatal error: Interface function permissionInterface::authenticate() cannot
contain body in /home/tim/projects/permissionWheel/permissionInterface.php
on line 5
/data/BUILD/php/main/streams/streams.c(374) : Stream of type 'STDIO'
0xf7085204 (path:permissionInterface.php) was not closed

-- 
Edit bug report at http://bugs.php.net/?id=29042&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29042&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29042&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29042&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29042&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29042&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29042&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29042&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29042&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29042&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29042&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29042&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29042&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29042&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29042&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29042&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29042&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29042&r=float

Reply via email to