beta-0.89.2
[luatex.git] / source / libs / zziplib / zziplib-0.13.62 / docs / zip-php.htm
blob04166673f38bd000001c7a33eca9d37a8498f139
1 <H2> PHP-ZIP Installation </H2>
3 <P>
4 There have been many problems about the installation of the php-zip
5 module. Since Mid of 2006 the php-zip module does not require the
6 zziplib anymore - it uses its own implementation (which is a clean
7 approach in a double sense - there are no source code comments).
8 So, the following might possibly be only relevant for older
9 installations.
10 </P>
12 <P> Chris Branch has been kind enough to jot down the points of a
13 successful php-zip installation sending it to me in May 2006.
14 I am quoting his text verbatim - again, I do not know whether
15 it works or not as I am not using any PHP for real work.
16 </P>
18 <hr width="60%" align="center">
19 <DL>
20 <DT> Software Packages </DT>
21 <dd><ul>
22 <li> Apache 2.4.21 (Linux) </li>
23 <li> PHP 4.3.9 </li>
24 <li> ZZIPLIB 0.10.82 </li>
25 <li> Special requirement: static linking
26 </ul></dd>
27 <DT> Setting up ZZIPLIB </DT>
28 <dd><ul>
29 <li> Extract files from zziplib-0.10.82.tar.bz2 to a new folder. </li>
30 <li> ./configure --enable-static </li>
31 <li> make </li>
32 <li> make install </li>
33 </ul></dd>
34 <DT> Rebuilding PHP to include ZIP support </DT>
35 <dd><ul>
36 <li> Modify PHP build file and add "--with-zip"
37 [no dir needed because default /usr/local on my machine] </li>
38 <li> make </li>
39 <li> make install </li>
40 </ul></dd>
41 <DT> Modifying the Apache Installation </DT>
42 <dd><ul>
43 <li> Change to Apache source code directory </li>
44 <li> Change to "src" subdirectory and edit existing Makefile. [***]
45 <br> Add: EXTRA_LIBS=/usr/local/lib/libzzip.a </li>
46 <li> Change back to parent folder (cd ..) </li>
47 <li> make </li>
48 <li> /usr/local/etc/httpd/bin/apachectl stop </li>
49 <li> make install </li>
50 <li> /usr/local/etc/httpd/bin/apachectl start </li>
51 </ul></dd>
52 </DL>
54 <p><b>[***] Note:</b>
55 That step is the critical step that's not obvious. Apparently,
56 when you build PHP as a static library and include the "--with-zip"
57 option, it creates a static library for PHP with an external dependency on
58 zziplib.a. However, the Apache configure script and resulting Makefile
59 doesn't take this into account, so Apache won't link unless you hand-edit
60 the Apache Makefile. (Maybe there's a better place to make this change so
61 that you don't have to re-fix Apache's Makefile each time you run Apache's
62 ./configure. However, I didn't spend the time to investigate that).
63 </p>