Edit report at https://bugs.php.net/bug.php?id=62368&edit=1

 ID:                 62368
 Comment by:         dev at ioncube dot com
 Reported by:        stawi at plusnet dot pl
 Summary:            IonCube encoded files cannot work inside PHAR
 Status:             Not a bug
 Type:               Bug
 Package:            PHAR related
 Operating System:   Debian
 PHP Version:        5.4.4
 Block user comment: N
 Private report:     N

 New Comment:

To be clear, this is not a bug in PHP and we wouldn't have claimed it to be 
because we know precisely why PHAR's *can't* work due to the way that files are 
handled by the Loader.  (I did check our helpdesk and our very good apprentices 
in training don't appear to have claimed it as a PHP issue either.) 

We like the idea of PHAR's though, and came up with the PHAR concept ourselves 
long before it appeared in PHP as it's an appealing way to package an 
application or component; but it does have downsides hence never pursuing it 
ourselves. The Loader has an I/O abstraction mechanism and could probably be 
augmented to handle PHAR's, and it is something we already have tracked in our 
Mantis system, however demand from customers has been low for the feature hence 
it not making it into the product thus far.


Previous Comments:
------------------------------------------------------------------------
[2012-06-20 17:48:13] stawi at plusnet dot pl

Well OK.. Seems that IonCube guys need to work bit more ;)

------------------------------------------------------------------------
[2012-06-20 17:35:10] johan...@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.

The IonCube guys are welcome to discuss their issues or provide patches. We 
don't know what they do, what issues they have.

------------------------------------------------------------------------
[2012-06-20 07:49:06] stawi at plusnet dot pl

Description:
------------
=== uname -a ===
Linux debian 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux

=== php -v ===
PHP 5.4.0-2 (cli) (built: Mar  5 2012 12:52:15) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.2.1, Copyright (c) 2002-2012, by ionCube Ltd.


When i put a IonCube encoded file into PHAR archive and then try to include it 
I get that says file is corrupted.

I mailed to IonCube and they said this is PHP issue not theirs ;)

I believe that this will happen to all encoders and maybe optimizers.


Test script:
---------------
=== dummy.php ===
echo "Hello world!\n";

=== encoded.php
// Same as dummy.php but encoded.

=== test.phar ===
// Nothing special here, just added 2 files.

=== test.php ===
include 'phar://test.phar/dummy.php';
include 'phar://test.phar/encoded.php';
echo "DONE!\n";


Expected result:
----------------
Hello world!
Hello world!
DONE!


Actual result:
--------------
Hello world!
The file phar:///home/www/test.phar/encoded.php is corrupted.



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



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

Reply via email to