Giter Site home page Giter Site logo

phive binary gets corrupted about phive HOT 7 CLOSED

phar-io avatar phar-io commented on September 16, 2024
phive binary gets corrupted

from phive.

Comments (7)

sebastianbergmann avatar sebastianbergmann commented on September 16, 2024 1

@belanur Good to hear that it's not intentional ;-)

from phive.

sebastianbergmann avatar sebastianbergmann commented on September 16, 2024

Turns out that it does not matter how I invoke phive:

$ phive install phpunit                           
Downloading https://phar.phpunit.de/phive.xml
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
[WARNING]  Failed with status code 0:  
[ERROR]    PublicKey 4AA394086372C20A not found on key servers 
$ phive install phpunit                                                                                

Warning: require(phar://phive.phar//src/Factory.php): failed to open stream: phar error: internal corruption of phar "/usr/local/bin/phive" (actual filesize mismatch on file "src/Factory.php") in /usr/local/bin/phive on line 132

Call Stack:
    0.0001     398120   1. {main}() /usr/local/bin/phive:0
    0.0003     463520   2. spl_autoload_call() /usr/local/bin/phive:139
    0.0003     463616   3. PharIo\Phive\{closure}() /usr/local/bin/phive:139


Fatal error: require(): Failed opening required 'phar://phive.phar//src/Factory.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/local/bin/phive on line 132

Call Stack:
    0.0001     398120   1. {main}() /usr/local/bin/phive:0
    0.0003     463520   2. spl_autoload_call() /usr/local/bin/phive:139
    0.0003     463616   3. PharIo\Phive\{closure}() /usr/local/bin/phive:139```

from phive.

sebastianheuer avatar sebastianheuer commented on September 16, 2024

This could be related to #42. It seems like PHIVE changes the contents of it's own PHAR, causing the issue described here.

from phive.

sebastianbergmann avatar sebastianbergmann commented on September 16, 2024

Using phive from a Git checkout works in general:

$ /usr/local/src/phive/phive install phpunit
Phive 0.2.0-88-gf26cacf-dirty - Copyright (C) 2015-2016 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://phar.phpunit.de/phive.xml [ 57.52 KB / 57.52 KB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar [ 2.70 MB / 2.70 MB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc [ 819 B / 819 B - 100% ]
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
Sucessfully downloaded key

    Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A

    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)

    Created: 2014-07-19

Import this key? [Y|n] Y
Symlinking phpunit-5.3.1.phar to /home/sb/tools/tools/phpunit

However, the way I understand the phive install phpdox bin/phpdox example on the phar.io website still does not work:

$ /usr/local/src/phive/phive install phpunit /usr/local/bin/phpunit
Phive 0.2.0-88-gf26cacf-dirty - Copyright (C) 2015-2016 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading repository list from https://phar.io/data/repositories.xml
Downloading https://phar.io/data/repositories.xml [ 873 B / 873 B - 100% ]
Downloading https://phar.phpunit.de/phive.xml [ 57.52 KB / 57.52 KB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar [ 2.70 MB / 2.70 MB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc [ 819 B / 819 B - 100% ]
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
Sucessfully downloaded key

    Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A

    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)
    Sebastian Bergmann <[email protected]> (2014-07-19)

    Created: 2014-07-19

Import this key? [Y|n] Y
Symlinking phpunit-5.3.1.phar to /home/sb/tools/tools/phpunit
[ERROR]    Could not resolve alias /usr/local/bin/phpunit 

from phive.

sebastianbergmann avatar sebastianbergmann commented on September 16, 2024

@belanur I do not understand #43 (comment). Why does phive modify its own PHAR?

from phive.

sebastianheuer avatar sebastianheuer commented on September 16, 2024

Unfortunately the example on the website is wrong; you cannot specify the destination (yet). so the second argument will be treated as another alias of a PHAR you want to install.

from phive.

sebastianheuer avatar sebastianheuer commented on September 16, 2024

@sebastianbergmann I am assuming that something goes wrong when determining the working directory so PHIVE tries to write a phive.xml into it's own root directory instead of the actual working directory. I ran into the same issue this morning and am currently looking into it :)

from phive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.