[php-maint] Bug#639268: Bug#639268: [PATCH] Handle .phar (and .bz2|.gz|.zip) with PHP

Christian Weiske cweiske at cweiske.de
Mon Mar 17 18:15:09 UTC 2014

Hello Thijs,

>> I'm missing why we would want Apache to handle the phar file
>> directly. If it's an archive, don't you want to download it instead
>> of execute it in the web server context?
> Thanks, but this does not really answer my question?

I didn't see your question until I read the bug, sorry.

PHAR archives can be used to distribute full web applications with all
dependencies included, so that you only have to put it in your web
server's document root and access it via your browser.

Specifically to support this, phar has a feature called "web index
file" in the phar stub[1]. It gets called whenever the phar is executed
through a HTTP request.

So it makes sense to let PHP handle phar files (and their compressed
versions) directly, without extracting them.
More information about phar can be found on [2].

[1] http://www.php.net/manual/en/phar.createdefaultstub.php
[2] http://www.php.net/manual/en/intro.phar.php

Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20140317/a0581f1a/attachment-0001.sig>

More information about the pkg-php-maint mailing list