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

Windows 8.1 => ErrorException for ZipArchive #3755

Closed
Daijobou opened this issue Feb 17, 2015 · 8 comments
Closed

Windows 8.1 => ErrorException for ZipArchive #3755

Daijobou opened this issue Feb 17, 2015 · 8 comments

Comments

@Daijobou
Copy link

I get a error with install on windows 8.1 64Bit

cmd>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing phpunit/phpunit-mock-objects (2.3.0)
    Downloading: connection...    Downloading: 0%
    Downloading: 5%
.....
    Downloading: 100%

  [ErrorException]
  ZipArchive::extractTo(C:\Users\Username\Folder\SphinxQL-Query-Builder/vendor/composer/d057307a/sebastianbergmann-phpunit-mock-objects-c63d236\tests\MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt): failed to open stream: Invalid argument

You can see that path change "" to "/" many times.

cmd>composer -V
Composer version 1.0-dev (5d3c7ab6b783d3867735b0ae947bf5f880e43658) 2015-02-17 14:43:09
@Daijobou Daijobou changed the title WIndows 8.1 => ErrorException for ZipArchive Windows 8.1 => ErrorException for ZipArchive Feb 17, 2015
@pborreli
Copy link
Contributor

maybe the character file path limit is reached ? I don't think it has to do with the \ and /, Windows knows how to handle with it most of the time

@alcohol
Copy link
Member

alcohol commented Feb 18, 2015

Could you try running the composer testsuite on Windows 8.1? I think it includes some archive tests.

git clone https://github.com/composer/composer
cd composer
composer install
vendor/bin/phpunit

Alternatively, as a quick work around, run composer install --prefer-source. The zip archives come with a dist install.

@Daijobou
Copy link
Author

The workaround "composer install --prefer-source" have the same error message. Unfortunately, with a testsuite I can't help. I have tried it, but ...
I have downloaded composer-master.zip, extracted it, startet CMD.exe and in composer-master folder I typed "composer install". After this a vendor in root of this folder was successfuly created. A folder with "bin/vendor/phpunit" not exists. Sorry, but I don't use "git" and composer for first time.

@pborreli
Copy link
Contributor

try to move the project to c:\test and rerun composer

@fstfrognation
Copy link

FYI - in case anyone else runs across this problem. I had a similar issue and tried doing the composer install in a top level directory "c:\blah" and it worked just fine. As I increased the depth of the project's directory, it eventually failed - so some part of the flow just doesn't handle the deep hierarchy all that well. I even tried to copy the eventual results back to my original directory and Windows file manager choked on the number of characters.

@alcohol
Copy link
Member

alcohol commented Jun 2, 2015

I have no idea if this could be related, but there seems to be a limit to the maximum length of a path.

@fstfrognation
Copy link

Yup... that's it. Apparently composer will sometimes tell you the path
length is too long, other times it won't. I stumbled across this thread
before i found the other one.

On Tue, Jun 2, 2015 at 3:50 AM, Rob notifications@github.com wrote:

I have no idea if this could be related, but there seems to be a limit to
the maximum length of a path
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath
.


Reply to this email directly or view it on GitHub
#3755 (comment).

@alcohol
Copy link
Member

alcohol commented Jun 2, 2015

I'm not entirely convinced it is related, since the length of the path mentioned in the opening post of this issue was less than the maximum length described in that document. It might be worth investigating though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants