1 2This php module can be configured and built to run standalone 3or in the context of the mod_db4 Apache module (Apache 1.3.* only). 4These configurations are not interchangeable. 5 6*** A note about pthreads *** 7The db4 c++ library by default tries to link against libpthread on some 8systems (notably Linux). If your PHP install is not linked against 9libpthread, you will need to disable pthread support in db4. This can 10be done by compiling db4 with the flag --with-mutex=x86/gcc-assembly. 11PHP can itself be forced to link against libpthread either by manually 12editing 13its build files (which some distributions do), or by building it with 14--with-experimental-zts. 15 16To install this php module linked against the mod_db4 framework, 17execute the following steps: 18 19> phpize 20> ./configure --with-db4[=/path/to/db4] 21--with-mod_db4=$APACHE_INCLUDEDIR 22> make 23> su - 24# make install 25 26Then in your php.ini file add: 27 28extension=db4.so 29 30This extension will now ONLY run in a SAPI linked into Apache httpd 31(mod_php4, most likely), and will take advantage of all of it's 32auto-recovery and handle-caching facilities. 33 34 35To install this php module linked against db-4.2 and NOT the mod_db4 36framework, 37execute the following steps: 38 39> phpize 40> ./configure --with-db4[=/path/to/db4] 41> make 42> su - 43# make install 44 45Then in your php.ini file add: 46 47extension=db4.so 48