diff --git a/chapters/install.apache.xml b/chapters/install.apache.xml new file mode 100644 index 0000000000..042e0acdf4 --- /dev/null +++ b/chapters/install.apache.xml @@ -0,0 +1,346 @@ + + + + Servers-Apache + + This section contains notes and hints specific to Apache installs + of PHP, both for Unix and + Windows versions. + + + Details of installing PHP with Apache on Unix + + You can select arguments to add to the + configure on line 8 below from the Complete list of configure + options. + + + + + Installation Instructions (Apache Module Version) + + + + + + + + Depending on your Apache install and Unix variant, there are many + possible ways to stop and restart the server. Below are some typical + lines used in restarting the server, for different apache/unix + installations. You should replace /path/to/ with + the path to these applications on your systems. + + + + + + The locations of the apachectl and http(s)dctl binaries often + vary. If your system has locate or + whereis or which commands, + these can assist you in finding your server contrl programs. + + + + Different examples of compiling PHP for apache are as follows: + + + + + + + + This will create a libphp4.so shared + library that is loaded into Apache using a LoadModule line in + Apache's httpd.conf file. The PostgreSQL + support is embedded into this libphp4.so + library. + + + + + + + + + + This will again create a libphp4.so shared + library for Apache, but it will also create a + pgsql.so shared library that is loaded into + PHP either by using the extension directive in + php.ini file or by loading it explicitly in + a script using the dl function. + + + + + + + + + + This will create a libmodphp4.a library, a + mod_php4.c and some accompanying files and + copy this into the src/modules/php4 directory + in the Apache source tree. Then you compile Apache using + --activate-module=src/modules/php4/libphp4.a + and the Apache build system will create + libphp4.a and link it statically into the + httpd binary. The PostgreSQL support is + included directly into this httpd binary, + so the final result here is a single httpd + binary that includes all of Apache and all of PHP. + + + + + + + + + + Same as before, except instead of including PostgreSQL support + directly into the final httpd you will get + a pgsql.so shared library that you can load + into PHP from either the php.ini file or + directly using dl. + + + When choosing to build PHP in different ways, you should consider + the advantages and drawbacks of each method. Building as a shared + object will mean that you can compile apache separately, and don't + have to recompile everything as you add to, or change, PHP. + Building PHP into apache (static method) means that PHP will + load and run faster. For more information, see the Apache + webpage on DSO support. + + + + + + Installing PHP on Windows with Apache 1.3.x + + + There are two ways to set up PHP to work with Apache 1.3.x + on Windows. One is to use the CGI binary (php.exe), + the other is to use the Apache module dll. In either case + you need to stop the Apache server, and edit your + srm.conf or httpd.conf + to configure Apache to work with PHP. + + + It is worth noting here that now the sapi module has been + made more stable under windows, we recommend it's use above + the CGI binary, since it is more transparent and secure. + + + Although there can be a few variations of configuring PHP + under Apache, these are simple enough to be used by the + newcomer. Please consult the Apache Docs for further + configuration directives. + + + + If you unziped the PHP package to c:\php\ as described + in the Manual + Installation Steps section, you need to insert + these lines to your Apache configuration file to set + up the CGI binary: + + + + + ScriptAlias /php/ "c:/php/" + + + + + + + AddType application/x-httpd-php .php .phtml + + + + + + + Action application/x-httpd-php "/php/php.exe" + + + + + Note that the second line in the list above can be found + in the actual versions of httpd.conf, + but it is commented out. Remember also to substitute the + c:/php/ for your actual path to PHP. + + + + + By using the CGI setup, your server is open + to several possible attacks. Please read + our CGI security + section to learn how to defend yourself from attacks. + + + + + If you would like to use PHP as a module in Apache, + be sure to move php4ts.dll to + the windows/system (for Windows 9x/Me) or winnt/system32 + (for Windows NT/2000/XP) directory, overwriting any older file. + Then you should add the following two lines to you Apache + conf file: + + + + + LoadModule php4_module c:/php/sapi/php4apache.dll + + + + + + + AddType application/x-httpd-php .php .phtml + + + + + + + + After changing the configuration + file, remember to restart the server, for example, + NET STOP APACHE followed by + NET START APACHE, if you run Apache + as a Windows Service, or use your regular shortcuts. + + + + + You may find after using the windows installer for Apache + that you need to define the AddModule + directive for mod_php4.c in the + configuration file (httpd.conf). + This is done by adding AddModule mod_php4.c + to the AddModule list, near the beginning + of the configuration file. This is especially important if + the ClearModuleList directive is defined. + Failure to do this may mean PHP will not be registered as an + Apache module. + + + + + There are 2 ways you can use the source code highlighting feature, + however their ability to work depends on your installation. + If you have configured Apache to use PHP as an isapi module, then by + adding the following line to your configuration file you can use + this feature: AddType application/x-httpd-php-source .phps + + + + If you chose to configure Apache to use PHP as a CGI binary, you + will need to use the show_source function. To + do this simply create a PHP script file and add this code: + <?php show_source ("original_php_script.php"); ?>. + Substitute original_php_script.php with + the name of the file you wish to show the source of. + + + + + On Win-Apache all backslashes in a path statement such + as "c:\directory\file.ext", must be converted to + forward slashes, as "c:/directory/file.ext". + + + + + + \ No newline at end of file diff --git a/chapters/install.caudium.xml b/chapters/install.caudium.xml new file mode 100644 index 0000000000..20fb570e70 --- /dev/null +++ b/chapters/install.caudium.xml @@ -0,0 +1,73 @@ + + + + Servers-Caudium + + PHP 4 can be build as a Pike module for the Caudium webserver. Note + that this is not supported with PHP 3. Follow the simple + instructions below to install PHP 4 for Caudium. + + + Caudium Installation Instructions + +PHP4.so. Also make sure that + caudium/server/lib/[pike-version]/PHP4.so + is present. +10. Configure the PHP Script Support module if needed. +]]> + + + + You can of course compile your Caudium module with support for the + various extensions available in PHP 4. See the + complete list of configure + options for an exhaustive rundown. + + + + When compiling PHP 4 with MySQL support you must make sure that + the normal MySQL client code is used. Otherwise there might be + conflicts if your Pike already has MySQL support. You do this by + specifying a MySQL install directory the --with-mysql + option. + + + + + \ No newline at end of file diff --git a/chapters/install.commandline.xml b/chapters/install.commandline.xml new file mode 100644 index 0000000000..63ef7c1bfc --- /dev/null +++ b/chapters/install.commandline.xml @@ -0,0 +1,69 @@ + + + + Servers-CGI/Commandline + + The default is to build PHP as a CGI program. This creates a + commandline interpreter, which can be used for CGI processing, or + for non-web-related PHP scripting. If you are running a web + server PHP has module support for, you should generally go for + that solution for performance reasons. However, the CGI version + enables Apache users to run different PHP-enabled pages under + different user-ids. Please make sure you read through the Security chapter if you are going to + run PHP as a CGI. + + + + Testing + + If you have built PHP as a CGI program, you may test your build + by typing make test. It is always a good idea + to test your build. This way you may catch a problem with PHP on + your platform early instead of having to struggle with it later. + + + + + Benchmarking + + If you have built PHP 3 as a CGI program, you may benchmark your + build by typing make bench. Note that if + Safe Mode + is on by default, the benchmark may not be able to finish if + it takes longer then the 30 seconds allowed. This is because the + set_time_limit can not be used in safe + mode. Use the max_execution_time + configuration setting to control this time for your own + scripts. make bench ignores the configuration file. + + + + make bench is only available for PHP 3. + + + + + + \ No newline at end of file diff --git a/chapters/install.configure.xml b/chapters/install.configure.xml new file mode 100644 index 0000000000..c0fc0a48dd --- /dev/null +++ b/chapters/install.configure.xml @@ -0,0 +1,1960 @@ + + + + Complete list of configure options + + + These are only used at compile time. If you want to alter PHP's + runtime configuration, please see the chapter on Configuration. + + + + + The following is a complete list of options supported by PHP 4 + configure scripts (as of 4.1.0), used when + compiling in Unix-like environments. Some are available in PHP 3, + some in PHP 4, and some in both. This is not noted yet. + + + + + + + + Configure Options in PHP 4 + + + These options are only used in PHP 4 as of PHP 4.1.0. + Some are available in older versions of PHP 4, some even in PHP 3, some only in PHP 4.1.0. + If you want to compile an older version, some options will probably + not be available. + + + + + + --enable-maintainer-mode + + + + Enable make rules and dependencies not useful (and sometimes confusing) + to the casual installer. + + + + + + --with-aolserver=DIR + + + + Specify path to the installed AOLserver. + + + + + + --with-apxs[=FILE] + + + + Build shared Apache module. FILE is the optional pathname to the Apache + apxs tool; defaults to apxs. + + + + + + --with-apache[=DIR] + + + + Build Apache module. DIR is the top-level Apache build directory, defaults + to /usr/local/apache. + + + + + + --with-mod_charset + + + + Enable transfer tables for mod_charset (Rus Apache). + + + + + + --with-apxs2[=FILE] + + + + Build shared Apache 2.0 module. FILE is the optional pathname to the Apache + apxs tool; defaults to apxs. + + + + + + --enable-force-cgi-redirect + + + + Enable the security check for internal server redirects. You should use this + if you are running the CGI version with Apache. + + + + + + --enable-discard-path + + + + If this is enabled, the PHP CGI binary can safely be placed outside of the web + tree and people will not be able to circumvent .htaccess security. + + + + + + --with-fhttpd[=DIR] + + + + Build fhttpd module. DIR is the fhttpd sources directory, defaults to /usr/local/src/fhttpd. + + + + + + --with-fastcgi=SRCDIR + + + + Build PHP as FastCGI application. + + + + + + --with-isapi=DIR + + + + Build PHP as an ISAPI module for use with Zeus. + + + + + + --with-nsapi=DIR + + + + Specify path to the installed Netscape Server. + + + + + + --with-phttpd=DIR + + + + No information yet. + + + + + + --with-pi3web=DIR + + + + Build PHP as a module for use with Pi3Web. + + + + + + --with-roxen=DIR + + + + Build PHP as a Pike module. DIR is the base Roxen directory, normally + /usr/local/roxen/server. + + + + + + --enable-roxen-zts + + + + Build the Roxen module using Zend Thread Safety. + + + + + + --with-servlet[=DIR] + + + + Include servlet support. DIR is the base install directory for the JSDK. + This SAPI prereqs the java extension must be built as a shared dl. + + + + + + --with-thttpd=SRCDIR + + + + Build PHP as thttpd module. + + + + + + --with-tux=MODULEDIR + + + + Build PHP as a TUX module (Linux only). + + + + + + --enable-debug + + + + Compile with debugging symbols. + + + + + + --with-layout=TYPE + + + + Sets how installed files will be laid out. Type is one of PHP (default) or GNU. + + + + + + --with-config-file-path=PATH + + + + Sets the path in which to look for php.ini, defaults to PREFIX/lib. + + + + + + --with-pear=DIR + + + + Install PEAR in DIR (default PREFIX/lib/php). + + + + + + --without-pear + + + + Do not install PEAR. + + + + + + --enable-safe-mode + + + + Enable safe mode by default. + + + + + + --with-exec-dir[=DIR] + + + + Only allow executables in DIR when in safe mode defaults to /usr/local/php/bin. + + + + + + --with-openssl[=DIR] + + + + Include OpenSSL support (requires OpenSSL >= 0.9.5). + + + + + + --enable-sigchild + + + + Enable PHP's own SIGCHLD handler. + + + + + + --enable-magic-quotes + + + + Enable magic quotes by default. + + + + + + --disable-rpath + + + + Disable passing additional runtime library search paths. + + + + + + --enable-libgcc + + + + Enable explicitly linking against libgcc. + + + + + + --disable-short-tags + + + + Disable the short-form <? start tag by default. + + + + + + --enable-dmalloc + + + + Enable dmalloc. + + + + + + --enable-php-streams + + + + Include experimental php streams. Do not use unless you are testing the code! + + + + + + --with-zlib-dir=<DIR> + + + + Define the location of zlib install directory. + + + + + + --with-zlib[=DIR] + + + + Include zlib support (requires zlib >= 1.0.9). DIR is the zlib install directory. + + + + + + --with-aspell[=DIR] + + + + Include ASPELL support. + + + + + + --enable-bcmath + + + + Enable bc style precision math functions. + + + + + + --with-bz2[=DIR] + + + + Include BZip2 support. + + + + + + --enable-calendar + + + + Enable support for calendar conversion. + + + + + + --with-ccvs[=DIR] + + + + Include CCVS support. + + + + + + --with-cpdflib[=DIR] + + + + Include cpdflib support (requires cpdflib >= 2). DIR is the cpdfllib install + directory, defaults to /usr. + + + + + + --with-jpeg-dir[=DIR] + + + + jpeg dir for cpdflib 2.x. + + + + + + --with-tiff-dir[=DIR] + + + + tiff dir for cpdflib 2.x. + + + + + + --with-crack[=DIR] + + + + Include crack support. + + + + + + --enable-ctype + + + + Enable ctype support. + + + + + + --with-curl[=DIR] + + + + Include CURL support. + + + + + + --with-cybercash[=DIR] + + + + Include CyberCash support. DIR is the CyberCash MCK install directory. + + + + + + --with-cybermut[=DIR] + + + + Include CyberMut (french Credit Mutuel telepaiement). + + + + + + --with-cyrus + + + + Include cyrus imap support. + + + + + + --with-db + + + + Include old xDBM support (deprecated). + + + + + + --enable-dba=shared + + + + Build DBA as a shared module. + + + + + + --with-gdbm[=DIR] + + + + Include GDBM support. + + + + + + --with-ndbm[=DIR] + + + + Include NDBM support. + + + + + + --with-db2[=DIR] + + + + Include Berkeley DB2 support. + + + + + + --with-db3[=DIR] + + + + Include Berkeley DB3 support. + + + + + + --with-dbm[=DIR] + + + + Include DBM support. + + + + + + --with-cdb[=DIR] + + + + Include CDB support. + + + + + + --enable-dbase + + + + Enable the bundled dbase library. + + + + + + --with-dbplus + + + + Include dbplus support. + + + + + + --enable-dbx + + + + Enable dbx. + + + + + + --with-dom[=DIR] + + + + Include DOM support (requires libxml >= 2.4.2). DIR is the libxml install + directory, defaults to /usr. + + + + + + --enable-exif + + + + Enable exif support. + + + + + + --with-fbsql[=DIR] + + + + Include FrontBase support. DIR is the FrontBase base directory. + + + + + + --with-fdftk[=DIR] + + + + Include fdftk support. + + + + + + --enable-filepro + + + + Enable the bundled read-only filePro support. + + + + + + --with-fribidi[=DIR] + + + + Include fribidi support (requires FriBidi >=0.1.12). DIR is the fribidi + installation directory - default /usr/local/. + + + + + + --enable-ftp + + + + Enable FTP support. + + + + + + --with-gd[=DIR] + + + + Include GD support (DIR is GD's install dir). Set DIR to shared to build as + a dl, or shared,DIR to build as a dl and still specify DIR. + + + + + + --enable-gd-native-ttf + + + + GD: Enable TrueType string function in gd. + + + + + + --with-jpeg-dir=DIR + + + + GD: Set the path to libjpeg install prefix. + + + + + + --with-png-dir=DIR + + + + GD: Set the path to libpng install prefix. + + + + + + --with-xpm-dir=DIR + + + + GD: Set the path to libXpm install prefix. + + + + + + --with-freetype-dir=DIR + + + + GD: Set the path to freetype2 install prefix. + + + + + + --with-ttf[=DIR] + + + + GD: Include FreeType 1.x support. + + + + + + --with-t1lib[=DIR] + + + + GD: Include T1lib support. + + + + + + --with-gettext[=DIR] + + + + Include GNU gettext support. DIR is the gettext install directory, + defaults to /usr/local. + + + + + + --with-gmp + + + + Include gmp support. + + + + + + --with-hyperwave + + + + Include Hyperwave support. + + + + + + --with-icap[=DIR] + + + + Include ICAP support. + + + + + + --with-iconv[=DIR] + + + + Include iconv support. + + + + + + --with-imap[=DIR] + + + + Include IMAP support. DIR is the c-client install prefix. + + + + + + --with-kerberos[=DIR] + + + + IMAP: Include Kerberos support. DIR is the Kerberos install dir. + + + + + + --with-imap-ssl[=DIR] + + + + IMAP: Include SSL support. DIR is the OpenSSL install dir. + + + + + + --with-informix[=DIR] + + + + Include Informix support. DIR is the Informix base install directory, + defaults to nothing. + + + + + + --with-ingres[=DIR] + + + + Include Ingres II support. DIR is the Ingres base directory (default /II/ingres). + + + + + + --with-interbase[=DIR] + + + + Include InterBase support. DIR is the InterBase base install directory, + defaults to /usr/interbase. + + + + + + --with-ircg-config + + + + Path to the ircg-config script. + + + + + + --with-ircg + + + + Include ircg support. + + + + + + --with-java[=DIR] + + + + Include Java support. DIR is the base install directory for the JDK. + This extension can only be built as a shared dl. + + + + + + --with-ldap[=DIR] + + + + Include LDAP support. DIR is the LDAP base install directory. + + + + + + --enable-mailparse + + + + Enable mailparse support. + + + + + + --enable-mbstring + + + + Enable multibyte string support. + + + + + + --enable-mbstr-enc-trans + + + + Enable japanese encoding translation. + + + + + + --with-mcal[=DIR] + + + + Include MCAL support. + + + + + + --with-mcrypt[=DIR] + + + + Include mcrypt support. DIR is the mcrypt install directory. + + + + + + --with-mhash[=DIR] + + + + Include mhash support. DIR is the mhash install directory. + + + + + + --with-ming[=DIR] + + + + Include ming support. + + + + + + --with-mnogosearch[=DIR] + + + + Include mnoGoSearch support. DIR is the mnoGoSearch base install directory, + defaults to /usr/local/mnogosearch. + + + + + + --with-msql[=DIR] + + + + Include mSQL support. DIR is the mSQL base install directory, defaults + to /usr/local/Hughes. + + + + + + --with-muscat[=DIR] + + + + Include muscat support. + + + + + + --with-mysql[=DIR] + + + + Include MySQL support. DIR is the MySQL base directory. If unspecified, + the bundled MySQL library will be used. + + + + + + --with-ncurses + + + + Include ncurses support. + + + + + + --with-oci8[=DIR] + + + + Include Oracle-oci8 support. Default DIR is ORACLE_HOME. + + + + + + --with-adabas[=DIR] + + + + Include Adabas D support. DIR is the Adabas base install directory, + defaults to /usr/local. + + + + + + --with-sapdb[=DIR] + + + + Include SAP DB support. DIR is SAP DB base install directory, + defaults to /usr/local. + + + + + + --with-solid[=DIR] + + + + Include Solid support. DIR is the Solid base install directory, + defaults to /usr/local/solid. + + + + + + --with-ibm-db2[=DIR] + + + + Include IBM DB2 support. DIR is the DB2 base install directory, + defaults to /home/db2inst1/sqllib. + + + + + + --with-empress[=DIR] + + + + Include Empress support. DIR is the Empress base install directory, + defaults to $EMPRESSPATH. From PHP4, this option only supports + Empress Version 8.60 and above. + + + + + + --with-empress-bcs[=DIR] + + + + Include Empress Local Access support. DIR is the Empress base + install directory, defaults to $EMPRESSPATH. From PHP4, + this option only supports Empress Version 8.60 and above. + + + + + + --with-velocis[=DIR] + + + + Include Velocis support. DIR is the Velocis base install directory, + defaults to /usr/local/velocis. + + + + + + --with-custom-odbc[=DIR] + + + + Include a user defined ODBC support. The DIR is ODBC install base directory, + which defaults to /usr/local. Make sure to define CUSTOM_ODBC_LIBS and have + some odbc.h in your include dirs. E.g., you should define following for Sybase SQL + Anywhere 5.5.00 on QNX, prior to run configure script: + + + + + + + --with-iodbc[=DIR] + + + + Include iODBC support. DIR is the iODBC base install directory, + defaults to /usr/local. + + + + + + --with-esoob[=DIR] + + + + Include Easysoft OOB support. DIR is the OOB base install directory, + defaults to /usr/local/easysoft/oob/client. + + + + + + --with-unixODBC[=DIR] + + + + Include unixODBC support. DIR is the unixODBC base install directory, + defaults to /usr/local. + + + + + + --with-openlink[=DIR] + + + + Include OpenLink ODBC support. DIR is the OpenLink base install directory, + defaults to /usr/local. This is the same as iODBC. + + + + + + --with-dbmaker[=DIR] + + + + Include DBMaker support. DIR is the DBMaker base install directory, + defaults to where the latest version of DBMaker is installed + (such as /home/dbmaker/3.6). + + + + + + --with-oracle[=DIR] + + + + Include Oracle-oci7 support. Default DIR is ORACLE_HOME. + + + + + + --with-ovrimos[=DIR] + + + + Include Ovrimos SQL Server support. DIR is the Ovrimos' libsqlcli install directory. + + + + + + --enable-pcntl + + + + Enable experimental pcntl support (CGI ONLY!) + + + + + + --without-pcre-regex + + + + Do not include Perl Compatible Regular Expressions support. + Use --with-pcre-regex=DIR to specify DIR where PCRE's + include and library files are located, if not using bundled library. + + + + + + --with-pdflib[=DIR] + + + + Include PDFlib support. DIR is the pdflib base install directory, + defaults to /usr/local. Set DIR to shared to build as dl, or + shared,DIR to build as dl and still specify DIR. + + + + + + --with-jpeg-dir[=DIR] + + + + PDFLIB: define libjpeg install directory. + + + + + + --with-png-dir[=DIR] + + + + PDFLIB: define libpng install directory. + + + + + + --with-tiff-dir[=DIR] + + + + PDFLIB: define libtiff install directory. + + + + + + --with-pfpro[=DIR] + + + + Include Verisign Payflow Pro support. + + + + + + --with-pgsql[=DIR] + + + + Include PostgreSQL support. DIR is the PostgreSQL base install directory, + defaults to /usr/local/pgsql. Set DIR to shared to build as a dl, or + shared,DIR to build as a dl and still specify DIR. + + + + + + --disable-posix + + + + Disable POSIX-like functions. + + + + + + --with-pspell[=DIR] + + + + Include PSPELL support. + + + + + + --with-qtdom + + + + Include QtDOM support (requires Qt >= 2.2.0). + + + + + + --with-libedit[=DIR] + + + + Include libedit readline replacement. + + + + + + --with-readline[=DIR] + + + + Include readline support. DIR is the readline install directory. + + + + + + --with-recode[=DIR] + + + + Include recode support. DIR is the recode install directory. + + + + + + --with-satellite[=DIR] + + + + Enable CORBA support via Satellite (EXPERIMENTIAL) DIR is the base + directory for ORBit. + + + + + + --with-mm[=DIR] + + + + Include mm support for session storage. + + + + + + --enable-trans-sid + + + + Enable transparent session id propagation. + + + + + + --disable-session + + + + Disable session support. + + + + + + --enable-shmop + + + + Enable shmop support. + + + + + + --with-snmp[=DIR] + + + + Include SNMP support. DIR is the SNMP base install directory, defaults to + searching through a number of common locations for the snmp install. Set DIR + to shared to build as a dl, or shared,DIR to build as a dl and still specify DIR. + + + + + + --enable-ucd-snmp-hack + + + + Enable UCD SNMP hack. + + + + + + --enable-sockets + + + + Enable sockets support. + + + + + + --with-regex=TYPE + + + + regex library type: system, apache, php. + + + + + + --with-system-regex + + + + Use system regex library (deprecated). + + + + + + --with-swf[=DIR] + + + + Include swf support. + + + + + + --with-sybase[=DIR] + + + + Include Sybase-DB support. DIR is the Sybase home directory, + defaults to /home/sybase. + + + + + + --with-sybase-ct[=DIR] + + + + Include Sybase-CT support. DIR is the Sybase home directory. + Defaults to /home/sybase. + + + + + + --enable-sysvsem + + + + Enable System V semaphore support. + + + + + + --enable-sysvshm + + + + Enable the System V shared memory support. + + + + + + --with-vpopmail[=DIR] + + + + Include vpopmail support. + + + + + + --enable-wddx + + + + Enable WDDX support. + + + + + + --disable-xml + + + + Disable XML support using bundled expat lib. + + + + + + --with-expat-dir=DIR + + + + XML: external libexpat install dir. + + + + + + --with-xmlrpc[=DIR] + + + + Include XMLRPC-EPI support. + + + + + + --with-tsrm-pthreads + + + + Use POSIX threads (default). + + + + + + --enable-shared[=PKGS] + + + + Build shared libraries [default=yes]. + + + + + + --enable-static[=PKGS] + + + + Build static libraries [default=yes]. + + + + + + --enable-fast-install[=PKGS] + + + + Optimize for fast installation [default=yes]. + + + + + + --with-gnu-ld + + + + Assume the C compiler uses GNU ld [default=no]. + + + + + + --disable-libtool-lock + + + + Avoid locking (might break parallel builds). + + + + + + --with-pic + + + + Try to use only PIC/non-PIC objects [default=use both]. + + + + + + --with-yaz[=DIR] + + + + Include YAZ support (ANSI/NISO Z39.50). + DIR is the YAZ bin install directory. + + + + + + --enable-memory-limit + + + + Compile with memory limit support. + + + + + + --disable-url-fopen-wrapper + + + + Disable the URL-aware fopen wrapper that allows + accessing files via http or ftp. + + + + + + --enable-versioning + + + + Export only required symbols. + See INSTALL for more information. + + + + + + + Configure Options in PHP 3 + + + These options are only valid in PHP 3. They will not work in + PHP 4. + + + + + + + --disable-bcmath + + + + Compile without bc style precision math functions. + + + + + + --with-imsp[=DIR] + + + + Include IMSp support (DIR is IMSP's include dir and libimsp.a dir). + + + + + + --with-ftp + + + + Include FTP support. + + + + + + --without-gd + + + + Disable GD support. + + + + + + --with-imagick + + + + Include ImageMagick support. DIR is the install directory, and if left out, PHP will + try to find it on its own. [experimental]. + + + + + + --with-mck[=DIR] + + + + Include Cybercash MCK support. DIR is the cybercash + mck build directory, defaults to + /usr/src/mck-3.2.0.3-linux for help look in + extra/cyberlib. + + + + + + --disable-overload + + + + Disable user-space object overloading support. + + + + + + --enable-yp + + + + Include YP support. + + + + + + --with-zip + + + + Include ZIP support (requires zziplib >= 0.10.6). + + + + + + --with-mod-dav=DIR + + + + Include DAV support through Apache's mod_dav, + DIR is mod_dav's installation directory (Apache + module version only!) + + + + + + --disable-unified-odbc + + + + Disable unified ODBC support. Only applicable if + iODBC, Adabas, Solid, Velocis or a custom ODBC + interface is enabled. + + + + + + --enable-debugger + + + + Compile with remote debugging functions. + + + + + + --enable-versioning + + + + Take advantage of versioning and scoping + provided by Solaris 2.x and Linux. + + + + + + + + + \ No newline at end of file diff --git a/chapters/install.fhttpd.xml b/chapters/install.fhttpd.xml new file mode 100644 index 0000000000..cbc30bc092 --- /dev/null +++ b/chapters/install.fhttpd.xml @@ -0,0 +1,37 @@ + + + + Servers-fhttpd + + To build PHP as an fhttpd module, answer "yes" to "Build as an + fhttpd module?" (the + --with-fhttpd=DIR + option to configure) and specify the fhttpd source base + directory. The default directory is /usr/local/src/fhttpd. If you are + running fhttpd, building PHP as a module will give better + performance, more control and remote execution capability. + + + + \ No newline at end of file diff --git a/chapters/install.hpux.xml b/chapters/install.hpux.xml new file mode 100644 index 0000000000..c82cef8235 --- /dev/null +++ b/chapters/install.hpux.xml @@ -0,0 +1,107 @@ + + + + Unix/HP-UX installs + + This section contains notes and hints specific to installing PHP + on HP-UX systems. + + + + Installation Instructions for HP-UX 10 + + +non-gnu directory of the ftp site. +Download the file, gunzip, then tar -xvf it. Go into the newly created flex +directory and do a ./configure, then a make, and then a make install + +If you have errors here, it's probably because gcc etc. are not in your +PATH so add them to your PATH. + +Right, now into the hard stuff. + +6. Download the PHP and apache sources. + +7. gunzip and tar -xvf them. + +We need to hack a couple of files so that they can compile ok. + +8. Firstly the configure file needs to be hacked because it seems to lose +track of the fact that you are a hpux machine, there will be a +better way of doing this but a cheap and cheerful hack is to put + lt_target=hpux10.20 +on line 47286 of the configure script. + +9. Next, the Apache GuessOS file needs to be hacked. Under +apache_1.3.9/src/helpers change line 89 from + "echo "hp${HPUXMACH}-hpux${HPUXVER}"; exit 0" +to: + "echo "hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0" + +10. You cannot install PHP as a shared object under HP-UX so you must compile +it as a static, just follow the instructions at the Apache page. + +11. PHP and apache should have compiled OK, but Apache won't start. you need +to create a new user for Apache, eg www, or apache. You then change lines 252 +and 253 of the conf/httpd.conf in Apache so that instead of + User nobody + Group nogroup +you have something like + User www + Group sys + +This is because you can't run Apache as nobody under hp-ux. +Apache and PHP should then work. + +Hope this helps somebody, +Paul Mckay. +]]> + + + + + + \ No newline at end of file diff --git a/chapters/install.iis.xml b/chapters/install.iis.xml new file mode 100644 index 0000000000..e91295f3ba --- /dev/null +++ b/chapters/install.iis.xml @@ -0,0 +1,346 @@ + + + + Servers-IIS/PWS + + This section contains notes and hints specific to IIS (Microsoft + Internet Information Server). Installing PHP for + PWS/IIS 3, + PWS 4 or newer and + IIS 4 or newer versions. + + + Windows and PWS/IIS 3 + + + The recommended method for configuring these servers is to use + the REG file included with the distribution + (pws-php4cgi.reg). You may want to edit this file and make sure + the extensions and PHP install directories match your + configuration. Or you can follow the steps below to do it + manually. + + + + These steps involve working directly with the Windows + registry. One error here can leave your system in an unstable + state. We highly recommend that you back up your registry + first. The PHP Development team will not be held responsible if + you damage your registry. + + + + + + + + Run Regedit. + + + + + Navigate to: HKEY_LOCAL_MACHINE /System + /CurrentControlSet /Services /W3Svc /Parameters + /ScriptMap. + + + + + On the edit menu select: New->String Value. + + + + + Type in the extension you wish to use for your php + scripts. For example .php + + + + + Double click on the new string value and enter the path to + php.exe in the value data field. ex: + c:\php\php.exe. + + + + + Repeat these steps for each extension you wish to associate + with PHP scripts. + + + + + + The following steps do not affect the web server installation + and only apply if you want your php scripts to be executed when + they are run from the command line (ex. run + c:\myscripts\test.php) or by double clicking + on them in a directory viewer window. You may wish to skip these + steps as you might prefer the PHP files to load into a text + editor when you double click on them. + + + + + + Navigate to: HKEY_CLASSES_ROOT + + + + + On the edit menu select: New->Key. + + + + + Name the key to the extension you setup in the previous + section. ex: .php + + + + + Highlight the new key and in the right side pane, double click + the "default value" and enter phpfile. + + + + + Repeat the last step for each extension you set up in the + previous section. + + + + + Now create another New->Key under + HKEY_CLASSES_ROOT and name it + phpfile. + + + + + Highlight the new key phpfile and in the + right side pane, double click the "default value" and enter + PHP Script. + + + + + Right click on the phpfile key and select + New->Key, name it Shell. + + + + + Right click on the Shell key and select + New->Key, name it open. + + + + + Right click on the open key and select + New->Key, name it + command. + + + + + Highlight the new key command and in the + right side pane, double click the "default value" and enter + the path to php.exe. ex: + c:\php\php.exe -q %1. (don't forget the + %1). + + + + + Exit Regedit. + + + + + If using PWS on Windows, reboot to reload the registry. + + + + + + PWS and IIS 3 users now have a fully operational system. IIS 3 + users can use a nifty tool + from Steven Genusa to configure their script maps. + + + + + + Windows and PWS 4 or newer + + + When installing PHP on Windows with PWS 4 or newer version, + you have two options. One to set up the PHP CGI binary, + the other is to use the ISAPI module dll. + + + + If you choose the CGI binary, do the following: + + + + Edit the enclosed pws-php4cgi.reg + file (look into the sapi dir) to reflect the location of + your php.exe. Forward slashes should be escaped, for example: + [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe" + + + + + In the PWS Manager, right click on a given directory you want + to add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + + + + + + + If you choose the ISAPI module, do the following: + + + + Edit the enclosed pws-php4isapi.reg + file (look into the sapi dir) to reflect the location of + your php4isapi.dll. Forward slashes should be escaped, for example: + [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll" + + + + + In the PWS Manager, right click on a given directory you want to + add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + + + + + + + + + Windows NT/2000/XP and IIS 4 or newer + + + To install PHP on an NT/2000/XP Server running IIS 4 or newer, + follow these instructions. You have two options to set up + PHP, using the CGI binary (php.exe) or with the ISAPI module. + + + + In either case, you need to start the Microsoft Management + Console (may appear as 'Internet Services Manager', either + in your Windows NT 4.0 Option Pack branch or the Control + Panel=>Administrative Tools under Windows 2000/XP). Then + right click on your Web server node (this will most probably + appear as 'Default Web Server'), and select 'Properties'. + + + + If you want to use the CGI binary, do the following: + + + + Under 'Home Directory', 'Virtual Directory', or + 'Directory', click on the 'Configuration' button, + and then enter the App Mappings tab. + + + + + Click Add, and in the Executable box, type: + c:\php\php.exe (assuming + that you have unziped PHP in c:\php\). + + + + + In the Extension box, type the file name extension you want + associated with PHP scripts. Leave 'Method exclusions' + blank, and check the Script engine checkbox. You may also + like to check the 'check that file exists' box - for a small + performance penalty, IIS (or PWS) will check that the script + file exists and sort out authentication before firing up php. + This means that you will get sensible 404 style error messages + instead of cgi errors complaing that php did not output any data. + + + You must start over from the previous step for each + extension you want associated with PHP scripts. + .php and .phtml + are common, although .php3 may be + required for legacy applications. + + + + + Set up the appropriate security. (This is done in Internet + Service Manager), and if your NT Server uses NTFS file system, + add execute rights for I_USR_ to the directory that contains + php.exe. + + + + + + + To use the ISAPI module, do the following: + + + + If you don't want to perform HTTP Authentication using PHP, + you can (and should) skip this step. Under ISAPI Filters, + add a new ISAPI filter. Use PHP as the filter name, and + supply a path to the php4isapi.dll. + + + + + Under 'Home Directory', click on the 'Configuration' button. + Add a new entry to the Application Mappings. Use the path + to the php4isapi.dll as the Executable, supply + .php as the extension, leave Method + exclusions blank, and check the Script engine checkbox. + + + + + Stop IIS completely (NET STOP iisadmin) + + + + + Start IIS again (NET START w3svc) + + + + + + + + \ No newline at end of file diff --git a/chapters/install.linux.xml b/chapters/install.linux.xml new file mode 100644 index 0000000000..647a702f75 --- /dev/null +++ b/chapters/install.linux.xml @@ -0,0 +1,43 @@ + + + + Unix/Linux installs + + This section contains notes and hints specific to installing + PHP on Linux distributions. + + + Using Packages + + Many Linux distributions have some sort of package installation, + such as RPM. This can assist in setting up a standard + configuration, but if you need to have a different set of features + (such as a secure server, or a different database driver), you may + need to build php and/or your webserver. If you are unfamiliar + with building and compiling your own software, it is worth + checking to see whether somebody has already built a packaged + version of PHP with the features you need. + + + + + \ No newline at end of file diff --git a/chapters/install.macosx.xml b/chapters/install.macosx.xml new file mode 100644 index 0000000000..60c841637a --- /dev/null +++ b/chapters/install.macosx.xml @@ -0,0 +1,190 @@ + + + + Unix/Mac OS X installs + + This section contains notes and hints specific to installing + PHP on Mac OS X Server. + + + Using Packages + + There are a few pre-packaged and pre-compiled versions of PHP for + Mac OS X. This can help in setting up a standard + configuration, but if you need to have a different set of features + (such as a secure server, or a different database driver), you may + need to build PHP and/or your web server yourself. If you are unfamiliar + with building and compiling your own software, it's worth + checking whether somebody has already built a packaged + version of PHP with the features you need. + + + + Compiling for OS X server + + There are two slightly different versions of Mac OS X, client and + server. The following is for OS X Server. + + + Mac OS X server install + + + + + + Other examples for + Mac OS X client + and + Mac OS X server + are available at Stepwise. + + + + Compiling for MacOS X client + + Those tips are graciously provided by Marc Liyanage. + + + The PHP module for the Apache web server included in Mac OS X. + This version includes support for the MySQL and PostgreSQL databases. + + + NOTE: Be careful when you do this, you could screw up your Apache web server! + + + Do this to install: + + + + 1. Open a terminal window + + + + + 2. Type "wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz", + wait for download to finish + + + + + 3. Type "gunzip libphp4.so.gz" + + + + + 4. Type "sudo apxs -i -a -n php4 libphp4.so" + + + + Now type "sudo open -a TextEdit /etc/httpd/httpd.conf" + TextEdit will open with the web server configuration file. Locate these + two lines towards the end of the file: (Use the Find command) + + + + Remove the two hash marks (#), then save the file and quit TextEdit. + + + Finally, type "sudo apachectl graceful" to restart the web server. + + + PHP should now be up and running. You can test it by dropping a file into + your "Sites" folder which is called "test.php". Into that file, write this + line: "<?php phpinfo() ?>". + + + Now open up 127.0.0.1/~your_username/test.php in your web browser. + You should see a status table with information about the PHP module. + + + + + \ No newline at end of file diff --git a/chapters/install.netscape-enterprise.xml b/chapters/install.netscape-enterprise.xml new file mode 100644 index 0000000000..293210f3e7 --- /dev/null +++ b/chapters/install.netscape-enterprise.xml @@ -0,0 +1,317 @@ + + + + Servers-Netscape and iPlanet + + This section contains notes and hints specific to Netscape and iPlanet + installs of PHP, both for Sun Solaris + and Windows versions. + + + You can find more information about setting up PHP for + the Netscape Enterprise Server here: + &url.netscape.nsapi; + + + Installing PHP with Netscape on Sun Solaris + + To build PHP with NES or iPlanet web servers, enter the proper + install directory for the + --with-nsapi + = DIR option. The default + directory is usually /opt/netscape/suitespot/. + Please also read /php-xxx-version/sapi/nsapi/nsapi-readme.txt. + + + + Installation Example for Netscape Enterprise on Solaris + + + + + After performing the base install and reading the appropriate + readme file, you may need to performs some additional + configuration steps. + + + Firstly you may need to add some paths to the LD_LIBRARY_PATH + environment for Netscape to find all the shared libs. This can + best done in the start script for your Netscape server. + Windows users can probably skip this step. The start + script is often located in: + /path/to/server/https-servername/start + + + You may also need to edit the configuration files that are + located in:/path/to/server/https-servername/config/. + + + + + Configuration Example for Netscape Enterprise + + + + . + . + . + .#NOTE this next line should happen after all 'ObjectType' and before all 'AddLog' lines + Service fn="php4_execute" type="magnus-internal/x-httpd-php" + . + . + + + + + ObjectType fn="force-type" type="magnus-internal/x-httpd-php" + Service fn=php4_execute + + + + Authentication configuration + + PHP authentication cannot be used with any other authentication. ALL AUTHENTICATION IS + PASSED TO YOUR PHP SCRIPT. To configure PHP Authentication for the entire server, add + the following line: + + + AuthTrans fn=php4_auth_trans + . + . + . + . + + + To use PHP Authentication on a single directory, add the following: + + + AuthTrans fn=php4_auth_trans + +]]> + + + + If you are running Netscape Enterprise 4.x, then you should use the following: + + + Configuration Example for Netscape Enterprise 4.x + + + + + + + Installing PHP with Netscape on Windows + + To Install PHP as CGI (for Netscape Enterprise Server, + iPlanet, perhaps Fastrack), do the following: + + + + + Copy php4ts.dll to your systemroot + (the directory where you installed windows) + + + + + Make a file association from the command line. + Type the following two lines: + + + + + + + + In the Netscape Enterprise Administration Server create + a dummy shellcgi directory and remove it just after (this + step creates 5 important lines in obj.conf and allow the + web server to handle shellcgi scripts). + + + + + In the Netscape Enterprise Administration Server create + a new mime type (Category: type, + Content-Type: magnus-internal/shellcgi, File Suffix:php). + + + + + Do it for each web server instance you want php to run + + + + + More details about setting up + PHP as a CGI executable can be found here: + &url.netscape.cgi; + + + To Install PHP as NSAPI (for Netscape Enterprise Server, + iPlanet, perhaps Fastrack, do the following: + + + + + Copy php4ts.dll to your systemroot + (the directory where you installed windows) + + + + + Make a file association from the command line. + Type the following two lines: + + + + + + + + In the Netscape Enterprise Administration Server create + a new mime type (Category: type, + Content-Type: magnus-internal/x-httpd-php, File Suffix:php). + + + + + Stop your web service and edit obj.conf. + At the end of the Init section, place these two lines + (necessarily after mime type init!): + + + + + + + + In The < Object name="default" > + section, place this line necessarily after all 'ObjectType' + and before all 'AddLog' lines: + + + + + + + + At the end of the file, create a new object called + x-httpd-php, by inserting these lines: + + +ObjectType fn="force-type" type="magnus-internal/x-httpd-php" +Service fn=php4_execute + +]]> + + + + + + Restart your web service and apply changes + + + + + Do it for each web server instance you want PHP to run + + + + + More details about setting up + PHP as an NSAPI filter can be found here: + &url.netscape.nsapi; + + + + + \ No newline at end of file diff --git a/chapters/install.omnihttpd.xml b/chapters/install.omnihttpd.xml new file mode 100644 index 0000000000..cb80fe0556 --- /dev/null +++ b/chapters/install.omnihttpd.xml @@ -0,0 +1,96 @@ + + + + Servers-OmniHTTPd Server + + This section contains notes and hints specific to OmniHTTPd. + + + OmniHTTPd 2.0b1 and up for Windows + + + You need to complete the folowing steps to make PHP + work with OmniHTTPd. This is a CGI executable setup. + SAPI is supported by OmniHTTPd, but some tests showed, + that it is not so stable to use PHP as an ISAPI module + in OmniHTTPd. + + + + + + + Step 1: Install OmniHTTPd server. + + + + + Step 2: Right click on the blue OmniHTTPd icon in the system + tray and select Properties + + + + + Step 3: Click on Web Server Global Settings + + + + + Step 4: On the 'External' tab, enter: virtual = .php + | actual = c:\path-to-php-dir\php.exe, and use the Add + button. + + + + + Step 5: On the Mime tab, enter: + virtual = wwwserver/stdcgi | actual = .php, + and use the Add button. + + + + + Step 6: Click OK + + + + + + + Repeat steps 2 - 6 for each extension you want to associate with PHP. + + + + Some OmniHTTPd packages come with built in PHP support. + You can choose at setup time to do a custom setup, and + uncheck the PHP component. We recommend you to use the latest + PHP binaries. Some OmniHTTPd servers come with PHP 4 beta + distributions, so you should choose not to set up + the built in support, but install your own. If the server + is already on your machine, use the Replace button in Step + 4 and 5 to set the new, correct information. + + + + + + \ No newline at end of file diff --git a/chapters/install.openbsd.xml b/chapters/install.openbsd.xml new file mode 100644 index 0000000000..cffbcf6a1c --- /dev/null +++ b/chapters/install.openbsd.xml @@ -0,0 +1,66 @@ + + + + Unix/OpenBSD installs + + This section contains notes and hints specific to installing + PHP on OpenBSD. + + + Using Ports + + This is the recommended method of installing PHP on OpenBSD, as it will have + the latest patches and security fixes applied to it by the maintainers. To + use this method, ensure that you have a + recent ports tree. Then simply find out which flavors you wish + to install, and issue the make install command. Below + is an example of how to do this. + + + OpenBSD Ports Install Example + + + + + + + Using Packages + + There are pre-compiled packages available for your release + of OpenBSD. These integrate + automatically with the version of Apache installed with the OS. + However, since there are a large number of options (called + flavors) available for this port, + you may find it easier to compile it from source using the ports tree. + Read the packages(7) + manual page for more information in what packages are available. + + + + + \ No newline at end of file diff --git a/chapters/install.oreilly.xml b/chapters/install.oreilly.xml new file mode 100644 index 0000000000..f2ca8d9a08 --- /dev/null +++ b/chapters/install.oreilly.xml @@ -0,0 +1,66 @@ + + + + Servers-Oreilly Website Pro + + This section contains notes and hints specific to Oreilly + Website Pro. + + + Oreilly Website Pro 2.5 and up for Windows + + + This list describes how to set up the PHP CGI binary + or the ISAPI module to work with Oreilly Website Pro + on Windows. + + + + + + + Edit the Server Properties and select the tab "Mapping". + + + + + From the List select "Associations" and enter the desired + extension (.php) and the path to the CGI exe + (ex. c:\php\php.exe) or the ISAPI DLL file + (ex. c:\php\sapi\php4isapi.dll). + + + + + Select "Content Types" add the same extension + (.php) and enter the content type. + If you choose the CGI executable file, enter + 'wwwserver/shellcgi', if you chosse the ISAPI module, + enter 'wwwserver/isapi' (both without quotes). + + + + + + + + \ No newline at end of file diff --git a/chapters/install.otherhttpd.xml b/chapters/install.otherhttpd.xml new file mode 100644 index 0000000000..deba1d77a1 --- /dev/null +++ b/chapters/install.otherhttpd.xml @@ -0,0 +1,39 @@ + + + + Servers-Other web servers + + PHP can be built to support a large number of web servers. Please + + see Server-related + options for a full list of server-related configure + options. The PHP CGI binaries are compatible with almost all + webservers supporting the CGI standard. + + + + \ No newline at end of file diff --git a/chapters/install.problems.xml b/chapters/install.problems.xml new file mode 100644 index 0000000000..a818132ae8 --- /dev/null +++ b/chapters/install.problems.xml @@ -0,0 +1,75 @@ + + + Problems? + + + Read the FAQ + + Some problems are more common than others. The most + common ones are listed in the PHP + FAQ, part of this manual. + + + + + Other problems + + + If you are still stuck, someone on the PHP installation mailing list may be + able to help you. You should check out the archive first, in case + someone already answered someone else who had the same problem as + you. The archives are available from the support page on &url.php;. To subscribe to the PHP installation + mailing list, send an empty mail to &email.php.install.subscribe;. + The mailing list address is &email.php.install;. + + + If you want to get help on the mailing list, please try to be + precise and give the necessary details about your environment + (which operating system, what PHP version, what web server, if + you are running PHP as CGI or a server module, etc.), and + preferably enough code to make others able to reproduce and test + your problem. + + + + + Bug reports + + If you think you have found a bug in PHP, please report it. The + PHP developers probably don't know about it, and unless you + report it, chances are it won't be fixed. You can report bugs + using the bug-tracking system at &url.php.bugs;. Please do not + send bug reports in mailing list or personal letters. The + bug system is also suitable to submit feature requests. + + + Read the How to report a bug + document before submitting any bug reports! + + + + + \ No newline at end of file diff --git a/chapters/install.solaris.xml b/chapters/install.solaris.xml new file mode 100644 index 0000000000..dbe24c667e --- /dev/null +++ b/chapters/install.solaris.xml @@ -0,0 +1,99 @@ + + + + Unix/Solaris installs + + This section contains notes and hints specific to installing + PHP on Solaris systems. + + + Required software + + Solaris installs often lack C compilers and their related tools. + The required software is as follows: + + + + gcc (recommended, other C compilers may work) + + + + + make + + + + + flex + + + + + bison + + + + + m4 + + + + + autoconf + + + + + automake + + + + + perl + + + + + gzip + + + + + tar + + + + In addition, you will need to install (and possibly compile) any + additional software specific to your configuration, such as Oracle + or MySQL. + + + + Using Packages + + You can simplify the Solaris install process by using pkgadd to + install most of your needed components. + + + + + \ No newline at end of file diff --git a/chapters/install.unix.xml b/chapters/install.unix.xml new file mode 100644 index 0000000000..6cc9390655 --- /dev/null +++ b/chapters/install.unix.xml @@ -0,0 +1,161 @@ + + + + Installation on UNIX systems + + This section will guide you through the general configuration and + installation of PHP on Unix systems. Be sure to investigate any + sections specific to your platform or web server before you begin + the process. + + + Prerequisite knowledge and software: + + + + Basic UNIX skills (being able to operate "make" and a C + compiler, if compiling) + + + + + An ANSI C compiler (if compiling) + + + + + flex (for compiling) + + + + + bison (for compiling) + + + + + A web server + + + + + Any module specific components (such as gd, pdf libs, etc.) + + + + + + + There are several ways to install PHP for the Unix platform, either + with a compile and configure process, or through various + pre-packaged methods. This documentation is mainly focused around + the process of compiling and configuring PHP. + + + + The initial PHP setup and configuration process is controlled by the + use of the commandline options of the configure + script. This page outlines the usage of the most common options, + but there are many others to play with. Check out the Complete list of configure + options for an exhaustive rundown. There are several ways + to install PHP: + + + + As an Apache module + + + + + As an fhttpd module + + + + + For use with AOLServer, NSAPI, + phttpd, Pi3Web, Roxen, thttpd, or Zeus. + + + + + As a CGI executable + + + + + + + Apache Module Quick Reference + + + PHP can be compiled in a number of different ways, but one of + the most popular is as an Apache module. The following is a quick + installation overview. + + + + + Quick Installation Instructions for PHP 4 (Apache Module Version) + + + + + + + + + Building + + When PHP is configured, you are ready to build the CGI executable. + The command make should + take care of this. If it fails and you can't figure out why, see + the Problems section. + + + + + \ No newline at end of file diff --git a/chapters/install.windows.xml b/chapters/install.windows.xml new file mode 100644 index 0000000000..0831104951 --- /dev/null +++ b/chapters/install.windows.xml @@ -0,0 +1,844 @@ + + + + Installation on Windows systems + + This section applies to Windows 95/98/Me and + Windows NT/2000/XP. Do not expect PHP to work on + 16 bit platforms such as Windows 3.1. Sometimes + we refer to the supported Windows platforms as Win32. + + + There are two main ways to install PHP for Windows: either + manually + or by using the InstallShield + installer. + + + If you have Microsoft Visual Studio, you can also + build + PHP from the original source code. + + + Once you have PHP installed on your Windows system, you may also + want to load various extensions + for added functionality. + + + + Windows InstallShield + + + The Windows PHP installer available from the downloads page at + &url.php;, this installs the CGI version + of PHP and, for IIS, PWS, and Xitami, configures the web server as + well. Also note, that while the InstallShield installer is an + easy way to make PHP work, it is restricted in many aspects, as + automatic setup of extensions for example is not supported. + + + + Install your selected HTTP server on your system + and make sure that it works. + + + + Run the executable installer and follow the instructions provided by + the installation wizard. Two types of installation are supported - + standard, which provides sensible defaults for all the settings it + can, and advanced, which asks questions as it goes along. + + + + The installation wizard gathers enough information to set up the + php.ini file and configure the web server to + use PHP. For IIS and also PWS on NT Workstation, a list of all the + nodes on the server with script map settings is displayed, and you + can choose those nodes to which you wish to add the PHP script + mappings. + + + + Once the installation has completed the installer will inform you + if you need to restart your system, restart the server, or just + start using PHP. + + + + + Be aware, that this setup of PHP is not secure. If you would + like to have a secure PHP setup, you'd better go on the manual + way, and set every option carefully. This automatically working + setup gives you an instantly working PHP installation, but it is + not meant to be used on online servers. + + + + + + + Manual Installation Steps + + This install guide will help you manually install and configure + PHP on your Windows webserver. You need to download the + zip binary distribution from the downloads page at + &url.php;. The original version + of this guide was compiled by &link.bob;, and can be found at &url.win32install;. + + + This guide provides manual installation support for: + + + + Personal Web Server 3 and 4 or newer + + + + + Internet Information Server 3 and 4 or newer + + + + + Apache 1.3.x + + + + + OmniHTTPd 2.0b1 and up + + + + + Oreilly Website Pro + + + + + Xitami + + + + + Netscape Enterprise Server, iPlanet + + + + + + PHP 4 for Windows comes in two flavours - a CGI executable (php.exe), + and several SAPI modules (for example: php4isapi.dll). The latter form + is new to PHP 4, and provides significantly improved performance and + some new functionality. + + + + The SAPI modules have been significantly improved in the 4.1 release, + however, you may find that you encounter possible server errors or + other server modules such as ASP failing, in older systems. + + + + If you choose one of the SAPI modules and use Windows 95, be sure + to download the DCOM update from the Microsoft DCOM pages. For the + ISAPI module, an ISAPI 4.0 compliant Web server is required + (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is + NOT supported. You should download and + install the Windows NT 4.0 Option Pack with IIS 4.0 if you + want native PHP support. + + + The following steps should be performed on all installations + before the server specific instructions. + + + + Extract the distribution file to a directory of your choice. + c:\php\ is a good start. + + + + + You need to ensure that the dlls which PHP uses can be found. + The precise DLLs involved depend on which web server you use + and whether you want to run PHP as a CGI or as a server module. + php4ts.dll is always used. If you are + using a server module (e.g. ISAPI or Apache) then you will + need the relevent DLL from the sapi + folder. If you are using any PHP extension DLLs then you + will need those as well. To make sure that the DLLs can be + found, you can either copy them to the system directory + (e.g. winnt/system32 or + windows/system) or you can make sure + that they live in the same directory as the main PHP + executable or DLL your web server will use (e.g. php.exe, + php4apache.dll). + + + The PHP binary, the SAPI modules, and some extensions rely on + external DLLs for execution. Make sure that these DLLs in the + distribution exist in a directory that is in the Windows PATH. + The best bet to do it is to copy the files below into your + system directory, which is typically: + + c:\windows\system for Windows 9x/Me + c:\winnt\system32 for Windows NT/2000/XP + + The files to copy are: + + + 'php4ts.dll', if it already exists there, overwrite it + + + The files in your distribution's 'dlls' directory. + If you have them already installed on your system, overwrite them + only if something doesn't work correctly (Before overwriting them, + it is a good idea to make a backup of them, or move them to + another folder - just in case something goes wrong). + + + + + Download the latest version of the Microsoft Data Access Components + (MDAC) for your platform, especially if you use Microsoft Windows + 9x/NT4. MDAC is available at &url.mdac;. + + + + + Copy your choosen ini file (see below) to your + '%WINDOWS%' directory on Windows 9x/Me or to your + '%SYSTEMROOT%' directory under Windows NT/2000/XP + and rename it to php.ini. Your + '%WINDOWS%' or '%SYSTEMROOT%' directory is + typically: + + c:\windows for Windows 9x/Me + c:\winnt or c:\winnt40 for NT/2000/XP servers + + + + There are two ini files distributed in the zip file, + php.ini-dist and + php.ini-optimized. We advise + you to use php.ini-optimized, + because we optimized the default settings in this + file for performance, and security. The best is to + study all the ini + settings and set every element manually yourself. + If you would like to achive the best security, then this + is the way for you, although PHP works fine with these + default ini files. + + + + + Edit your new 'php.ini' file: + + + + You will need to change the 'extension_dir' setting to + point to your php-install-dir, or where you have placed + your 'php_*.dll' files. ex: c:\php\extensions + + + + + If you are using OmniHTTPd, do not follow the next step. + Set the 'doc_root' to point to your webservers + document_root. For example: c:\apache\htdocs or c:\webroot + + + + + Choose which extensions you would like to load when PHP + starts. See the section about + Windows + extensions, about how to set up one, and what + is already built in. Note that on a new installation + it is advisable to first get PHP working and tested + without any extensions before enabling them in + php.ini. + + + + + On PWS and IIS, you can set the browscap.ini + to point to: 'c:\windows\system\inetsrv\browscap.ini' on + Windows 9x/Me and 'c:\winnt\system32\inetsrv\browscap.ini' + on NT/2000/XP Server. + + + + + Note that the mibs directory supplied + with the Windows distribution contains support files for + SNMP. This directory should be moved to + DRIVE:\usr\mibs (DRIVE + being the drive where PHP is installed.) + + + + + + + + + + + Building from source + + Before getting started, it is worthwhile answering the question: + "Why is building on Windows so hard?" Two reasons come to mind: + + + + Windows does not (yet) enjoy a large community of developers + who are willing to freely share their source. As a direct + result, the necessary investment in infrastructure required + to support such development hasn't been made. By and large, + what is available has been made possible by the porting of + necessary utilities from Unix. Don't be surprised if some of + this heritage shows through from time to time. + + + Pretty much all of the instructions that follow are of the + "set and forget" variety. So sit back and try follow the + instructions below as faithfully as you can. + + + + + Preparations + + Before you get started, you have a lot to download... + + + + For starters, get the Cygwin toolkit from the closest cygwin + mirror site. This will provide you most of the popular GNU + utilities used by the build process. + + + Download the rest of the build tools you will need from the PHP + site at http://www.php.net/extra/win32build.zip. + + + Get the source code for the DNS name resolver used by PHP + at http://www.php.net/extra/bindlib_w32.zip. This + is a replacement for the resolv.lib + library included in win32build.zip. + + + If you don't already have an unzip utility, you will + need one. A free version is available from InfoZip. + + + + Finally, you are going to need the source to PHP 4 itself. + You can get the latest development version using anonymous CVS. If you get + a snapshot or a source tarball, you + not only will have to untar and ungzip it, but you will have to + convert the bare linefeeds to crlf's in the *.dsp + and *.dsw files before Microsoft Visual C++ + will have anything to do with them. + + + + Place the Zend and + TSRM directories inside the + php4 directory in order for the projects + to be found during the build process. + + + + + Putting it all together + + + Follow the instructions for installing the unzip utility of + your choosing. + + + + Execute setup.exe and follow the installation + instructions. If you choose to install to a path other than + c:\cygnus, let the build process know by setting + the Cygwin environment variable. On Windows 95/98 setting + an environment variable can be done by placing a line in + your autoexec.bat. On Windows NT, go to My Computer => + Control Panel => System and select the environment tab. + + + + Make a temporary directory for Cygwin to use, otherwise many + commands (particularly bison) will fail. On Windows 95/98, + mkdir C:\TMP. For Windows NT, + mkdir %SystemDrive%\tmp. + + + + + Make a directory and unzip win32build.zip into it. + + + + Launch Microsoft Visual C++, and from the menu select + Tools => Options. In the dialog, select the + directories tab. Sequentially change the dropdown + to Executables, Includes, and Library files, + and ensure that cygwin\bin, + win32build\include, and + win32build\lib are in each list, + respectively. (To add an entry, select a blank line + at the end of the list and begin typing). Typical entries + will look like this: + + + + c:\cygnus\bin + + + c:\php-win32build\include + + + c:\php-win32build\lib + + + + Press OK, and exit out of Visual C++. + + + + + Make another directory and unzip bindlib_w32.zip + into it. Decide whether you want to have debug symbols available + (bindlib - Win32 Debug) or not (bindlib - Win32 Release). + Build the appropriate configuration: + + + + For GUI users, launch VC++, and then select File => Open + Workspace and select bindlib. Then select Build=>Set + Active Configuration and select the desired configuration. + Finally select Build=>Rebuild All. + + + + For command line users, make sure that you either have + the C++ environment variables registered, or have run + vcvars.bat, and then execute one of the + following: + + + + + msdev bindlib.dsp /MAKE "bindlib - Win32 Debug" + + + + + msdev bindlib.dsp /MAKE "bindlib - Win32 Release" + + + + + + At this point, you should have a usable + resolv.lib in either your + Debug or Release + subdirectories. Copy this file into your + win32build\lib directory over the + file by the same name found in there. + + + + + + + + Compiling + + The best way to get started is to build the standalone/CGI version. + + + + For GUI users, launch VC++, and then select File => Open + Workspace and select php4ts. Then select Build=>Set Active + Configuration and select the desired configuration. Finally + select Build=>Rebuild All. + + + + For command line users, make sure that you either have + the C++ environment variables registered, or have run + vcvars.bat, and then execute one of the + following: + + + + msdev php4ts.dsp /MAKE "php4ts - Win32 Debug_TS" + + + msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS" + + + At this point, you should have a usable + php.exe in either + your Debug_TS or + Release_TS subdirectories. + + + + + + Repeat the above steps with php4isapi.dsp + (which can be found in sapi\isapi) in + order to build the code necessary for integrating PHP with + Microsoft IIS. + + + + + + Installation of Windows extensions + + After installing PHP and a webserver on Windows, you will + probably want to install some extensions for added functionality. + The following table describes some of the extensions available. You + can choose which extensions you would like to load when PHP starts + by uncommenting the: 'extension=php_*.dll' lines in + php.ini. You can also load a module dynamically + in your script using dl. + + + The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and + 'php3_' in PHP 3). This prevents confusion between PHP extensions + and their supporting libraries. + + + + In PHP 4.0.6 BCMath, Calendar, COM, FTP, MySQL, ODBC, PCRE, + Session, WDDX and XML support is built in. + You don't need to load any additional extensions in order to + use these functions. See your distributions + README.txt or install.txt + for a list of built in modules. + + + + + + Some of these extensions need extra dlls to work. Couple of them can be + found in the distribution package, in the 'dlls' folder but + some, for example Oracle (php_oci8.dll) require dlls which are + not bundled with the distribution package. + + + + Copy the bundled dlls from 'dlls' folder to your Windows + PATH, safe places are: + + c:\windows\system for Windows 9x/Me + c:\winnt\system32 for Windows NT/2000/XP + + If you have them already installed on your system, overwrite them + only if something doesn't work correctly (Before overwriting them, + it is a good idea to make a backup of them, or move them to + another folder - just in case something goes wrong). + + + + + + PHP Extensions + + + + Extension + Description + Notes + + + + + + php_bz2.dll + bzip2 compression functions + None + + + php_calendar.dll + Calendar conversion functions + Built in since PHP 4.0.3 + + + php_cpdf.dll + ClibPDF functions + None + + + php3_crypt.dll + Crypt functions + unknown + + + php_ctype.dll + ctype family functions + None + + + php_curl.dll + CURL, Client URL library functions + Requires: libeay32.dll, ssleay32.dll (bundled) + + + php_cybercash.dll + Cybercash payment functions + None + + + php_db.dll + DBM functions + Deprecated. Use DBA instead (php_dba.dll) + + + php_dba.dll + DBA: DataBase (dbm-style) Abstraction layer functions + None + + + php_dbase.dll + dBase functions + None + + + php3_dbm.dll + Berkeley DB2 library + unknown + + + php_domxml.dll + DOM XML functions + Requires: libxml2.dll (bundled) + + + php_dotnet.dll + .NET functions + None + + + php_exif.dll + Read EXIF headers from JPEG + None + + + php_fbsql.dll + FrontBase functions + None + + + php_fdf.dll + FDF: Forms Data Format functions. + Requires: fdftk.dll (bundled) + + + php_filepro.dll + filePro functions + Read-only access + + + php_ftp.dll + FTP functions + Built-in since PHP 4.0.3 + + + php_gd.dll + GD library image functions + None + + + php_gettext.dll + Gettext functions + Requires: gnu_gettext.dll (bundled) + + + php_hyperwave.dll + HyperWave functions + None + + + php_iconv.dll + ICONV characterset conversion + Requires: iconv-1.3.dll (bundled) + + + php_ifx.dll + Informix functions + Requires: Informix libraries + + + php_iisfunc.dll + IIS management functions + None + + + php_imap.dll + IMAP POP3 and NNTP functions + PHP 3: php3_imap4r1.dll + + + php_ingres.dll + Ingres II functions + Requires: Ingres II libraries + + + php_interbase.dll + InterBase functions + Requires: gds32.dll (bundled) + + + php_java.dll + Java extension + Requires: jvm.dll (bundled) + + + php_ldap.dll + LDAP functions + Requires: libsasl.dll (bundled) + + + php_mhash.dll + Mhash Functions + None + + + php_ming.dll + Ming functions for Flash + None + + + php_msql.dll + mSQL functions + Requires: msql.dll (bundled) + + + php3_msql1.dll + mSQL 1 client + unknown + + + php3_msql2.dll + mSQL 2 client + unknown + + + php_mssql.dll + MSSQL functions + Requires: ntwdblib.dll (bundled) + + + php3_mysql.dll + MySQL functions + Built-in in PHP 4 + + + php3_nsmail.dll + Netscape mail functions + unknown + + + php3_oci73.dll + Oracle functions + unknown + + + php_oci8.dll + Oracle 8 functions + Requires: Oracle 8 client libraries + + + php_openssl.dll + OpenSSL functions + Requires: libeay32.dll (bundled) + + + php_oracle.dll + Oracle functions + Requires: Oracle 7 client libraries + + + php_pdf.dll + PDF functions + None + + + php_pgsql.dll + PostgreSQL functions + None + + + php_printer.dll + Printer functions + None + + + php_sablot.dll + XSLT functions + Requires: sablot.dll (bundled) + + + php_snmp.dll + SNMP get and walk functions + NT only! + + + php_sybase_ct.dll + Sybase functions + Requires: Sybase client libraries + + + php_yaz.dll + YAZ functions + None + + + php_zlib.dll + ZLib compression functions + None + + + +
+
+
+
+ + \ No newline at end of file diff --git a/chapters/install.xitami.xml b/chapters/install.xitami.xml new file mode 100644 index 0000000000..270682a158 --- /dev/null +++ b/chapters/install.xitami.xml @@ -0,0 +1,73 @@ + + + + Servers-Xitami + + This section contains notes and hints specific to Xitami. + + + Xitami for Windows + + + This list describes how to set up the PHP CGI binary + to work with Xitami on Windows. + + + + + + + Make sure the webserver is running, and point + your browser to xitamis admin console + (usually http://127.0.0.1/admin), + and click on Configuration. + + + + + Navigate to the Filters, and put the + extension which PHP should parse (i.e. .php) + into the field File extensions (.xxx). + + + + + In Filter command or script put the path and name + of your php executable i.e. c:\php\php.exe. + + + + + Press the 'Save' icon. + + + + + Restart the server to reflect changes. + + + + + + + + \ No newline at end of file diff --git a/chapters/install.xml b/chapters/install.xml index 1b70349aef..da98744060 100644 --- a/chapters/install.xml +++ b/chapters/install.xml @@ -1,5 +1,5 @@ - + Installation @@ -79,4598 +79,26 @@ to you for downloading the distributions. - - - Installation on UNIX systems - - This section will guide you through the general configuration and - installation of PHP on Unix systems. Be sure to investigate any - sections specific to your platform or web server before you begin - the process. - - - Prerequisite knowledge and software: - - - - Basic UNIX skills (being able to operate "make" and a C - compiler, if compiling) - - - - - An ANSI C compiler (if compiling) - - - - - flex (for compiling) - - - - - bison (for compiling) - - - - - A web server - - - - - Any module specific components (such as gd, pdf libs, etc.) - - - - - - - There are several ways to install PHP for the Unix platform, either - with a compile and configure process, or through various - pre-packaged methods. This documentation is mainly focused around - the process of compiling and configuring PHP. - - - - The initial PHP setup and configuration process is controlled by the - use of the commandline options of the configure - script. This page outlines the usage of the most common options, - but there are many others to play with. Check out the Complete list of configure - options for an exhaustive rundown. There are several ways - to install PHP: - - - - As an Apache module - - - - - As an fhttpd module - - - - - For use with AOLServer, NSAPI, - phttpd, Pi3Web, Roxen, thttpd, or Zeus. - - - - - As a CGI executable - - - - - - - Apache Module Quick Reference - - - PHP can be compiled in a number of different ways, but one of - the most popular is as an Apache module. The following is a quick - installation overview. - - - - - Quick Installation Instructions for PHP 4 (Apache Module Version) - - - - - - - - - Building - - When PHP is configured, you are ready to build the CGI executable. - The command make should - take care of this. If it fails and you can't figure out why, see - the Problems section. - - - - - - Unix/Linux installs - - This section contains notes and hints specific to installing - PHP on Linux distributions. - - - Using Packages - - Many Linux distributions have some sort of package installation, - such as RPM. This can assist in setting up a standard - configuration, but if you need to have a different set of features - (such as a secure server, or a different database driver), you may - need to build php and/or your webserver. If you are unfamiliar - with building and compiling your own software, it is worth - checking to see whether somebody has already built a packaged - version of PHP with the features you need. - - - - - - Unix/HP-UX installs - - This section contains notes and hints specific to installing PHP - on HP-UX systems. - - - - Installation Instructions for HP-UX 10 - - -non-gnu directory of the ftp site. -Download the file, gunzip, then tar -xvf it. Go into the newly created flex -directory and do a ./configure, then a make, and then a make install - -If you have errors here, it's probably because gcc etc. are not in your -PATH so add them to your PATH. - -Right, now into the hard stuff. - -6. Download the PHP and apache sources. - -7. gunzip and tar -xvf them. - -We need to hack a couple of files so that they can compile ok. - -8. Firstly the configure file needs to be hacked because it seems to lose -track of the fact that you are a hpux machine, there will be a -better way of doing this but a cheap and cheerful hack is to put - lt_target=hpux10.20 -on line 47286 of the configure script. - -9. Next, the Apache GuessOS file needs to be hacked. Under -apache_1.3.9/src/helpers change line 89 from - "echo "hp${HPUXMACH}-hpux${HPUXVER}"; exit 0" -to: - "echo "hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0" - -10. You cannot install PHP as a shared object under HP-UX so you must compile -it as a static, just follow the instructions at the Apache page. - -11. PHP and apache should have compiled OK, but Apache won't start. you need -to create a new user for Apache, eg www, or apache. You then change lines 252 -and 253 of the conf/httpd.conf in Apache so that instead of - User nobody - Group nogroup -you have something like - User www - Group sys - -This is because you can't run Apache as nobody under hp-ux. -Apache and PHP should then work. - -Hope this helps somebody, -Paul Mckay. -]]> - - - - - - - Unix/Solaris installs - - This section contains notes and hints specific to installing - PHP on Solaris systems. - - - Required software - - Solaris installs often lack C compilers and their related tools. - The required software is as follows: - - - - gcc (recommended, other C compilers may work) - - - - - make - - - - - flex - - - - - bison - - - - - m4 - - - - - autoconf - - - - - automake - - - - - perl - - - - - gzip - - - - - tar - - - - In addition, you will need to install (and possibly compile) any - additional software specific to your configuration, such as Oracle - or MySQL. - - - - Using Packages - - You can simplify the Solaris install process by using pkgadd to - install most of your needed components. - - - - - - Unix/OpenBSD installs - - This section contains notes and hints specific to installing - PHP on OpenBSD. - - - Using Ports - - This is the recommended method of installing PHP on OpenBSD, as it will have - the latest patches and security fixes applied to it by the maintainers. To - use this method, ensure that you have a - recent ports tree. Then simply find out which flavors you wish - to install, and issue the make install command. Below - is an example of how to do this. - - - OpenBSD Ports Install Example - - - - - - - Using Packages - - There are pre-compiled packages available for your release - of OpenBSD. These integrate - automatically with the version of Apache installed with the OS. - However, since there are a large number of options (called - flavors) available for this port, - you may find it easier to compile it from source using the ports tree. - Read the packages(7) - manual page for more information in what packages are available. - - - - - - Unix/Mac OS X installs - - This section contains notes and hints specific to installing - PHP on Mac OS X Server. - - - Using Packages - - There are a few pre-packaged and pre-compiled versions of PHP for - Mac OS X. This can help in setting up a standard - configuration, but if you need to have a different set of features - (such as a secure server, or a different database driver), you may - need to build PHP and/or your web server yourself. If you are unfamiliar - with building and compiling your own software, it's worth - checking whether somebody has already built a packaged - version of PHP with the features you need. - - - - Compiling for OS X server - - There are two slightly different versions of Mac OS X, client and - server. The following is for OS X Server. - - - Mac OS X server install - - - - - - Other examples for - Mac OS X client - and - Mac OS X server - are available at Stepwise. - - - - Compiling for MacOS X client - - Those tips are graciously provided by Marc Liyanage. - - - The PHP module for the Apache web server included in Mac OS X. - This version includes support for the MySQL and PostgreSQL databases. - - - NOTE: Be careful when you do this, you could screw up your Apache web server! - - - Do this to install: - - - - 1. Open a terminal window - - - - - 2. Type "wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz", - wait for download to finish - - - - - 3. Type "gunzip libphp4.so.gz" - - - - - 4. Type "sudo apxs -i -a -n php4 libphp4.so" - - - - Now type "sudo open -a TextEdit /etc/httpd/httpd.conf" - TextEdit will open with the web server configuration file. Locate these - two lines towards the end of the file: (Use the Find command) - - - - Remove the two hash marks (#), then save the file and quit TextEdit. - - - Finally, type "sudo apachectl graceful" to restart the web server. - - - PHP should now be up and running. You can test it by dropping a file into - your "Sites" folder which is called "test.php". Into that file, write this - line: "<?php phpinfo() ?>". - - - Now open up 127.0.0.1/~your_username/test.php in your web browser. - You should see a status table with information about the PHP module. - - - - - - Complete list of configure options - - - These are only used at compile time. If you want to alter PHP's - runtime configuration, please see the chapter on Configuration. - - - - - The following is a complete list of options supported by PHP 4 - configure scripts (as of 4.1.0), used when - compiling in Unix-like environments. Some are available in PHP 3, - some in PHP 4, and some in both. This is not noted yet. - - - - - - - - Configure Options in PHP 4 - - - These options are only used in PHP 4 as of PHP 4.1.0. - Some are available in older versions of PHP 4, some even in PHP 3, some only in PHP 4.1.0. - If you want to compile an older version, some options will probably - not be available. - - - - - - --enable-maintainer-mode - - - - Enable make rules and dependencies not useful (and sometimes confusing) - to the casual installer. - - - - - - --with-aolserver=DIR - - - - Specify path to the installed AOLserver. - - - - - - --with-apxs[=FILE] - - - - Build shared Apache module. FILE is the optional pathname to the Apache - apxs tool; defaults to apxs. - - - - - - --with-apache[=DIR] - - - - Build Apache module. DIR is the top-level Apache build directory, defaults - to /usr/local/apache. - - - - - - --with-mod_charset - - - - Enable transfer tables for mod_charset (Rus Apache). - - - - - - --with-apxs2[=FILE] - - - - Build shared Apache 2.0 module. FILE is the optional pathname to the Apache - apxs tool; defaults to apxs. - - - - - - --enable-force-cgi-redirect - - - - Enable the security check for internal server redirects. You should use this - if you are running the CGI version with Apache. - - - - - - --enable-discard-path - - - - If this is enabled, the PHP CGI binary can safely be placed outside of the web - tree and people will not be able to circumvent .htaccess security. - - - - - - --with-fhttpd[=DIR] - - - - Build fhttpd module. DIR is the fhttpd sources directory, defaults to /usr/local/src/fhttpd. - - - - - - --with-fastcgi=SRCDIR - - - - Build PHP as FastCGI application. - - - - - - --with-isapi=DIR - - - - Build PHP as an ISAPI module for use with Zeus. - - - - - - --with-nsapi=DIR - - - - Specify path to the installed Netscape Server. - - - - - - --with-phttpd=DIR - - - - No information yet. - - - - - - --with-pi3web=DIR - - - - Build PHP as a module for use with Pi3Web. - - - - - - --with-roxen=DIR - - - - Build PHP as a Pike module. DIR is the base Roxen directory, normally - /usr/local/roxen/server. - - - - - - --enable-roxen-zts - - - - Build the Roxen module using Zend Thread Safety. - - - - - - --with-servlet[=DIR] - - - - Include servlet support. DIR is the base install directory for the JSDK. - This SAPI prereqs the java extension must be built as a shared dl. - - - - - - --with-thttpd=SRCDIR - - - - Build PHP as thttpd module. - - - - - - --with-tux=MODULEDIR - - - - Build PHP as a TUX module (Linux only). - - - - - - --enable-debug - - - - Compile with debugging symbols. - - - - - - --with-layout=TYPE - - - - Sets how installed files will be laid out. Type is one of PHP (default) or GNU. - - - - - - --with-config-file-path=PATH - - - - Sets the path in which to look for php.ini, defaults to PREFIX/lib. - - - - - - --with-pear=DIR - - - - Install PEAR in DIR (default PREFIX/lib/php). - - - - - - --without-pear - - - - Do not install PEAR. - - - - - - --enable-safe-mode - - - - Enable safe mode by default. - - - - - - --with-exec-dir[=DIR] - - - - Only allow executables in DIR when in safe mode defaults to /usr/local/php/bin. - - - - - - --with-openssl[=DIR] - - - - Include OpenSSL support (requires OpenSSL >= 0.9.5). - - - - - - --enable-sigchild - - - - Enable PHP's own SIGCHLD handler. - - - - - - --enable-magic-quotes - - - - Enable magic quotes by default. - - - - - - --disable-rpath - - - - Disable passing additional runtime library search paths. - - - - - - --enable-libgcc - - - - Enable explicitly linking against libgcc. - - - - - - --disable-short-tags - - - - Disable the short-form <? start tag by default. - - - - - - --enable-dmalloc - - - - Enable dmalloc. - - - - - - --enable-php-streams - - - - Include experimental php streams. Do not use unless you are testing the code! - - - - - - --with-zlib-dir=<DIR> - - - - Define the location of zlib install directory. - - - - - - --with-zlib[=DIR] - - - - Include zlib support (requires zlib >= 1.0.9). DIR is the zlib install directory. - - - - - - --with-aspell[=DIR] - - - - Include ASPELL support. - - - - - - --enable-bcmath - - - - Enable bc style precision math functions. - - - - - - --with-bz2[=DIR] - - - - Include BZip2 support. - - - - - - --enable-calendar - - - - Enable support for calendar conversion. - - - - - - --with-ccvs[=DIR] - - - - Include CCVS support. - - - - - - --with-cpdflib[=DIR] - - - - Include cpdflib support (requires cpdflib >= 2). DIR is the cpdfllib install - directory, defaults to /usr. - - - - - - --with-jpeg-dir[=DIR] - - - - jpeg dir for cpdflib 2.x. - - - - - - --with-tiff-dir[=DIR] - - - - tiff dir for cpdflib 2.x. - - - - - - --with-crack[=DIR] - - - - Include crack support. - - - - - - --enable-ctype - - - - Enable ctype support. - - - - - - --with-curl[=DIR] - - - - Include CURL support. - - - - - - --with-cybercash[=DIR] - - - - Include CyberCash support. DIR is the CyberCash MCK install directory. - - - - - - --with-cybermut[=DIR] - - - - Include CyberMut (french Credit Mutuel telepaiement). - - - - - - --with-cyrus - - - - Include cyrus imap support. - - - - - - --with-db - - - - Include old xDBM support (deprecated). - - - - - - --enable-dba=shared - - - - Build DBA as a shared module. - - - - - - --with-gdbm[=DIR] - - - - Include GDBM support. - - - - - - --with-ndbm[=DIR] - - - - Include NDBM support. - - - - - - --with-db2[=DIR] - - - - Include Berkeley DB2 support. - - - - - - --with-db3[=DIR] - - - - Include Berkeley DB3 support. - - - - - - --with-dbm[=DIR] - - - - Include DBM support. - - - - - - --with-cdb[=DIR] - - - - Include CDB support. - - - - - - --enable-dbase - - - - Enable the bundled dbase library. - - - - - - --with-dbplus - - - - Include dbplus support. - - - - - - --enable-dbx - - - - Enable dbx. - - - - - - --with-dom[=DIR] - - - - Include DOM support (requires libxml >= 2.4.2). DIR is the libxml install - directory, defaults to /usr. - - - - - - --enable-exif - - - - Enable exif support. - - - - - - --with-fbsql[=DIR] - - - - Include FrontBase support. DIR is the FrontBase base directory. - - - - - - --with-fdftk[=DIR] - - - - Include fdftk support. - - - - - - --enable-filepro - - - - Enable the bundled read-only filePro support. - - - - - - --with-fribidi[=DIR] - - - - Include fribidi support (requires FriBidi >=0.1.12). DIR is the fribidi - installation directory - default /usr/local/. - - - - - - --enable-ftp - - - - Enable FTP support. - - - - - - --with-gd[=DIR] - - - - Include GD support (DIR is GD's install dir). Set DIR to shared to build as - a dl, or shared,DIR to build as a dl and still specify DIR. - - - - - - --enable-gd-native-ttf - - - - GD: Enable TrueType string function in gd. - - - - - - --with-jpeg-dir=DIR - - - - GD: Set the path to libjpeg install prefix. - - - - - - --with-png-dir=DIR - - - - GD: Set the path to libpng install prefix. - - - - - - --with-xpm-dir=DIR - - - - GD: Set the path to libXpm install prefix. - - - - - - --with-freetype-dir=DIR - - - - GD: Set the path to freetype2 install prefix. - - - - - - --with-ttf[=DIR] - - - - GD: Include FreeType 1.x support. - - - - - - --with-t1lib[=DIR] - - - - GD: Include T1lib support. - - - - - - --with-gettext[=DIR] - - - - Include GNU gettext support. DIR is the gettext install directory, - defaults to /usr/local. - - - - - - --with-gmp - - - - Include gmp support. - - - - - - --with-hyperwave - - - - Include Hyperwave support. - - - - - - --with-icap[=DIR] - - - - Include ICAP support. - - - - - - --with-iconv[=DIR] - - - - Include iconv support. - - - - - - --with-imap[=DIR] - - - - Include IMAP support. DIR is the c-client install prefix. - - - - - - --with-kerberos[=DIR] - - - - IMAP: Include Kerberos support. DIR is the Kerberos install dir. - - - - - - --with-imap-ssl[=DIR] - - - - IMAP: Include SSL support. DIR is the OpenSSL install dir. - - - - - - --with-informix[=DIR] - - - - Include Informix support. DIR is the Informix base install directory, - defaults to nothing. - - - - - - --with-ingres[=DIR] - - - - Include Ingres II support. DIR is the Ingres base directory (default /II/ingres). - - - - - - --with-interbase[=DIR] - - - - Include InterBase support. DIR is the InterBase base install directory, - defaults to /usr/interbase. - - - - - - --with-ircg-config - - - - Path to the ircg-config script. - - - - - - --with-ircg - - - - Include ircg support. - - - - - - --with-java[=DIR] - - - - Include Java support. DIR is the base install directory for the JDK. - This extension can only be built as a shared dl. - - - - - - --with-ldap[=DIR] - - - - Include LDAP support. DIR is the LDAP base install directory. - - - - - - --enable-mailparse - - - - Enable mailparse support. - - - - - - --enable-mbstring - - - - Enable multibyte string support. - - - - - - --enable-mbstr-enc-trans - - - - Enable japanese encoding translation. - - - - - - --with-mcal[=DIR] - - - - Include MCAL support. - - - - - - --with-mcrypt[=DIR] - - - - Include mcrypt support. DIR is the mcrypt install directory. - - - - - - --with-mhash[=DIR] - - - - Include mhash support. DIR is the mhash install directory. - - - - - - --with-ming[=DIR] - - - - Include ming support. - - - - - - --with-mnogosearch[=DIR] - - - - Include mnoGoSearch support. DIR is the mnoGoSearch base install directory, - defaults to /usr/local/mnogosearch. - - - - - - --with-msql[=DIR] - - - - Include mSQL support. DIR is the mSQL base install directory, defaults - to /usr/local/Hughes. - - - - - - --with-muscat[=DIR] - - - - Include muscat support. - - - - - - --with-mysql[=DIR] - - - - Include MySQL support. DIR is the MySQL base directory. If unspecified, - the bundled MySQL library will be used. - - - - - - --with-ncurses - - - - Include ncurses support. - - - - - - --with-oci8[=DIR] - - - - Include Oracle-oci8 support. Default DIR is ORACLE_HOME. - - - - - - --with-adabas[=DIR] - - - - Include Adabas D support. DIR is the Adabas base install directory, - defaults to /usr/local. - - - - - - --with-sapdb[=DIR] - - - - Include SAP DB support. DIR is SAP DB base install directory, - defaults to /usr/local. - - - - - - --with-solid[=DIR] - - - - Include Solid support. DIR is the Solid base install directory, - defaults to /usr/local/solid. - - - - - - --with-ibm-db2[=DIR] - - - - Include IBM DB2 support. DIR is the DB2 base install directory, - defaults to /home/db2inst1/sqllib. - - - - - - --with-empress[=DIR] - - - - Include Empress support. DIR is the Empress base install directory, - defaults to $EMPRESSPATH. From PHP4, this option only supports - Empress Version 8.60 and above. - - - - - - --with-empress-bcs[=DIR] - - - - Include Empress Local Access support. DIR is the Empress base - install directory, defaults to $EMPRESSPATH. From PHP4, - this option only supports Empress Version 8.60 and above. - - - - - - --with-velocis[=DIR] - - - - Include Velocis support. DIR is the Velocis base install directory, - defaults to /usr/local/velocis. - - - - - - --with-custom-odbc[=DIR] - - - - Include a user defined ODBC support. The DIR is ODBC install base directory, - which defaults to /usr/local. Make sure to define CUSTOM_ODBC_LIBS and have - some odbc.h in your include dirs. E.g., you should define following for Sybase SQL - Anywhere 5.5.00 on QNX, prior to run configure script: - - - - - - - --with-iodbc[=DIR] - - - - Include iODBC support. DIR is the iODBC base install directory, - defaults to /usr/local. - - - - - - --with-esoob[=DIR] - - - - Include Easysoft OOB support. DIR is the OOB base install directory, - defaults to /usr/local/easysoft/oob/client. - - - - - - --with-unixODBC[=DIR] - - - - Include unixODBC support. DIR is the unixODBC base install directory, - defaults to /usr/local. - - - - - - --with-openlink[=DIR] - - - - Include OpenLink ODBC support. DIR is the OpenLink base install directory, - defaults to /usr/local. This is the same as iODBC. - - - - - - --with-dbmaker[=DIR] - - - - Include DBMaker support. DIR is the DBMaker base install directory, - defaults to where the latest version of DBMaker is installed - (such as /home/dbmaker/3.6). - - - - - - --with-oracle[=DIR] - - - - Include Oracle-oci7 support. Default DIR is ORACLE_HOME. - - - - - - --with-ovrimos[=DIR] - - - - Include Ovrimos SQL Server support. DIR is the Ovrimos' libsqlcli install directory. - - - - - - --enable-pcntl - - - - Enable experimental pcntl support (CGI ONLY!) - - - - - - --without-pcre-regex - - - - Do not include Perl Compatible Regular Expressions support. - Use --with-pcre-regex=DIR to specify DIR where PCRE's - include and library files are located, if not using bundled library. - - - - - - --with-pdflib[=DIR] - - - - Include PDFlib support. DIR is the pdflib base install directory, - defaults to /usr/local. Set DIR to shared to build as dl, or - shared,DIR to build as dl and still specify DIR. - - - - - - --with-jpeg-dir[=DIR] - - - - PDFLIB: define libjpeg install directory. - - - - - - --with-png-dir[=DIR] - - - - PDFLIB: define libpng install directory. - - - - - - --with-tiff-dir[=DIR] - - - - PDFLIB: define libtiff install directory. - - - - - - --with-pfpro[=DIR] - - - - Include Verisign Payflow Pro support. - - - - - - --with-pgsql[=DIR] - - - - Include PostgreSQL support. DIR is the PostgreSQL base install directory, - defaults to /usr/local/pgsql. Set DIR to shared to build as a dl, or - shared,DIR to build as a dl and still specify DIR. - - - - - - --disable-posix - - - - Disable POSIX-like functions. - - - - - - --with-pspell[=DIR] - - - - Include PSPELL support. - - - - - - --with-qtdom - - - - Include QtDOM support (requires Qt >= 2.2.0). - - - - - - --with-libedit[=DIR] - - - - Include libedit readline replacement. - - - - - - --with-readline[=DIR] - - - - Include readline support. DIR is the readline install directory. - - - - - - --with-recode[=DIR] - - - - Include recode support. DIR is the recode install directory. - - - - - - --with-satellite[=DIR] - - - - Enable CORBA support via Satellite (EXPERIMENTIAL) DIR is the base - directory for ORBit. - - - - - - --with-mm[=DIR] - - - - Include mm support for session storage. - - - - - - --enable-trans-sid - - - - Enable transparent session id propagation. - - - - - - --disable-session - - - - Disable session support. - - - - - - --enable-shmop - - - - Enable shmop support. - - - - - - --with-snmp[=DIR] - - - - Include SNMP support. DIR is the SNMP base install directory, defaults to - searching through a number of common locations for the snmp install. Set DIR - to shared to build as a dl, or shared,DIR to build as a dl and still specify DIR. - - - - - - --enable-ucd-snmp-hack - - - - Enable UCD SNMP hack. - - - - - - --enable-sockets - - - - Enable sockets support. - - - - - - --with-regex=TYPE - - - - regex library type: system, apache, php. - - - - - - --with-system-regex - - - - Use system regex library (deprecated). - - - - - - --with-swf[=DIR] - - - - Include swf support. - - - - - - --with-sybase[=DIR] - - - - Include Sybase-DB support. DIR is the Sybase home directory, - defaults to /home/sybase. - - - - - - --with-sybase-ct[=DIR] - - - - Include Sybase-CT support. DIR is the Sybase home directory. - Defaults to /home/sybase. - - - - - - --enable-sysvsem - - - - Enable System V semaphore support. - - - - - - --enable-sysvshm - - - - Enable the System V shared memory support. - - - - - - --with-vpopmail[=DIR] - - - - Include vpopmail support. - - - - - - --enable-wddx - - - - Enable WDDX support. - - - - - - --disable-xml - - - - Disable XML support using bundled expat lib. - - - - - - --with-expat-dir=DIR - - - - XML: external libexpat install dir. - - - - - - --with-xmlrpc[=DIR] - - - - Include XMLRPC-EPI support. - - - - - - --with-tsrm-pthreads - - - - Use POSIX threads (default). - - - - - - --enable-shared[=PKGS] - - - - Build shared libraries [default=yes]. - - - - - - --enable-static[=PKGS] - - - - Build static libraries [default=yes]. - - - - - - --enable-fast-install[=PKGS] - - - - Optimize for fast installation [default=yes]. - - - - - - --with-gnu-ld - - - - Assume the C compiler uses GNU ld [default=no]. - - - - - - --disable-libtool-lock - - - - Avoid locking (might break parallel builds). - - - - - - --with-pic - - - - Try to use only PIC/non-PIC objects [default=use both]. - - - - - - --with-yaz[=DIR] - - - - Include YAZ support (ANSI/NISO Z39.50). - DIR is the YAZ bin install directory. - - - - - - --enable-memory-limit - - - - Compile with memory limit support. - - - - - - --disable-url-fopen-wrapper - - - - Disable the URL-aware fopen wrapper that allows - accessing files via http or ftp. - - - - - - --enable-versioning - - - - Export only required symbols. - See INSTALL for more information. - - - - - - - Configure Options in PHP 3 - - - These options are only valid in PHP 3. They will not work in - PHP 4. - - - - - - - --disable-bcmath - - - - Compile without bc style precision math functions. - - - - - - --with-imsp[=DIR] - - - - Include IMSp support (DIR is IMSP's include dir and libimsp.a dir). - - - - - - --with-ftp - - - - Include FTP support. - - - - - - --without-gd - - - - Disable GD support. - - - - - - --with-imagick - - - - Include ImageMagick support. DIR is the install directory, and if left out, PHP will - try to find it on its own. [experimental]. - - - - - - --with-mck[=DIR] - - - - Include Cybercash MCK support. DIR is the cybercash - mck build directory, defaults to - /usr/src/mck-3.2.0.3-linux for help look in - extra/cyberlib. - - - - - - --disable-overload - - - - Disable user-space object overloading support. - - - - - - --enable-yp - - - - Include YP support. - - - - - - --with-zip - - - - Include ZIP support (requires zziplib >= 0.10.6). - - - - - - --with-mod-dav=DIR - - - - Include DAV support through Apache's mod_dav, - DIR is mod_dav's installation directory (Apache - module version only!) - - - - - - --disable-unified-odbc - - - - Disable unified ODBC support. Only applicable if - iODBC, Adabas, Solid, Velocis or a custom ODBC - interface is enabled. - - - - - - --enable-debugger - - - - Compile with remote debugging functions. - - - - - - --enable-versioning - - - - Take advantage of versioning and scoping - provided by Solaris 2.x and Linux. - - - - - - - - - - Installation on Windows systems - - This section applies to Windows 95/98/Me and - Windows NT/2000/XP. Do not expect PHP to work on - 16 bit platforms such as Windows 3.1. Sometimes - we refer to the supported Windows platforms as Win32. - - - There are two main ways to install PHP for Windows: either - manually - or by using the InstallShield - installer. - - - If you have Microsoft Visual Studio, you can also - build - PHP from the original source code. - - - Once you have PHP installed on your Windows system, you may also - want to load various extensions - for added functionality. - - - - Windows InstallShield - - - The Windows PHP installer available from the downloads page at - &url.php;, this installs the CGI version - of PHP and, for IIS, PWS, and Xitami, configures the web server as - well. Also note, that while the InstallShield installer is an - easy way to make PHP work, it is restricted in many aspects, as - automatic setup of extensions for example is not supported. - - - - Install your selected HTTP server on your system - and make sure that it works. - - - - Run the executable installer and follow the instructions provided by - the installation wizard. Two types of installation are supported - - standard, which provides sensible defaults for all the settings it - can, and advanced, which asks questions as it goes along. - - - - The installation wizard gathers enough information to set up the - php.ini file and configure the web server to - use PHP. For IIS and also PWS on NT Workstation, a list of all the - nodes on the server with script map settings is displayed, and you - can choose those nodes to which you wish to add the PHP script - mappings. - - - - Once the installation has completed the installer will inform you - if you need to restart your system, restart the server, or just - start using PHP. - - - - - Be aware, that this setup of PHP is not secure. If you would - like to have a secure PHP setup, you'd better go on the manual - way, and set every option carefully. This automatically working - setup gives you an instantly working PHP installation, but it is - not meant to be used on online servers. - - - - - - - Manual Installation Steps - - This install guide will help you manually install and configure - PHP on your Windows webserver. You need to download the - zip binary distribution from the downloads page at - &url.php;. The original version - of this guide was compiled by &link.bob;, and can be found at &url.win32install;. - - - This guide provides manual installation support for: - - - - Personal Web Server 3 and 4 or newer - - - - - Internet Information Server 3 and 4 or newer - - - - - Apache 1.3.x - - - - - OmniHTTPd 2.0b1 and up - - - - - Oreilly Website Pro - - - - - Xitami - - - - - Netscape Enterprise Server, iPlanet - - - - - - PHP 4 for Windows comes in two flavours - a CGI executable (php.exe), - and several SAPI modules (for example: php4isapi.dll). The latter form - is new to PHP 4, and provides significantly improved performance and - some new functionality. - - - - The SAPI modules have been significantly improved in the 4.1 release, - however, you may find that you encounter possible server errors or - other server modules such as ASP failing, in older systems. - - - - If you choose one of the SAPI modules and use Windows 95, be sure - to download the DCOM update from the Microsoft DCOM pages. For the - ISAPI module, an ISAPI 4.0 compliant Web server is required - (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is - NOT supported. You should download and - install the Windows NT 4.0 Option Pack with IIS 4.0 if you - want native PHP support. - - - The following steps should be performed on all installations - before the server specific instructions. - - - - Extract the distribution file to a directory of your choice. - c:\php\ is a good start. - - - - - You need to ensure that the dlls which PHP uses can be found. - The precise DLLs involved depend on which web server you use - and whether you want to run PHP as a CGI or as a server module. - php4ts.dll is always used. If you are - using a server module (e.g. ISAPI or Apache) then you will - need the relevent DLL from the sapi - folder. If you are using any PHP extension DLLs then you - will need those as well. To make sure that the DLLs can be - found, you can either copy them to the system directory - (e.g. winnt/system32 or - windows/system) or you can make sure - that they live in the same directory as the main PHP - executable or DLL your web server will use (e.g. php.exe, - php4apache.dll). - - - The PHP binary, the SAPI modules, and some extensions rely on - external DLLs for execution. Make sure that these DLLs in the - distribution exist in a directory that is in the Windows PATH. - The best bet to do it is to copy the files below into your - system directory, which is typically: - - c:\windows\system for Windows 9x/Me - c:\winnt\system32 for Windows NT/2000/XP - - The files to copy are: - - - 'php4ts.dll', if it already exists there, overwrite it - - - The files in your distribution's 'dlls' directory. - If you have them already installed on your system, overwrite them - only if something doesn't work correctly (Before overwriting them, - it is a good idea to make a backup of them, or move them to - another folder - just in case something goes wrong). - - - - - Download the latest version of the Microsoft Data Access Components - (MDAC) for your platform, especially if you use Microsoft Windows - 9x/NT4. MDAC is available at &url.mdac;. - - - - - Copy your choosen ini file (see below) to your - '%WINDOWS%' directory on Windows 9x/Me or to your - '%SYSTEMROOT%' directory under Windows NT/2000/XP - and rename it to php.ini. Your - '%WINDOWS%' or '%SYSTEMROOT%' directory is - typically: - - c:\windows for Windows 9x/Me - c:\winnt or c:\winnt40 for NT/2000/XP servers - - - - There are two ini files distributed in the zip file, - php.ini-dist and - php.ini-optimized. We advise - you to use php.ini-optimized, - because we optimized the default settings in this - file for performance, and security. The best is to - study all the ini - settings and set every element manually yourself. - If you would like to achive the best security, then this - is the way for you, although PHP works fine with these - default ini files. - - - - - Edit your new 'php.ini' file: - - - - You will need to change the 'extension_dir' setting to - point to your php-install-dir, or where you have placed - your 'php_*.dll' files. ex: c:\php\extensions - - - - - If you are using OmniHTTPd, do not follow the next step. - Set the 'doc_root' to point to your webservers - document_root. For example: c:\apache\htdocs or c:\webroot - - - - - Choose which extensions you would like to load when PHP - starts. See the section about - Windows - extensions, about how to set up one, and what - is already built in. Note that on a new installation - it is advisable to first get PHP working and tested - without any extensions before enabling them in - php.ini. - - - - - On PWS and IIS, you can set the browscap.ini - to point to: 'c:\windows\system\inetsrv\browscap.ini' on - Windows 9x/Me and 'c:\winnt\system32\inetsrv\browscap.ini' - on NT/2000/XP Server. - - - - - Note that the mibs directory supplied - with the Windows distribution contains support files for - SNMP. This directory should be moved to - DRIVE:\usr\mibs (DRIVE - being the drive where PHP is installed.) - - - - - - - - - - - Building from source - - Before getting started, it is worthwhile answering the question: - "Why is building on Windows so hard?" Two reasons come to mind: - - - - Windows does not (yet) enjoy a large community of developers - who are willing to freely share their source. As a direct - result, the necessary investment in infrastructure required - to support such development hasn't been made. By and large, - what is available has been made possible by the porting of - necessary utilities from Unix. Don't be surprised if some of - this heritage shows through from time to time. - - - Pretty much all of the instructions that follow are of the - "set and forget" variety. So sit back and try follow the - instructions below as faithfully as you can. - - - - - Preparations - - Before you get started, you have a lot to download... - - - - For starters, get the Cygwin toolkit from the closest cygwin - mirror site. This will provide you most of the popular GNU - utilities used by the build process. - - - Download the rest of the build tools you will need from the PHP - site at http://www.php.net/extra/win32build.zip. - - - Get the source code for the DNS name resolver used by PHP - at http://www.php.net/extra/bindlib_w32.zip. This - is a replacement for the resolv.lib - library included in win32build.zip. - - - If you don't already have an unzip utility, you will - need one. A free version is available from InfoZip. - - - - Finally, you are going to need the source to PHP 4 itself. - You can get the latest development version using anonymous CVS. If you get - a snapshot or a source tarball, you - not only will have to untar and ungzip it, but you will have to - convert the bare linefeeds to crlf's in the *.dsp - and *.dsw files before Microsoft Visual C++ - will have anything to do with them. - - - - Place the Zend and - TSRM directories inside the - php4 directory in order for the projects - to be found during the build process. - - - - - Putting it all together - - - Follow the instructions for installing the unzip utility of - your choosing. - - - - Execute setup.exe and follow the installation - instructions. If you choose to install to a path other than - c:\cygnus, let the build process know by setting - the Cygwin environment variable. On Windows 95/98 setting - an environment variable can be done by placing a line in - your autoexec.bat. On Windows NT, go to My Computer => - Control Panel => System and select the environment tab. - - - - Make a temporary directory for Cygwin to use, otherwise many - commands (particularly bison) will fail. On Windows 95/98, - mkdir C:\TMP. For Windows NT, - mkdir %SystemDrive%\tmp. - - - - - Make a directory and unzip win32build.zip into it. - - - - Launch Microsoft Visual C++, and from the menu select - Tools => Options. In the dialog, select the - directories tab. Sequentially change the dropdown - to Executables, Includes, and Library files, - and ensure that cygwin\bin, - win32build\include, and - win32build\lib are in each list, - respectively. (To add an entry, select a blank line - at the end of the list and begin typing). Typical entries - will look like this: - - - - c:\cygnus\bin - - - c:\php-win32build\include - - - c:\php-win32build\lib - - - - Press OK, and exit out of Visual C++. - - - - - Make another directory and unzip bindlib_w32.zip - into it. Decide whether you want to have debug symbols available - (bindlib - Win32 Debug) or not (bindlib - Win32 Release). - Build the appropriate configuration: - - - - For GUI users, launch VC++, and then select File => Open - Workspace and select bindlib. Then select Build=>Set - Active Configuration and select the desired configuration. - Finally select Build=>Rebuild All. - - - - For command line users, make sure that you either have - the C++ environment variables registered, or have run - vcvars.bat, and then execute one of the - following: - - - - - msdev bindlib.dsp /MAKE "bindlib - Win32 Debug" - - - - - msdev bindlib.dsp /MAKE "bindlib - Win32 Release" - - - - - - At this point, you should have a usable - resolv.lib in either your - Debug or Release - subdirectories. Copy this file into your - win32build\lib directory over the - file by the same name found in there. - - - - - - - - Compiling - - The best way to get started is to build the standalone/CGI version. - - - - For GUI users, launch VC++, and then select File => Open - Workspace and select php4ts. Then select Build=>Set Active - Configuration and select the desired configuration. Finally - select Build=>Rebuild All. - - - - For command line users, make sure that you either have - the C++ environment variables registered, or have run - vcvars.bat, and then execute one of the - following: - - - - msdev php4ts.dsp /MAKE "php4ts - Win32 Debug_TS" - - - msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS" - - - At this point, you should have a usable - php.exe in either - your Debug_TS or - Release_TS subdirectories. - - - - - - Repeat the above steps with php4isapi.dsp - (which can be found in sapi\isapi) in - order to build the code necessary for integrating PHP with - Microsoft IIS. - - - - - - Installation of Windows extensions - - After installing PHP and a webserver on Windows, you will - probably want to install some extensions for added functionality. - The following table describes some of the extensions available. You - can choose which extensions you would like to load when PHP starts - by uncommenting the: 'extension=php_*.dll' lines in - php.ini. You can also load a module dynamically - in your script using dl. - - - The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and - 'php3_' in PHP 3). This prevents confusion between PHP extensions - and their supporting libraries. - - - - In PHP 4.0.6 BCMath, Calendar, COM, FTP, MySQL, ODBC, PCRE, - Session, WDDX and XML support is built in. - You don't need to load any additional extensions in order to - use these functions. See your distributions - README.txt or install.txt - for a list of built in modules. - - - - - - Some of these extensions need extra dlls to work. Couple of them can be - found in the distribution package, in the 'dlls' folder but - some, for example Oracle (php_oci8.dll) require dlls which are - not bundled with the distribution package. - - - - Copy the bundled dlls from 'dlls' folder to your Windows - PATH, safe places are: - - c:\windows\system for Windows 9x/Me - c:\winnt\system32 for Windows NT/2000/XP - - If you have them already installed on your system, overwrite them - only if something doesn't work correctly (Before overwriting them, - it is a good idea to make a backup of them, or move them to - another folder - just in case something goes wrong). - - - - - - PHP Extensions - - - - Extension - Description - Notes - - - - - - php_bz2.dll - bzip2 compression functions - None - - - php_calendar.dll - Calendar conversion functions - Built in since PHP 4.0.3 - - - php_cpdf.dll - ClibPDF functions - None - - - php3_crypt.dll - Crypt functions - unknown - - - php_ctype.dll - ctype family functions - None - - - php_curl.dll - CURL, Client URL library functions - Requires: libeay32.dll, ssleay32.dll (bundled) - - - php_cybercash.dll - Cybercash payment functions - None - - - php_db.dll - DBM functions - Deprecated. Use DBA instead (php_dba.dll) - - - php_dba.dll - DBA: DataBase (dbm-style) Abstraction layer functions - None - - - php_dbase.dll - dBase functions - None - - - php3_dbm.dll - Berkeley DB2 library - unknown - - - php_domxml.dll - DOM XML functions - Requires: libxml2.dll (bundled) - - - php_dotnet.dll - .NET functions - None - - - php_exif.dll - Read EXIF headers from JPEG - None - - - php_fbsql.dll - FrontBase functions - None - - - php_fdf.dll - FDF: Forms Data Format functions. - Requires: fdftk.dll (bundled) - - - php_filepro.dll - filePro functions - Read-only access - - - php_ftp.dll - FTP functions - Built-in since PHP 4.0.3 - - - php_gd.dll - GD library image functions - None - - - php_gettext.dll - Gettext functions - Requires: gnu_gettext.dll (bundled) - - - php_hyperwave.dll - HyperWave functions - None - - - php_iconv.dll - ICONV characterset conversion - Requires: iconv-1.3.dll (bundled) - - - php_ifx.dll - Informix functions - Requires: Informix libraries - - - php_iisfunc.dll - IIS management functions - None - - - php_imap.dll - IMAP POP3 and NNTP functions - PHP 3: php3_imap4r1.dll - - - php_ingres.dll - Ingres II functions - Requires: Ingres II libraries - - - php_interbase.dll - InterBase functions - Requires: gds32.dll (bundled) - - - php_java.dll - Java extension - Requires: jvm.dll (bundled) - - - php_ldap.dll - LDAP functions - Requires: libsasl.dll (bundled) - - - php_mhash.dll - Mhash Functions - None - - - php_ming.dll - Ming functions for Flash - None - - - php_msql.dll - mSQL functions - Requires: msql.dll (bundled) - - - php3_msql1.dll - mSQL 1 client - unknown - - - php3_msql2.dll - mSQL 2 client - unknown - - - php_mssql.dll - MSSQL functions - Requires: ntwdblib.dll (bundled) - - - php3_mysql.dll - MySQL functions - Built-in in PHP 4 - - - php3_nsmail.dll - Netscape mail functions - unknown - - - php3_oci73.dll - Oracle functions - unknown - - - php_oci8.dll - Oracle 8 functions - Requires: Oracle 8 client libraries - - - php_openssl.dll - OpenSSL functions - Requires: libeay32.dll (bundled) - - - php_oracle.dll - Oracle functions - Requires: Oracle 7 client libraries - - - php_pdf.dll - PDF functions - None - - - php_pgsql.dll - PostgreSQL functions - None - - - php_printer.dll - Printer functions - None - - - php_sablot.dll - XSLT functions - Requires: sablot.dll (bundled) - - - php_snmp.dll - SNMP get and walk functions - NT only! - - - php_sybase_ct.dll - Sybase functions - Requires: Sybase client libraries - - - php_yaz.dll - YAZ functions - None - - - php_zlib.dll - ZLib compression functions - None - - - -
-
-
-
- - - Servers-Apache - - This section contains notes and hints specific to Apache installs - of PHP, both for Unix and - Windows versions. - - - Details of installing PHP with Apache on Unix - - You can select arguments to add to the - configure on line 8 below from the Complete list of configure - options. - - - - - Installation Instructions (Apache Module Version) - - - - - - - - Depending on your Apache install and Unix variant, there are many - possible ways to stop and restart the server. Below are some typical - lines used in restarting the server, for different apache/unix - installations. You should replace /path/to/ with - the path to these applications on your systems. - - - - - - The locations of the apachectl and http(s)dctl binaries often - vary. If your system has locate or - whereis or which commands, - these can assist you in finding your server contrl programs. - - - - Different examples of compiling PHP for apache are as follows: - - - - - - - - This will create a libphp4.so shared - library that is loaded into Apache using a LoadModule line in - Apache's httpd.conf file. The PostgreSQL - support is embedded into this libphp4.so - library. - - - - - - - - - - This will again create a libphp4.so shared - library for Apache, but it will also create a - pgsql.so shared library that is loaded into - PHP either by using the extension directive in - php.ini file or by loading it explicitly in - a script using the dl function. - - - - - - - - - - This will create a libmodphp4.a library, a - mod_php4.c and some accompanying files and - copy this into the src/modules/php4 directory - in the Apache source tree. Then you compile Apache using - --activate-module=src/modules/php4/libphp4.a - and the Apache build system will create - libphp4.a and link it statically into the - httpd binary. The PostgreSQL support is - included directly into this httpd binary, - so the final result here is a single httpd - binary that includes all of Apache and all of PHP. - - - - - - - - - - Same as before, except instead of including PostgreSQL support - directly into the final httpd you will get - a pgsql.so shared library that you can load - into PHP from either the php.ini file or - directly using dl. - - - When choosing to build PHP in different ways, you should consider - the advantages and drawbacks of each method. Building as a shared - object will mean that you can compile apache separately, and don't - have to recompile everything as you add to, or change, PHP. - Building PHP into apache (static method) means that PHP will - load and run faster. For more information, see the Apache - webpage on DSO support. - - - - - - Installing PHP on Windows with Apache 1.3.x - - - There are two ways to set up PHP to work with Apache 1.3.x - on Windows. One is to use the CGI binary (php.exe), - the other is to use the Apache module dll. In either case - you need to stop the Apache server, and edit your - srm.conf or httpd.conf - to configure Apache to work with PHP. - - - It is worth noting here that now the sapi module has been - made more stable under windows, we recommend it's use above - the CGI binary, since it is more transparent and secure. - - - Although there can be a few variations of configuring PHP - under Apache, these are simple enough to be used by the - newcomer. Please consult the Apache Docs for further - configuration directives. - - - - If you unziped the PHP package to c:\php\ as described - in the Manual - Installation Steps section, you need to insert - these lines to your Apache configuration file to set - up the CGI binary: - - - - - ScriptAlias /php/ "c:/php/" - - - - - - - AddType application/x-httpd-php .php .phtml - - - - - - - Action application/x-httpd-php "/php/php.exe" - - - - - Note that the second line in the list above can be found - in the actual versions of httpd.conf, - but it is commented out. Remember also to substitute the - c:/php/ for your actual path to PHP. - - - - - By using the CGI setup, your server is open - to several possible attacks. Please read - our CGI security - section to learn how to defend yourself from attacks. - - - - - If you would like to use PHP as a module in Apache, - be sure to move php4ts.dll to - the windows/system (for Windows 9x/Me) or winnt/system32 - (for Windows NT/2000/XP) directory, overwriting any older file. - Then you should add the following two lines to you Apache - conf file: - - - - - LoadModule php4_module c:/php/sapi/php4apache.dll - - - - - - - AddType application/x-httpd-php .php .phtml - - - - - - - - After changing the configuration - file, remember to restart the server, for example, - NET STOP APACHE followed by - NET START APACHE, if you run Apache - as a Windows Service, or use your regular shortcuts. - - - - - You may find after using the windows installer for Apache - that you need to define the AddModule - directive for mod_php4.c in the - configuration file (httpd.conf). - This is done by adding AddModule mod_php4.c - to the AddModule list, near the beginning - of the configuration file. This is especially important if - the ClearModuleList directive is defined. - Failure to do this may mean PHP will not be registered as an - Apache module. - - - - - There are 2 ways you can use the source code highlighting feature, - however their ability to work depends on your installation. - If you have configured Apache to use PHP as an isapi module, then by - adding the following line to your configuration file you can use - this feature: AddType application/x-httpd-php-source .phps - - - - If you chose to configure Apache to use PHP as a CGI binary, you - will need to use the show_source function. To - do this simply create a PHP script file and add this code: - <?php show_source ("original_php_script.php"); ?>. - Substitute original_php_script.php with - the name of the file you wish to show the source of. - - - - - On Win-Apache all backslashes in a path statement such - as "c:\directory\file.ext", must be converted to - forward slashes, as "c:/directory/file.ext". - - - - - - - Servers-CGI/Commandline - - The default is to build PHP as a CGI program. This creates a - commandline interpreter, which can be used for CGI processing, or - for non-web-related PHP scripting. If you are running a web - server PHP has module support for, you should generally go for - that solution for performance reasons. However, the CGI version - enables Apache users to run different PHP-enabled pages under - different user-ids. Please make sure you read through the Security chapter if you are going to - run PHP as a CGI. - - - - Testing - - If you have built PHP as a CGI program, you may test your build - by typing make test. It is always a good idea - to test your build. This way you may catch a problem with PHP on - your platform early instead of having to struggle with it later. - - - - - Benchmarking - - If you have built PHP 3 as a CGI program, you may benchmark your - build by typing make bench. Note that if - Safe Mode - is on by default, the benchmark may not be able to finish if - it takes longer then the 30 seconds allowed. This is because the - set_time_limit can not be used in safe - mode. Use the max_execution_time - configuration setting to control this time for your own - scripts. make bench ignores the configuration file. - - - - make bench is only available for PHP 3. - - - - - - - Servers-fhttpd - - To build PHP as an fhttpd module, answer "yes" to "Build as an - fhttpd module?" (the - --with-fhttpd=DIR - option to configure) and specify the fhttpd source base - directory. The default directory is /usr/local/src/fhttpd. If you are - running fhttpd, building PHP as a module will give better - performance, more control and remote execution capability. - - - - - Servers-Caudium - - PHP 4 can be build as a Pike module for the Caudium webserver. Note - that this is not supported with PHP 3. Follow the simple - instructions below to install PHP 4 for Caudium. - - - Caudium Installation Instructions - -PHP4.so. Also make sure that - caudium/server/lib/[pike-version]/PHP4.so - is present. -10. Configure the PHP Script Support module if needed. -]]> - - - - You can of course compile your Caudium module with support for the - various extensions available in PHP 4. See the - complete list of configure - options for an exhaustive rundown. - - - - When compiling PHP 4 with MySQL support you must make sure that - the normal MySQL client code is used. Otherwise there might be - conflicts if your Pike already has MySQL support. You do this by - specifying a MySQL install directory the --with-mysql - option. - - - - - - Servers-IIS/PWS - - This section contains notes and hints specific to IIS (Microsoft - Internet Information Server). Installing PHP for - PWS/IIS 3, - PWS 4 or newer and - IIS 4 or newer versions. - - - Windows and PWS/IIS 3 - - - The recommended method for configuring these servers is to use - the REG file included with the distribution - (pws-php4cgi.reg). You may want to edit this file and make sure - the extensions and PHP install directories match your - configuration. Or you can follow the steps below to do it - manually. - - - - These steps involve working directly with the Windows - registry. One error here can leave your system in an unstable - state. We highly recommend that you back up your registry - first. The PHP Development team will not be held responsible if - you damage your registry. - - - - - - - - Run Regedit. - - - - - Navigate to: HKEY_LOCAL_MACHINE /System - /CurrentControlSet /Services /W3Svc /Parameters - /ScriptMap. - - - - - On the edit menu select: New->String Value. - - - - - Type in the extension you wish to use for your php - scripts. For example .php - - - - - Double click on the new string value and enter the path to - php.exe in the value data field. ex: - c:\php\php.exe. - - - - - Repeat these steps for each extension you wish to associate - with PHP scripts. - - - - - - The following steps do not affect the web server installation - and only apply if you want your php scripts to be executed when - they are run from the command line (ex. run - c:\myscripts\test.php) or by double clicking - on them in a directory viewer window. You may wish to skip these - steps as you might prefer the PHP files to load into a text - editor when you double click on them. - - - - - - Navigate to: HKEY_CLASSES_ROOT - - - - - On the edit menu select: New->Key. - - - - - Name the key to the extension you setup in the previous - section. ex: .php - - - - - Highlight the new key and in the right side pane, double click - the "default value" and enter phpfile. - - - - - Repeat the last step for each extension you set up in the - previous section. - - - - - Now create another New->Key under - HKEY_CLASSES_ROOT and name it - phpfile. - - - - - Highlight the new key phpfile and in the - right side pane, double click the "default value" and enter - PHP Script. - - - - - Right click on the phpfile key and select - New->Key, name it Shell. - - - - - Right click on the Shell key and select - New->Key, name it open. - - - - - Right click on the open key and select - New->Key, name it - command. - - - - - Highlight the new key command and in the - right side pane, double click the "default value" and enter - the path to php.exe. ex: - c:\php\php.exe -q %1. (don't forget the - %1). - - - - - Exit Regedit. - - - - - If using PWS on Windows, reboot to reload the registry. - - - - - - PWS and IIS 3 users now have a fully operational system. IIS 3 - users can use a nifty tool - from Steven Genusa to configure their script maps. - - - - - - Windows and PWS 4 or newer - - - When installing PHP on Windows with PWS 4 or newer version, - you have two options. One to set up the PHP CGI binary, - the other is to use the ISAPI module dll. - - - - If you choose the CGI binary, do the following: - - - - Edit the enclosed pws-php4cgi.reg - file (look into the sapi dir) to reflect the location of - your php.exe. Forward slashes should be escaped, for example: - [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe" - - - - - In the PWS Manager, right click on a given directory you want - to add PHP support to, and select Properties. Check the 'Execute' - checkbox, and confirm. - - - - - - - If you choose the ISAPI module, do the following: - - - - Edit the enclosed pws-php4isapi.reg - file (look into the sapi dir) to reflect the location of - your php4isapi.dll. Forward slashes should be escaped, for example: - [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll" - - - - - In the PWS Manager, right click on a given directory you want to - add PHP support to, and select Properties. Check the 'Execute' - checkbox, and confirm. - - - - - - - - - Windows NT/2000/XP and IIS 4 or newer - - - To install PHP on an NT/2000/XP Server running IIS 4 or newer, - follow these instructions. You have two options to set up - PHP, using the CGI binary (php.exe) or with the ISAPI module. - - - - In either case, you need to start the Microsoft Management - Console (may appear as 'Internet Services Manager', either - in your Windows NT 4.0 Option Pack branch or the Control - Panel=>Administrative Tools under Windows 2000/XP). Then - right click on your Web server node (this will most probably - appear as 'Default Web Server'), and select 'Properties'. - - - - If you want to use the CGI binary, do the following: - - - - Under 'Home Directory', 'Virtual Directory', or - 'Directory', click on the 'Configuration' button, - and then enter the App Mappings tab. - - - - - Click Add, and in the Executable box, type: - c:\php\php.exe (assuming - that you have unziped PHP in c:\php\). - - - - - In the Extension box, type the file name extension you want - associated with PHP scripts. Leave 'Method exclusions' - blank, and check the Script engine checkbox. You may also - like to check the 'check that file exists' box - for a small - performance penalty, IIS (or PWS) will check that the script - file exists and sort out authentication before firing up php. - This means that you will get sensible 404 style error messages - instead of cgi errors complaing that php did not output any data. - - - You must start over from the previous step for each - extension you want associated with PHP scripts. - .php and .phtml - are common, although .php3 may be - required for legacy applications. - - - - - Set up the appropriate security. (This is done in Internet - Service Manager), and if your NT Server uses NTFS file system, - add execute rights for I_USR_ to the directory that contains - php.exe. - - - - - - - To use the ISAPI module, do the following: - - - - If you don't want to perform HTTP Authentication using PHP, - you can (and should) skip this step. Under ISAPI Filters, - add a new ISAPI filter. Use PHP as the filter name, and - supply a path to the php4isapi.dll. - - - - - Under 'Home Directory', click on the 'Configuration' button. - Add a new entry to the Application Mappings. Use the path - to the php4isapi.dll as the Executable, supply - .php as the extension, leave Method - exclusions blank, and check the Script engine checkbox. - - - - - Stop IIS completely (NET STOP iisadmin) - - - - - Start IIS again (NET START w3svc) - - - - - - - - - Servers-Netscape and iPlanet - - This section contains notes and hints specific to Netscape and iPlanet - installs of PHP, both for Sun Solaris - and Windows versions. - - - You can find more information about setting up PHP for - the Netscape Enterprise Server here: - &url.netscape.nsapi; - - - Installing PHP with Netscape on Sun Solaris - - To build PHP with NES or iPlanet web servers, enter the proper - install directory for the - --with-nsapi - = DIR option. The default - directory is usually /opt/netscape/suitespot/. - Please also read /php-xxx-version/sapi/nsapi/nsapi-readme.txt. - - - - Installation Example for Netscape Enterprise on Solaris - - - - - After performing the base install and reading the appropriate - readme file, you may need to performs some additional - configuration steps. - - - Firstly you may need to add some paths to the LD_LIBRARY_PATH - environment for Netscape to find all the shared libs. This can - best done in the start script for your Netscape server. - Windows users can probably skip this step. The start - script is often located in: - /path/to/server/https-servername/start - - - You may also need to edit the configuration files that are - located in:/path/to/server/https-servername/config/. - - - - - Configuration Example for Netscape Enterprise - - - - . - . - . - .#NOTE this next line should happen after all 'ObjectType' and before all 'AddLog' lines - Service fn="php4_execute" type="magnus-internal/x-httpd-php" - . - . - - - - - ObjectType fn="force-type" type="magnus-internal/x-httpd-php" - Service fn=php4_execute - - - - Authentication configuration - - PHP authentication cannot be used with any other authentication. ALL AUTHENTICATION IS - PASSED TO YOUR PHP SCRIPT. To configure PHP Authentication for the entire server, add - the following line: - - - AuthTrans fn=php4_auth_trans - . - . - . - . - - - To use PHP Authentication on a single directory, add the following: - - - AuthTrans fn=php4_auth_trans - -]]> - - - - If you are running Netscape Enterprise 4.x, then you should use the following: - - - Configuration Example for Netscape Enterprise 4.x - - - - - - - Installing PHP with Netscape on Windows - - To Install PHP as CGI (for Netscape Enterprise Server, - iPlanet, perhaps Fastrack), do the following: - - - - - Copy php4ts.dll to your systemroot - (the directory where you installed windows) - - - - - Make a file association from the command line. - Type the following two lines: - - - - - - - - In the Netscape Enterprise Administration Server create - a dummy shellcgi directory and remove it just after (this - step creates 5 important lines in obj.conf and allow the - web server to handle shellcgi scripts). - - - - - In the Netscape Enterprise Administration Server create - a new mime type (Category: type, - Content-Type: magnus-internal/shellcgi, File Suffix:php). - - - - - Do it for each web server instance you want php to run - - - - - More details about setting up - PHP as a CGI executable can be found here: - &url.netscape.cgi; - - - To Install PHP as NSAPI (for Netscape Enterprise Server, - iPlanet, perhaps Fastrack, do the following: - - - - - Copy php4ts.dll to your systemroot - (the directory where you installed windows) - - - - - Make a file association from the command line. - Type the following two lines: - - - - - - - - In the Netscape Enterprise Administration Server create - a new mime type (Category: type, - Content-Type: magnus-internal/x-httpd-php, File Suffix:php). - - - - - Stop your web service and edit obj.conf. - At the end of the Init section, place these two lines - (necessarily after mime type init!): - - - - - - - - In The < Object name="default" > - section, place this line necessarily after all 'ObjectType' - and before all 'AddLog' lines: - - - - - - - - At the end of the file, create a new object called - x-httpd-php, by inserting these lines: - - -ObjectType fn="force-type" type="magnus-internal/x-httpd-php" -Service fn=php4_execute - -]]> - - - - - - Restart your web service and apply changes - - - - - Do it for each web server instance you want PHP to run - - - - - More details about setting up - PHP as an NSAPI filter can be found here: - &url.netscape.nsapi; - - - - - - Servers-OmniHTTPd Server - - This section contains notes and hints specific to OmniHTTPd. - - - OmniHTTPd 2.0b1 and up for Windows - - - You need to complete the folowing steps to make PHP - work with OmniHTTPd. This is a CGI executable setup. - SAPI is supported by OmniHTTPd, but some tests showed, - that it is not so stable to use PHP as an ISAPI module - in OmniHTTPd. - - - - - - - Step 1: Install OmniHTTPd server. - - - - - Step 2: Right click on the blue OmniHTTPd icon in the system - tray and select Properties - - - - - Step 3: Click on Web Server Global Settings - - - - - Step 4: On the 'External' tab, enter: virtual = .php - | actual = c:\path-to-php-dir\php.exe, and use the Add - button. - - - - - Step 5: On the Mime tab, enter: - virtual = wwwserver/stdcgi | actual = .php, - and use the Add button. - - - - - Step 6: Click OK - - - - - - - Repeat steps 2 - 6 for each extension you want to associate with PHP. - - - - Some OmniHTTPd packages come with built in PHP support. - You can choose at setup time to do a custom setup, and - uncheck the PHP component. We recommend you to use the latest - PHP binaries. Some OmniHTTPd servers come with PHP 4 beta - distributions, so you should choose not to set up - the built in support, but install your own. If the server - is already on your machine, use the Replace button in Step - 4 and 5 to set the new, correct information. - - - - - - - Servers-Oreilly Website Pro - - This section contains notes and hints specific to Oreilly - Website Pro. - - - Oreilly Website Pro 2.5 and up for Windows - - - This list describes how to set up the PHP CGI binary - or the ISAPI module to work with Oreilly Website Pro - on Windows. - - - - - - - Edit the Server Properties and select the tab "Mapping". - - - - - From the List select "Associations" and enter the desired - extension (.php) and the path to the CGI exe - (ex. c:\php\php.exe) or the ISAPI DLL file - (ex. c:\php\sapi\php4isapi.dll). - - - - - Select "Content Types" add the same extension - (.php) and enter the content type. - If you choose the CGI executable file, enter - 'wwwserver/shellcgi', if you chosse the ISAPI module, - enter 'wwwserver/isapi' (both without quotes). - - - - - - - - - Servers-Xitami - - This section contains notes and hints specific to Xitami. - - - Xitami for Windows - - - This list describes how to set up the PHP CGI binary - to work with Xitami on Windows. - - - - - - - Make sure the webserver is running, and point - your browser to xitamis admin console - (usually http://127.0.0.1/admin), - and click on Configuration. - - - - - Navigate to the Filters, and put the - extension which PHP should parse (i.e. .php) - into the field File extensions (.xxx). - - - - - In Filter command or script put the path and name - of your php executable i.e. c:\php\php.exe. - - - - - Press the 'Save' icon. - - - - - Restart the server to reflect changes. - - - - - - - - - Servers-Other web servers - - PHP can be built to support a large number of web servers. Please - - see Server-related - options for a full list of server-related configure - options. The PHP CGI binaries are compatible with almost all - webservers supporting the CGI standard. - - - - - Problems? - - - Read the FAQ - - Some problems are more common than others. The most - common ones are listed in the PHP - FAQ, part of this manual. - - - - - Other problems - - - If you are still stuck, someone on the PHP installation mailing list may be - able to help you. You should check out the archive first, in case - someone already answered someone else who had the same problem as - you. The archives are available from the support page on &url.php;. To subscribe to the PHP installation - mailing list, send an empty mail to &email.php.install.subscribe;. - The mailing list address is &email.php.install;. - - - If you want to get help on the mailing list, please try to be - precise and give the necessary details about your environment - (which operating system, what PHP version, what web server, if - you are running PHP as CGI or a server module, etc.), and - preferably enough code to make others able to reproduce and test - your problem. - - - - - Bug reports - - If you think you have found a bug in PHP, please report it. The - PHP developers probably don't know about it, and unless you - report it, chances are it won't be fixed. You can report bugs - using the bug-tracking system at &url.php.bugs;. Please do not - send bug reports in mailing list or personal letters. The - bug system is also suitable to submit feature requests. - - - Read the How to report a bug - document before submitting any bug reports! - - - - + &chapters.install.hpux; + &chapters.install.linux; + &chapters.install.macosx; + &chapters.install.openbsd; + &chapters.install.solaris; + &chapters.install.unix; + &chapters.install.windows; + &chapters.install.commandline; + &chapters.install.apache; + &chapters.install.caudium; + &chapters.install.fhttpd; + &chapters.install.iis; + &chapters.install.netscape-enterprise; + &chapters.install.omnihttpd; + &chapters.install.oreilly; + &chapters.install.xitami; + &chapters.install.otherhttpd; + &chapters.install.problems; + &chapters.install.configure;