Debian Codegraph @

doc/AdministratorManual/php3.html

raw symbols SCIP
1 <html>
2 <head>
3 <title>Installing PHP with unixODBC</title>
4 </head>
5 <body>
6 <h1>Installing PHP with unixODBC</h1>
7
8 This install procedure is based on apache 1.3.6 and PHP 3.0.9. The PHP4 from beta 3 will have a
9 configure option to use unixODBC so most of the following will be redundant.
10
11 <p>
12 This document assumes that unixODBC has been built and installed, in this case in the default location
13 /usr/local, and that both Apache and PHP have been untarred in the users home directory.
14
15 <ol>
16
17 <li>In the Apache directory run the following command
18 <pre>
19 ./configure --prefix=/www
20 </pre>
21
22 plus any other local config you need
23
24 <p><li>Create a file in /usr/local/include called odbc.h containing the following three lines
25
26 <pre>
27 #include &lt;sql.h&gt;
28 #include &lt;sqlext.h&gt;
29 #include &lt;odbcinst.h&gt;
30 </pre>
31
32 replacing /www with your desired apache install path
33
34 <p><li>Move to the PHP directory
35
36 Define the following environment variables
37
38 <pre>
39 CFLAGS="-I/usr/local/include"
40 LDFLAGS=
41 CUSTOM_ODBC_LIBS="-L/usr/local/lib -lodbc"
42 </pre>
43
44 remember to export these variables
45
46 <pre>
47 export CFLAGS LDFLAGS CUSTOM_ODBC_LIBS
48 </pre>
49
50 <p><li>Configure PHP with
51
52 <pre>
53 ./configure --with-apache=../apache_1.3.6 --with-custom-odbc=/usr/local --enable-track-vars
54 </pre>
55
56 plus any other local config you need
57
58 then...
59
60 <pre>
61 make
62 make install
63 </pre>
64
65 <p><li>Go back to your apache directory, and do
66
67 <pre>
68 ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
69 make
70 make install
71 </pre>
72
73 <p><li>Back to the PHP directory
74
75 Then to quote from the PHP INSTALL
76 <pre>
77 cp php3.ini-dist /usr/local/lib/php3.ini
78 You can edit /usr/local/lib/php3.ini file to set PHP options.
79 Edit your httpd.conf or srm.conf file and add:
80 AddType application/x-httpd-php3 .php3
81 <pre>
82
83 </ol>
84
85 And that should be that.
86
87 <p>If this is of any help to someone, good, any problems let <a href="mailto:[email protected]">me</a> know.
88 <p>Nick Gorham
89 </body>
90 </html>