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

I'm getting PKPasses of size 0Kb #53

Closed
prathammehta opened this issue Jun 28, 2016 · 10 comments
Closed

I'm getting PKPasses of size 0Kb #53

prathammehta opened this issue Jun 28, 2016 · 10 comments

Comments

@prathammehta
Copy link

I've followed all the steps in the readme to get the example.php working. I've added all the certificates correctly as far as I can tell. I'm hosting the whole thing on localhost. Is this a problem?

When I access it on the iPhone it says file cannot be downloaded and when I click on it on my mac, it says the file cannot be opened.

Any advice would be great. Thanks!

@tschoffelen
Copy link
Member

Getting a pass file of a size of 0kb probably means that the Zip compression fails. Please check if you have the zip extension installed and it is active on your system.

@prathammehta
Copy link
Author

Alright. I'll do that. Thanks :)

@prathammehta
Copy link
Author

screen shot 2016-06-28 at 2 14 42 pm
It shows up in the phpinfo(). Do you think it's still this that's causing the issue?

@tschoffelen
Copy link
Member

Okay, that makes it a little less likely that is the problem. Can you try adding the following two lines at the top of the example code and see if it outputs any errors?

ini_set('display_errors',1);
error_reporting(E_ALL);

@prathammehta
Copy link
Author

Just tried it. No difference. No errors. Just spits out the same empty file. :/
Any clues as to what else it could be?
Do I need to run it on a https host for it to work?

@tschoffelen
Copy link
Member

HTTPS is not necessary for only downloading the pass, only for downloading it on an iDevice. I honestly don't have any other ideas, other than trying to test the ZIPArchive library standalone and looking if it works then. It works on my mac with the default settings, so not sure what's causing this.

@pkoetter
Copy link

Hey,
I have had the same problem.
To solve this you either have to print the variable "$file" from "PKpass.php" at the end of the function "create" or print the return value of that function in the example.php wich is probably the better idea.

@prathammehta
Copy link
Author

Gonna go try this right away! Thanks :D

@prathammehta
Copy link
Author

This worked perfectly! Thank you so much! :D

Just added a "echo $file" before the return statement in the create() function.

tschoffelen added a commit that referenced this issue Jul 1, 2016
By adding an explicit `echo` statement in the create function if `$output` is true.
@lock
Copy link

lock bot commented Aug 15, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants