more links
[pharext/pharext] / README.md
1 # pharext
2
3 Distribute your PHP extension as self-installable phar executable
4
5 ## About
6
7 You don't need this package to install any `*.ext.phar` extension packages,
8 just run them with php:
9
10 $ ./pecl_http-2.4.0dev.ext.phar
11
12 For a compressed phar, or if the execute permission bit got lost somehow:
13
14 $ php pecl_http-2.4.0dev.ext.phar.gz
15
16 Command help:
17
18 $ ./pecl_http-2.4.0dev.ext.phar -h
19
20 Yields:
21
22 pharext v2.0.0 (c) Michael Wallner <mike@php.net>
23
24 Usage:
25
26 $ ./pecl_http-2.4.0dev.ext.phar [-hvqs] [-p|-n|-c|-i <arg>]
27
28 -h|--help Display help
29 -v|--verbose More output
30 -q|--quiet Less output
31 -p|--prefix <arg> PHP installation prefix if phpize is not in $PATH, e.g. /opt/php7
32 -n|--common-name <arg> PHP common program name, e.g. php5 or zts-php [php]
33 -c|--configure <arg> Additional extension configure flags, e.g. -c --with-flag
34 -s|--sudo [<arg>] Installation might need increased privileges [sudo -S %s]
35 -i|--ini <arg> Activate in this php.ini instead of loaded default php.ini
36 --enable-propro [<arg>] Whether to enable property proxy support [yes]
37 --enable-raphf [<arg>] Whether to enable raphf support [yes]
38 --with-http-zlib-dir [<arg>] Where to find zlib [/usr]
39 --with-http-libcurl-dir [<arg>] Where to find libcurl [/usr]
40 --with-http-libevent-dir [<arg>] Where to find libevent [/usr]
41
42 If your installation destination needs escalated permissions, have a look at [the `--sudo` option](https://github.com/m6w6/pharext/wiki/Usage-of-*.ext.phar-packages#privileges):
43
44 $ ./pecl_http-2.4.0dev.ext.phar --ini /etc/php/conf.d/pecl.ini --sudo
45 Installing propro-1.0.1.ext.phar ...
46 Running phpize ... OK
47 Running configure ... OK
48 Running make ... OK
49 Running install ... OK
50 Running INI owner transfer ... OK
51 Running INI permission transfer ... OK
52 Running INI activation ... OK
53 Cleaning up /tmp/propro-1.0.1.ext.phar.54fdbc828e3ef ...
54 Installing raphf-1.0.5.ext.phar ...
55 Running phpize ... OK
56 Running configure ... OK
57 Running make ... OK
58 Running install ... OK
59 Running INI owner transfer ... OK
60 Running INI permission transfer ... OK
61 Running INI activation ... OK
62 Cleaning up /tmp/raphf-1.0.5.ext.phar.54fdbc828e5e0 ...
63 Installing pecl_http-2.4.0dev.ext.phar ...
64 Running phpize ... OK
65 Running configure ... OK
66 Running make ... OK
67 Running install ... OK
68 Running INI owner transfer ... OK
69 Running INI permission transfer ... OK
70 Running INI activation ... OK
71 Cleaning up /tmp/pecl_http-2.4.0dev.ext.phar.54fdbc828e1fb ...
72
73
74 ### Prerequisites
75
76 The usual tools you need to build a PHP extension:
77 * php, phpize and php-config
78 * make, cc and autotools
79
80 A network connection is not needed.
81
82 ## Extension maintainers
83
84 Download the pharext binary of the [latest release](https://github.com/m6w6/pharext/releases/latest).
85
86 Be aware that you need the [public key](https://github.com/m6w6/pharext/wiki/Public-key) to run official `pharext` releases.
87
88 -----BEGIN PUBLIC KEY-----
89 MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5x9bwisjDBDV/bwDiju2
90 Ebx4kPir32WwT3+hxV0/qAPclA1WsrpcUJ7BChk+Rlz8ujOcyENTidgI1vj3oUpo
91 /P9XlLQOSrJHYz+AOg7qwhTe89xIJspS4gHHiXUAmxz0TyCNMbOyrLcjP5CmZdll
92 n+e3HP8Kfipr4XyWBhsKbdYUZ8Ga6IeFMYzNqCzWazcOasdCpsablmyrfCaZoJ0l
93 bFald0nF3/YoeYgo3fWb4Md9Xf/grpz8Ocqyq4OY49Vb0/p8FMwzBV6vbVh/eAV/
94 jrP7L40Jw97nSBrP/5nK8Ylc5BayVRq/HhT3kLMC//zvPjb8xz3ZgVTQrwWTF3Zy
95 +wIDAQAB
96 -----END PUBLIC KEY-----
97
98 Place it as `pharext.pubkey` in the same directory where the `pharext` binary is located. IF you cloned the repository or installed `pharext` through composer, it is already at the right location.
99
100 Please have a look at the [wiki](https://github.com/m6w6/pharext/wiki), to learn [how to use](https://github.com/m6w6/pharext/wiki/Usage-of-the-pharext-packager) the pharext installer to package self-installing PHP extensions.
101