php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41706 bcompiler feature request
Submitted: 2007-06-15 17:39 UTC Modified: 2007-06-16 09:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: roberto at spadim dot com dot br Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.3 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: roberto at spadim dot com dot br
New email:
PHP Version: OS:

 

 [2007-06-15 17:39 UTC] roberto at spadim dot com dot br
Description:
------------
FROM THE SAME EMAIL TO alan_k@php.net

hello alan, i was using bcompiler to act like an php source code compiler
i write something like:

   $fh = fopen($destination, "wb");
   $ret1=bcompiler_write_header($fh);
   $ret2=bcompiler_write_file($fh,$source);
   $ret3=bcompiler_write_footer($fh);
   fclose($fh);

ok
when i run the file on another path that wasn't the same that i "encoded" it apache send me this error:

*Warning*: Could not redefine function spd_echo in */home/apache/172.16.0.1/work-rdm/encoder/rdm-business/index.spadim* on line *2*

this is very strange, since my file is located at
/home/apache/172.16.0.1/rdm-encoded/
and it's not a symbolic link it's a real file

any idea?
thanks
if i could just "compile" the code could be easier :) since it's what i'm searching, i bought the byterun compiler but it don't work at php 5.2



Reproduce code:
---------------
see description

Expected result:
----------------
see description

Actual result:
--------------
see description

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-15 17:40 UTC] roberto at spadim dot com dot br
i was thinking

could you make an function like this:


$content=bcompiler_get_compiled_data_from_file("file_that_i_want_bytecode_to_be_removed.php");
file_put_contents("file_encoded_with_byte_codes.php",
"<?php
   bcompiler_execute_from_string(base64_decode(\"".base64_encode($content)."\"));
?>");


this is what i'm searching
read an file
get content data of bytecode, (since i don't know zend core very well, i can't get bytecode from my php source)
create an file that load bytecode

with this we remove problems of file location and other stuffs, since code is "bytecoded" and loaded again from another function (bcompiler_execute_from_string)

thankx alan
 [2007-06-16 09:46 UTC] bjori@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please file PECL bug reports/feature requests in the PECL bugtracker: http://pecl.php.net/bugs/report.php?package=bcompiler
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC