php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64574 apache2 Segmentation fault (11) when try to load classes from bytecode file
Submitted: 2013-04-03 07:01 UTC Modified: 2017-01-10 07:59 UTC
From: alipinokio at yahoo dot com Assigned:
Status: Suspended Package: bcompiler (PECL)
PHP Version: 5.3.23 OS: debian-6.0.0-i386
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alipinokio at yahoo dot com
New email:
PHP Version: OS:

 

 [2013-04-03 07:01 UTC] alipinokio at yahoo dot com
Description:
------------
PHP 5.3.23
Apache 2.2.16 

i'm using bcompiler to compile my php classes,after compile try to load and exec my class functions,in cli evry thing's fine but when i try to load my page using apache2,Bo00om!
apche error.log gives {exit signal Segmentation fault (11) }!
first time i'm try install php and apache by ap-get,after that try compile both from source code,few days search evry where for solution but this problem still exist!
can anyone help me plzzzzzz:|
(sorry for my bad english;) )

Test script:
---------------
<?php
$bytecode = "bytecode/bcompiler_1.phb";
$fileBytecode = fopen($bytecode,"w");
bcompiler_write_header($fileBytecode);
bcompiler_write_class($fileBytecode, "test2");
bcompiler_write_class($fileBytecode, "test");
bcompiler_write_footer($fileBytecode);
fclose($fileBytecode);

class test2 {
public function testOuter($data){
                return $this->result($data);} 
protected function result($data){
                 return ' test2 testOuter result -> '.$data;}
}

class test {
public static $val;

public function __construct($data){
    $obj = new test2();
    test::$val = $obj;}
    public function callIt($data){
    return test::$val->testOuter($data);}
}
?>

<?php
$fileBytecode2 = fopen("bytecode/bcompiler_1.phb","r");
bcompiler_read($fileBytecode);
fclose($fileBytecode);

$test = new test();
echo $test->callIt('88888888888');
?>

i also use diferent functions like include,bcompiler_(load,parse class,read,...)
but same problem...:(

Expected result:
----------------
test2 testOuter result -> 88888888888


Actual result:
--------------
web browser gives blank page and apache/error.log --> Segmentation fault (11)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-03 07:46 UTC] krakjoe@php.net
bcompiler is unmaintained.

However, APC is still being maintained and provides a binary dump feature, I 
would advise that it would be better to use the APC implementation.
 [2013-04-06 04:50 UTC] alipinokio at yahoo dot com
Hi krakjoe and tnx for reply
actually i need bcompier To encode some very important classes and/or functions in a proprietary PHP application to protect my php source code and  As far as I know APC do not provide this option,right?
i also tried phc but its not working and software like zend guard,ioncube  have decoders so thats not the best and safe option to use  have you any suggestion?:)
 [2017-01-10 07:59 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 07:59 UTC] kalle@php.net
Suspending this report as the extension have not had a release for almost 6 years.  Please revive this if the extension once again shows life
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 10:01:29 2025 UTC