Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phing phar outputs gibberish on hhvm #5139

Closed
Vhab opened this issue Apr 7, 2015 · 8 comments
Closed

Phing phar outputs gibberish on hhvm #5139

Vhab opened this issue Apr 7, 2015 · 8 comments

Comments

@Vhab
Copy link

Vhab commented Apr 7, 2015

Unfortunately I can't dive into the issue to determine whether the issue is on Phing's side or HHVM, but the following steps work on php 5.3 and 5.6 while they don't on hhvm latest stable and nightly:

wget http://www.phing.info/get/phing-latest.phar -O phing.phar
php phing.phar -v

Expected output:

Phing 2.10.1

Received output looks like a few lines of random memory dump.

Tested on Ubuntu precise 64-bit.

@ghost
Copy link

ghost commented Apr 11, 2015

what compression does the phar file use? gzip? zip?

@Vhab
Copy link
Author

Vhab commented Apr 13, 2015

Unfortunately I don't know. We're just using Phing and noted the incompatibility when setting up tests with hhvm.

@psy-q
Copy link

psy-q commented Apr 13, 2015

The Symfony phar file does the same. To reproduce:

curl -LsS http://symfony.com/installer > symfony.phar
php symfony.phar

It will spit out a bunch of lines of binary gibberish. On hhvm 3.6.1 and on 3.7.0-dev:

HipHop VM 3.7.0-dev (rel)
Compiler: heads/master-0-gcf047fe5c43aa7133ce5703d883251a3da486821
Repo schema: 9981acfe90e4e9812a5f3b03362744cae060a1d0

Tested on Debian jessie.

@bauerj
Copy link
Contributor

bauerj commented Apr 19, 2015

It does not seem to be compressed at all:

bauerj@dev~/test # wget http://www.phing.info/get/phing-latest.phar -O phing.phar
2015-04-19 23:33:26 (27.1 MB/s) - `phing.phar' saved [851181/851181]

bauerj@dev~/test # php phing.phar -v
Phing 2.10.1

bauerj@dev~/test # cat > 5139.php
<?php
$phar = new Phar('phing.phar');
var_dump($phar->isCompressed());


bauerj@dev~/test # php5 5139.php
bool(false)

root@bauerj ~/test # hhvm 5139.php
bool(false)

@bauerj
Copy link
Contributor

bauerj commented Apr 19, 2015

Also, the binary gibberish HHVM outputs for the phing.phar is actually the binary data at the end of the phar file. (0xcf5b3-0xcf907)

@Orvid
Copy link
Contributor

Orvid commented May 18, 2016

phing.phar doesn't output gibberish anymore, instead it complains about the build file not being found. Symphony still outputs gibberish though.

@astorm
Copy link

astorm commented Jun 15, 2016

Hello people I don't know. I maintain and distribute an open source project with a phar, and users have reported the same problem. Adding the specifics in case one more data point helps.

$ curl -LO http://pestle.pulsestorm.net/pestle.phar
$ hhvm pestle.phar 
?kS?H?;?bB???:V6Uw?uI??,?%???O%?1?!k?#  ?m?߯{?#??r.
??^S??)???}?q???]{??zƊM!????&Q'?Oii7??X[?ےq??(?s????????*?< ?p?HV\?????z???i???????4)?`rp?`??????3??W???:?$?bA.;??    G?dy?O?$~??\6????K?1    ?????
                                                                     ?4 ?>V???Ŋ?(ij??d?J|l?VMN??4?V?F??:?Z???.?:T5?i??tÈZÎ$/??U'?J?DeU??V?48??:+?*^ۣ?\)6?L?|)׌?$݄?<????$?E?V֠Lx]??SB??9[?0X,??4??͍?|?yr??
                                     %??u32u?[(y???^Ηo?*
                                                        r?G???v
?
??URޥ?M?5??]???Q??KO?vK
                       ??T~1??3?-9??9-s@΃?/????F???1>?eb???%@?i??????SW&?JY?K?E& (?6??????'??\p????:????x!?y? ?2?M??}??ۭz?J?FG?o?N`V??ؗ??U?gu-?#?    m?q\?e?e
                                                                        )?*?d?:X0?O?{w?x?Ij???z?:?Dpy????4&????????I?V??q?u=ĚN?Y??o`?r?#??{V?f?J?B??cW6??ss~?H?&?}{DŽ??,ɳ?ҕ??'??79ˠ6??I??1El?T??F?|??#?D
                                       n?l?A>W?8v?@??=??hcD
                                                           t??Ҍ?T ?\???yj?<|??"͛??]??}`\  "?0 ?????U?Ӛ7?bݲ??cdj???q???xH~???-C?p^?N?u?g?wM??b?M?????j"fE?_R?(?<?.f?W???4?9G?G_???X'@\{????ũh??
??j??bE?j   ̑C?C??????q????6T߻???ǃ??)?P>??g?@??TS6OLj?U\?O?{?/????8xYlK?)???'vKy?'???:;9}odc2?Cӌyt??F?X??Щ?`D?:̌0??
                                    ??B??r8?`?^#=???JR?|??cDɊ?Z????2?
d???
???-?i??D
         ?۟?#?-?+?TBw# =N
F?&ݘ??1????jAo{:6Ň?w?ڥY?Il?zj?C?Ƙw?"j?э嚂??@?OJoW@iiX?qb?N????5羋?ؿ(?Ƭ8????:?\?D?)?C?p +???j(??6???E0$??<???5?????q~7RA_???>?!??+p<???伆?Į+?g?T\ד??k?<?E?????0?
                                                                               Ev?R?6T?NL??W?~!??~us^?LY?/Xi??0?}?J?? j3Xpʖ??1a~c״?g?k?I
CS.=MP???r?^??fXKLOŕ`U??y???5????T?0?qz??\F??????(?p?F}d:e???
                                                             :ud?P?m??):DD??P?{???Q? 8?qή?T?U?Y??G??F?&??o?y???l4Tl
g?"/?9a|??U?"??jȆr?&v??X???蠇]?en?Tu+?N????(????
??C@?x;9??㡂?uFg??5#?O?T?i?9i=?"?????]??踿Y???(?р?D?3???7?rs
_0}-??R0??X!i????-M2???%k?}?f???+??1??rdFf???Н?̡??@??]t??>?K?hy?<d,??-?]U??"h?&?רDQM1?C?&?$?&5?Ro(z2??-%?IQ???B????I???P5?tt?͎?KƊϗPhC?@Рߴ???`??ԕ&?× ??I??<??G?0?? ?(??t?/????3?ʶYm?????A???_?m??? ?g??=c4?q0x
                    *[?v^?'w1?x???w???N?4???΁?a?s?N??ie??;v???-+?~??Z?N@$x
7z?wj)k
3&? X????}???FlI???C?V?"??  ???
                                   L?JyV?;W?G?0*iN???;?)?y?Cs???X?g?ײ???p??,f7L:?????\??$?1B?z?&y~??]e?;;k}Q?F?�,???00??*Z?nÌ????B<k7????L??7~?|8????8<??}kY?2`?гAܨ¹ ?e???0<H??�D?.?I??i?
                         ????7??Xi??1P???7L2??C???????w$t?I???Z?Q??aQ>?F????%??0?'?Q`;X*l?i????E????+?\ߛ??
W???ՐS?r?)??<K?PvZ??1??Za?tf?N?y?aY'Њx8?{)϶l?h?S?VE?ƴ,???A??????$?\ن̉vM?WM?w
           ?r?D?&???????'?VG????7?A?(J???qdQ?tT?\?????봇?z?5T?????????]????????'?col?????:
F>?:?{????L;mX?Hw^?wA?3%???񦈑??'??;??|?=E?z???°??Q̢?MV????C????óc????O?%?Ӑ??R??'m?2??5??׀????M?4x??S?(?????
Fatal error: Call to undefined function Pulsestorm\Pestle\Runner\main() in /tmp/pestle.phar on line 7

@lexidor
Copy link
Collaborator

lexidor commented May 20, 2020

I am going over old issues on this repository, to see which ones apply to the current versions of hhvm.

Hhvm dropped support for the phar extension in version 4.1.0.

@lexidor lexidor closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants