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

Loading the .phar from a web application #269

Closed
rec0de opened this issue May 19, 2016 · 8 comments
Closed

Loading the .phar from a web application #269

rec0de opened this issue May 19, 2016 · 8 comments

Comments

@rec0de
Copy link

rec0de commented May 19, 2016

I guess this is a real noob question, but I have been running into some problems trying to use the library with my website.

When I include the .phar archive into a web application, the first line ("#!/usr/bin/env php") is interpreted as HTML and output to every page I use the library in.

Editing the .phar to remove the first line obviously breaks the signature and so far I haven't found a way to avoid outputting the first line every time the .phar is loaded.

How do I correctly use the library in this scenario?

@pnowosie
Copy link

pnowosie commented May 19, 2016

Including .phar is described in Option 2 | InstallingAndVerifying.md
Have you seen / followed this?

@rec0de
Copy link
Author

rec0de commented May 19, 2016

Yes, I did. The problem is that when using require_once(), everything outside of the php tags (i.e. the first line) is output as HTML

@defuse
Copy link
Owner

defuse commented May 20, 2016

This is a bug. @glensc do you know of an option to make box not generate this line? Or do I have to add a command to the Makefile that strips that line out?

@glensc
Copy link
Contributor

glensc commented May 20, 2016

yes, box-project/box2#88

@glensc
Copy link
Contributor

glensc commented May 20, 2016

and looks like i already mentioned this to you:
paragonie/random_compat#83 (comment)

glensc added a commit to glensc/php-encryption that referenced this issue May 20, 2016
@glensc
Copy link
Contributor

glensc commented May 20, 2016

see #270

@defuse
Copy link
Owner

defuse commented May 20, 2016

@glensc Sorry I missed that before! Thanks for fixing it. I'll close this after I release 2.0.1.

@defuse
Copy link
Owner

defuse commented May 20, 2016

Done! Thanks very much @glensc!

@defuse defuse closed this as completed May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants