Closed jskidd3 closed 8 years ago
Try adding the following lines at the top of example.php (after the <?php
):
ini_set('display_errors',1);
error_reporting(E_ALL);
And see if it outputs any errors. If it does, post it here, than I might be able to help you with this specific case.
I tried running the script with root using the command line with php example.php > example.pkpass
and this produced the pass correctly.
That must mean this is a permission issue, right? Accessing example.php from the URL creates an empty pass. Thanks - appreciate your help with this.
After further investigation, in the create
method if I dump the file to the server, file_put_contents('test.pkpass', $file);
, then the pass is valid (33,340 bytes). However, when create
reaches echo $file;
, it just downloads an empty pass to the browser.
Joel,
I had the same problem a month ago with creating a pass. It ended up being something in the class file that was deleting the file too fast. I ended up commenting out the unlink command then my pass started working perfectly.
On Jul 22, 2016, at 8:06 PM, Joel notifications@github.com<mailto:notifications@github.com> wrote:
I tried running the script with root using the command line with php example.php > example.pkpass and this produced the pass correctly.
That must mean this is a permission issue, right? Thanks - appreciate your help with this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/tschoffelen/PHP-PKPass/issues/54#issuecomment-234685093, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFsUlaABOYAOHolPTarSVEAXdOjbAMFdks5qYVrsgaJpZM4JSNiJ.
@wayneworks That fixed the problem! Thanks so much :smiley:
@jskidd3, would you mind opening a pull request with the changes you made? Might be useful for others as well. Thanks!
no problem glad that helped.
On Jul 23, 2016, at 6:48 AM, Joel notifications@github.com<mailto:notifications@github.com> wrote:
@wayneworkshttps://github.com/wayneworks That fixed the problem! Thanks so much 😃
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/tschoffelen/PHP-PKPass/issues/54#issuecomment-234712050, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFsUlaSY99WjHwYEmqz74ZlRbIw6yJ-dks5qYfGPgaJpZM4JSNiJ.
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.
Whenever I run examples/example.php all that is exported is an empty .pkpass file. I have spent many hours reading through very carefully and started over several times but cannot get this library to work. Can anyone please shed light on why this is happening?
I have set paths, permissions, ownership etc on all of the required files as well as ensured that all variables (eg team ID, pass ID etc) are set.