ID:               41706
 User updated by:  roberto at spadim dot com dot br
 Reported By:      roberto at spadim dot com dot br
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: linux
 PHP Version:      5.2.3
 New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[2007-06-15 17:39:03] roberto at spadim dot com dot br

Description:
------------
FROM THE SAME EMAIL TO [EMAIL PROTECTED]

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41706&edit=1

Reply via email to