summaryrefslogtreecommitdiff
path: root/sapi/aolserver/README
blob: 0d03e4b6e2ffe7ab9948a40bada32a30fcd91c87 (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
64
65
66
67
68
69
70
71
AOLserver README ($Id$)

To compile PHP 4.0 as a module for AOLserver, you need:

- AOLserver 3.0 source distribution (not required for AOLserver >= 3.1)
- installed AOLserver 3.0 or later


NOTE: You should not use this module in production. PHP is not 100% stable
      yet in threaded mode. To increase reliability enable the Global Lock
      by removing #define NO_GLOBAL_LOCK in main/main.c. Also don't use
      php_value as it will lead to races in a sub-system (use an ini file
      instead).


1.) Configuring AOLserver

Read doc/install.txt in the source distribution

It usually boils down to changing the INST/PREFIX variable in 
include/Makefile.global and running make all install.

2.) Configuring PHP

$ ./configure \
	--with-aolserver=/path/to/installed/aolserver \
	--with-aolserver-src=/path/to/source/distribution \
	<other options>

NOTE: While AOLserver 3.0 did not install its include directory, later
      releases will do so. This effectively means that you do not need
      to retain the source directory of AOLserver, if there is an
      include directory in the installation directory.

3.) Compiling and Installing PHP

$ make install

4.) Changing nsd.tcl

a) New section

Add a new section to pass options to PHP (required):

ns_section "ns/server/${servername}/module/php"

You can use the following commands in this section:

The 'map' command will cause AOLserver to pass all requests to *.php to
the PHP module (can be specified multiple times).  Example:

ns_param map *.php

The 'php_value "name val"' command assigns the configuration option name 
the value val (can be used multiple times). Example:

ns_param php_value "session.auto_start 1"

b) Enabling PHP

Then enable the PHP module:

ns_section "ns/server/${servername}/modules"
...
ns_param php ${bindir}/libphp4.so


=============================================================================
This has been tested with AOLserver release 3.0.

AOLserver support has been written by Sascha Schumann <sascha@schumann.cx>.