php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57281 uppercase in class names damages bytecode
Submitted: 2006-10-05 17:15 UTC Modified: 2006-12-17 06:00 UTC
From: t0nni at gmx dot net Assigned: val (profile)
Status: Closed Package: bcompiler (PECL)
PHP Version: 5.1.6 OS: Windows XP Pro SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: t0nni at gmx dot net
New email:
PHP Version: OS:

 

 [2006-10-05 17:15 UTC] t0nni at gmx dot net
Description:
------------
I use PHP5.1.6 as an Apache2.2.3 module with the bcompiler extension (version 0.8s) installed.
I get the error if there is any uppercase character in the class declaration. It does not matter if the classname is written with uppercase letters at useage or as parameter for bcompiler_write_class.

Reproduce code:
---------------
compile.php:
<?php
class fooBar {}

$h=fopen('bytecode.php', 'w');
bcompiler_write_header($h);
bcompiler_write_class($h, 'fooBar');
bcompiler_write_footer($h);
fclose($h);
?>

run.php:
<?php
include 'bytecode.php';
$instance=new fooBar();
?>

Expected result:
----------------
I expected run.php to run without an error.

Actual result:
--------------
Fatal error: Class 'fooBar' not found in run.php on line 3

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-13 14:58 UTC] val@php.net
try to use bcompiler_write_file(), it's now prefered way of doing things with bcompiler. and it works fine with your example

but I will fix older bcompiler_write_class() asap...
 [2006-12-17 06:00 UTC] val@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

fixed for classes written with bcompiler_write_class() on CVS in bcompiler.c revision 1.108
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 01:03:48 2022 UTC