ID: 29042
Updated by: [EMAIL PROTECTED]
Reported By: tim at timcrider dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Fedora Core 2
PHP Version: 5.0.0RC3
New Comment:
The problem has nothing to do with interfaces and seems to appear on
any parse error and only when PHP was compiled with --enable-debug.
See #30708 - it describes the same issue, but has a bit more correct
example.
Previous Comments:
------------------------------------------------------------------------
[2004-07-07 04:04:37] tim at timcrider dot com
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 this bug report at http://bugs.php.net/?id=29042&edit=1