php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57705 features request
Submitted: 2007-06-16 16:22 UTC Modified: 2007-06-16 22:51 UTC
From: roberto at spadim dot com dot br Assigned:
Status: Not a bug Package: bcompiler (PECL)
PHP Version: 5.2.1 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.
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-16 16:22 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-16 16:22 UTC] roberto at spadim dot com dot br
[2007-06-15 17:40:35] 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 22:51 UTC] alan at akbkhome dot com
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

The bugs system is not really a support channel - pecl-dev@php.net

I suspect your message is due to some include being called within the compiled file.

You would get the same error if you did the from_String stuff. (= if someone wants to send a patch I could add that in)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC