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

Installing PHARs fails when phar.readonly is set in php.ini #42

Closed
sebastianheuer opened this issue Apr 8, 2016 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@sebastianheuer
Copy link
Member

Installation of PHARs fails if the setting phar.readonly is set to On in php.ini (which is the default) and PHIVE has been installed as a PHAR.

$ phive install phpunit                                                                                               [9:20:56]
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
[ERROR]    Undefined offset: 2
[ERROR]   An error occured while processing your request:

          DOMDocument::save(phar:///usr/local/bin/phive/src/../phive.xml): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly

          #0 har:///usr/local/bin/phive/src/shared/repository/WritableXmlRepository.php(10)
          #1 unknown file(0): PharIo\Phive\Cli\Runner->errorHandler()
          #2 har:///usr/local/bin/phive/src/shared/repository/WritableXmlRepository.php(10): DOMDocument->save()
          #3 har:///usr/local/bin/phive/src/shared/config/PhiveXmlConfig.php(19): PharIo\Phive\WritableXmlRepository->save()
          #4 har:///usr/local/bin/phive/src/commands/install/InstallCommand.php(61): PharIo\Phive\PhiveXmlConfig->addPhar()
          #5 har:///usr/local/bin/phive/src/shared/cli/Runner.php(51): PharIo\Phive\InstallCommand->execute()
          #6 usr/local/bin/phive(141): PharIo\Phive\Cli\Runner->run()
          #7 {main}

          Environment: PHP 5.6.19
          Phive Version: 0.2.0

          This should not have happend and is most likely a bug.
          Please report it at https://github.com/phar-io/phive/issues, make sure you include
          the full output of this error message. Thank you!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant