summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/zziplib-0.13.58/docs/zip-php.htm
blob: 04166673f38bd000001c7a33eca9d37a8498f139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<H2> PHP-ZIP Installation </H2>

<P>
  There have been many problems about the installation of the php-zip
  module. Since Mid of 2006 the php-zip module does not require the
  zziplib anymore - it uses its own implementation (which is a clean
  approach in a double sense - there are no source code comments).
  So, the following might possibly be only relevant for older
  installations.
</P>

<P> Chris Branch has been kind enough to jot down the points of a
    successful php-zip installation sending it to me in May 2006.
    I am quoting his text verbatim - again, I do not know whether
    it works or not as I am not using any PHP for real work.
</P>

<hr width="60%" align="center">
<DL>
<DT> Software Packages </DT>
<dd><ul>
<li> Apache 2.4.21 (Linux) </li>
<li> PHP 4.3.9 </li>
<li> ZZIPLIB 0.10.82 </li>
<li> Special requirement: static linking
</ul></dd>
<DT> Setting up ZZIPLIB </DT>
<dd><ul>
<li> Extract files from zziplib-0.10.82.tar.bz2 to a new folder. </li>
<li> ./configure --enable-static </li>
<li> make </li>
<li> make install </li>
</ul></dd>
<DT> Rebuilding PHP to include ZIP support </DT>
<dd><ul>
<li> Modify PHP build file and add "--with-zip" 
[no dir needed because default /usr/local on my machine] </li>
<li> make </li>
<li> make install </li>
</ul></dd>
<DT> Modifying the Apache Installation </DT>
<dd><ul>
<li> Change to Apache source code directory </li>
<li> Change to "src" subdirectory and edit existing Makefile.  [***]
<br> Add: EXTRA_LIBS=/usr/local/lib/libzzip.a </li>
<li> Change back to parent folder (cd ..) </li>
<li> make </li>
<li> /usr/local/etc/httpd/bin/apachectl stop </li>
<li> make install </li>
<li> /usr/local/etc/httpd/bin/apachectl start </li>
</ul></dd>
</DL>

<p><b>[***] Note:</b>
That step is the critical step that's not obvious.  Apparently,
when you build PHP as a static library and include the "--with-zip"
option, it creates a static library for PHP with an external dependency on
zziplib.a.  However, the Apache configure script and resulting Makefile
doesn't take this into account, so Apache won't link unless you hand-edit
the Apache Makefile.  (Maybe there's a better place to make this change so
that you don't have to re-fix Apache's Makefile each time you run Apache's
./configure.  However, I didn't spend the time to investigate that).
</p>