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

php 5.6: ERROR: manifest length read was "42473" should be "655360" #134

Closed
alanhogan opened this issue Sep 26, 2017 · 8 comments
Closed

Comments

@alanhogan
Copy link

I downloaded the .phar and .phar.pubkey files to the same directory and then used require_once on the .phar. My script exits with the error

ERROR: manifest length read was "42473" should be "655360"

I have no idea what's wrong.

@paragonie-scott
Copy link
Member

That's odd. I'm going to be releasing a new patch version soon, just fixing minor docblock issues so that our static analysis tests pass.

@paragonie-scott
Copy link
Member

Please try again with v2.0.11 and let me know if you're encountering the same or a similar error. Thanks.

@alanhogan
Copy link
Author

I’m so sorry, but I am still getting a very similar error:

ERROR: manifest length read was "42533" should be "655360"

The second number sure looks like exactly the maximum signed 32-bit integer, times ten…

There may be something messed up about my PHP environment, not your PHP Archive. I’m on DreamHost, for what it’s worth. And as a former PHP developer who hasn’t touched it very much in years, this is actually the first time I have tried using a .phar file. Heck, I hadn’t heard of it before.

@alanhogan
Copy link
Author

I’m also on macOS, if that’s relevant. I uploaded these files with Transmit.

@paragonie-scott
Copy link
Member

paragonie-scott commented Oct 3, 2017

What do you get when you run these commands? It's possible that the files got corrupted.

sha256sum random_compat.*
sha384sum random_compat.*

Expected output:

scott@paragonie-test:/mnt/share/random_compat/dist$ sha256sum ./*
725aaede348d566bab76e1942f52a2d35c379ecb4e7ad92a844f822c0eb3a913  ./random_compat.phar
8a02cf9db52b09b0afe04f3e812785c2a9854951bec0c31568a13b82d4870005  ./random_compat.phar.pubkey
3c55e651398d15479bcb279fba8e30d8c43155834cfdb5fecb62e61c9fd79f33  ./random_compat.phar.pubkey.asc
scott@paragonie-test:/mnt/share/random_compat/dist$ sha384sum ./*
ff97ba33c7567e6ae80c2a34a55f2ee0c5ebc650696958919a5e42fafe67927ba5dcf67f93f38ce6d0ba603734d6fd12  ./random_compat.phar
cc870eb73c57e2bae957954b4c987dcc68f756f9c7a5c7ddf0f3e70e3884e6ac0008ed2383dc67d84baf09c177b8ea74  ./random_compat.phar.pubkey
c66af4d8d3af2bef54a4aba1091c893dda8dfeafa1defffbd15a87e4a12c2b987a1816f2bfd38609ed2c1d57867caa17  ./random_compat.phar.pubkey.asc

I'm not familiar with Mac OS at all. Is Transmit an FTP client? It could be an ASCII/binary mode disagreement problem, or else it's doing something to your files in the interim.

@alanhogan
Copy link
Author

Ran this on Dreamhost:

shasum -a 256  random_compat.phar random_compat.phar.pubkey random_compat.phar.pubkey.asc
725aaede348d566bab76e1942f52a2d35c379ecb4e7ad92a844f822c0eb3a913  random_compat.phar
8a02cf9db52b09b0afe04f3e812785c2a9854951bec0c31568a13b82d4870005  random_compat.phar.pubkey
3c55e651398d15479bcb279fba8e30d8c43155834cfdb5fecb62e61c9fd79f33  random_compat.phar.pubkey.asc

shasum -a 384  random_compat.phar random_compat.phar.pubkey random_compat.phar.pubkey.asc
ff97ba33c7567e6ae80c2a34a55f2ee0c5ebc650696958919a5e42fafe67927ba5dcf67f93f38ce6d0ba603734d6fd12  random_compat.phar
cc870eb73c57e2bae957954b4c987dcc68f756f9c7a5c7ddf0f3e70e3884e6ac0008ed2383dc67d84baf09c177b8ea74  random_compat.phar.pubkey
c66af4d8d3af2bef54a4aba1091c893dda8dfeafa1defffbd15a87e4a12c2b987a1816f2bfd38609ed2c1d57867caa17  random_compat.phar.pubkey.asc

And yet, I still get the same error

@paragonie-scott
Copy link
Member

Okay, at this point, I'd say contact DreamHost support and point them to this ticket. Something else must be going wrong, and I don't have any means to diagnose it from here.

@eigan
Copy link

eigan commented Feb 14, 2018

This error message might occur if you haven't enabled phar. I guess this is normal on some hosts.

See this Dreamhost guide for modifing your php configuration at Dreamhost (i have not tested).

For standard php installation

Create a 99-custom.ini* file inside the directory found with this command: php -i | grep "Scan this dir for additional".

Add this line: extension=phar.so

* The filename can be whatever you choose, just end with .ini

Found this thread via google while having issue with my Synology. Just want to help if someone else stumble over here too

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

3 participants