|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58867 bdecode_load() doesn't work on read class
Submitted: 2009-09-26 06:13 UTC Modified: 2009-12-04 19:34 UTC
From: rossinidan at gmail dot com Assigned:
Status: Closed Package: bcompiler (PECL)
PHP Version: 5.2.10 OS: Debian Squeeze 2.6.30-1-686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rossinidan at gmail dot com
New email:
PHP Version: OS:


 [2009-09-26 06:13 UTC] rossinidan at gmail dot com
I have installed successfully bcompiler 0.8s on php 5.2.10-2.2 with debian 2.6.30-1-686, but when I try to use bcompiler-load on a class this does't work. It work if I
use the functions.

Reproduce code:
  /*Class test */
class Greeting{
   var $message;
   function Greeting($message){
       $this->message = $message;

   function showMessage(){
      echo( $this->message) ;



  /* Source to encode */
  include('classTest.php') ;
  $fp = fopen("/tmp/test.pbc","w");




  /* decodeBcompiler.php */
  $fp = fopen("/tmp/test.pbc","r");
  bcompiler_read ($fp) ;

  $hello = new Greeting() ;


Expected result:
Read a class with bcompiler

Actual result:
When I try to execute the decodeBcompiler.php the browser call me to import and  the file decodeBcompiler.php.
I have installed php, php-pear, php-cli with apt-get command and bdecode with:
  pecl install bcompiler-0.8

After I have added to /etc/php5/apache2/php.ini

   Danilo Rossini


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-04 12:57 UTC]
Please check the latest release (0.9.1), on PHP 5.2.11-dev I can't reproduce this bug (maybe it's already fixed).

I've made a small change to your decode file (besides changing bytecode filename):
  /* decodeBcompiler.php */
  $fp = fopen("bug-16849-class.pbc","r");
  bcompiler_read ($fp) ;

  $hello = new Greeting("hello") ;

When I run this script, I see the expected output:
$ ./php bug-16849-run.php
 [2009-12-04 19:34 UTC] rossinidan at gmail dot com
It works also under Ubuntu 9.10 with kernel 2.6.32-2-386! Tanks a lot. ;)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 14:01:29 2024 UTC