Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated INSTALL. Generated from the XML Docs.

  • Loading branch information...
commit 64bd4551b4cf7820c2327312d3b335f9a89e8764 1 parent b98fc43
Philip Olson philip authored

Showing 1 changed file with 128 additions and 74 deletions. Show diff stats Hide diff stats

  1. +128 74 INSTALL
202 INSTALL
@@ -24,6 +24,7 @@ Installing PHP
24 24 + Installing a PHP extension on Windows
25 25 + Compiling shared PECL extensions with the pecl command
26 26 + Compiling shared PECL extensions with phpize
  27 + + php-config
27 28 + Compiling PECL extensions statically into PHP
28 29 * Problems?
29 30 + Read the FAQ
@@ -83,7 +84,7 @@ General Installation Considerations
83 84 With PHP you can also write desktop GUI applications using the PHP-GTK
84 85 extension. This is a completely different approach than writing web
85 86 pages, as you do not output any HTML, but manage windows and objects
86   - within them. For more information about PHP-GTK, please » visit the
  87 + within them. For more information about PHP-GTK, please » visit the
87 88 site dedicated to this extension. PHP-GTK is not included in the
88 89 official PHP distribution.
89 90
@@ -92,9 +93,9 @@ General Installation Considerations
92 93 will also find information on the command line executable in the
93 94 following sections.
94 95
95   - PHP source code and binary distributions for Windows can be found at »
96   - http://www.php.net/downloads.php. We recommend you to choose a » mirror
97   - nearest to you for downloading the distributions.
  96 + PHP source code and binary distributions for Windows can be found at
  97 + » http://www.php.net/downloads.php. We recommend you to choose a
  98 + » mirror nearest to you for downloading the distributions.
98 99 __________________________________________________________________
99 100 __________________________________________________________________
100 101
@@ -140,9 +141,9 @@ Table of Contents
140 141 * A web server
141 142 * Any module specific components (such as GD, PDF libs, etc.)
142 143
143   - When building directly from SVN sources or after custom modifications
  144 + When building directly from Git sources or after custom modifications
144 145 you might also need:
145   - * autoconf: 2.13
  146 + * autoconf: 2.13+ (for PHP < 5.4.0), 2.59+ (for PHP >= 5.4.0)
146 147 * automake: 1.4+
147 148 * libtool: 1.4.x+ (except 1.4.2)
148 149 * re2c: Version 0.13.4 or newer
@@ -375,12 +376,12 @@ Apache 2.x on Unix systems
375 376 For information on why, read the related FAQ entry on using Apache2
376 377 with a threaded MPM
377 378
378   - The » Apache Documentation is the most authoritative source of
  379 + The » Apache Documentation is the most authoritative source of
379 380 information on the Apache 2.x server. More information about
380 381 installation options for Apache may be found there.
381 382
382   - The most recent version of Apache HTTP Server may be obtained from »
383   - Apache download site, and a fitting PHP version from the above
  383 + The most recent version of Apache HTTP Server may be obtained from
  384 + » Apache download site, and a fitting PHP version from the above
384 385 mentioned places. This quick guide covers only the basics to get
385 386 started with Apache 2.x and PHP. For more information read the » Apache
386 387 Documentation. The version numbers have been omitted here, to ensure
@@ -498,7 +499,7 @@ service httpd restart
498 499
499 500 This should not be undertaken without being aware of the consequences
500 501 of this decision, and having at least a fair understanding of the
501   - implications. The Apache documentation regarding » MPM-Modules
  502 + implications. The Apache documentation regarding » MPM-Modules
502 503 discusses MPMs in a great deal more detail.
503 504
504 505 Note:
@@ -520,7 +521,7 @@ Lighttpd 1.4 on Unix systems
520 521 This section contains notes and hints specific to Lighttpd 1.4 installs
521 522 of PHP on Unix systems.
522 523
523   - Please use the » Lighttpd trac to learn how to install Lighttpd
  524 + Please use the » Lighttpd trac to learn how to install Lighttpd
524 525 properly before continuing.
525 526
526 527 Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
@@ -627,15 +628,15 @@ Sun, iPlanet and Netscape servers on Sun Solaris
627 628 current web servers read the note about subrequests.
628 629
629 630 You can find more information about setting up PHP for the Netscape
630   - Enterprise Server (NES) here: »
631   - http://benoit.noss.free.fr/php/install-php4.html
  631 + Enterprise Server (NES) here:
  632 + » http://benoit.noss.free.fr/php/install-php4.html
632 633
633 634 To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
634 635 enter the proper install directory for the --with-nsapi=[DIR] option.
635 636 The default directory is usually /opt/netscape/suitespot/. Please also
636 637 read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
637 638
638   - 1. Install the following packages from » http://www.sunfreeware.com/
  639 + 1. Install the following packages from » http://www.sunfreeware.com/
639 640 or another download site:
640 641 + autoconf-2.13
641 642 + automake-1.4
@@ -837,7 +838,7 @@ Testing
837 838 Using Variables
838 839
839 840 Some server supplied environment variables are not defined in the
840   - current » CGI/1.1 specification. Only the following variables are
  841 + current » CGI/1.1 specification. Only the following variables are
841 842 defined there: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE,
842 843 GATEWAY_INTERFACE, PATH_INFO, PATH_TRANSLATED, QUERY_STRING,
843 844 REMOTE_ADDR, REMOTE_HOST, REMOTE_IDENT, REMOTE_USER, REQUEST_METHOD,
@@ -855,20 +856,20 @@ HP-UX specific installation notes
855 856 There are two main options for installing PHP on HP-UX systems. Either
856 857 compile it, or install a pre-compiled binary.
857 858
858   - Official pre-compiled packages are located here: »
859   - http://software.hp.com/
  859 + Official pre-compiled packages are located here:
  860 + » http://software.hp.com/
860 861
861 862 Until this manual section is rewritten, the documentation about
862 863 compiling PHP (and related extensions) on HP-UX systems has been
863   - removed. For now, consider reading the following external resource: »
864   - Building Apache and PHP on HP-UX 11.11
  864 + removed. For now, consider reading the following external resource:
  865 + » Building Apache and PHP on HP-UX 11.11
865 866 __________________________________________________________________
866 867 __________________________________________________________________
867 868
868 869 OpenBSD installation notes
869 870
870   - This section contains notes and hints specific to installing PHP on »
871   - OpenBSD 3.6.
  871 + This section contains notes and hints specific to installing PHP on
  872 + » OpenBSD 3.6.
872 873
873 874 Using Binary Packages
874 875
@@ -900,12 +901,12 @@ Using Binary Packages
900 901 (install the PEAR libraries)
901 902 # pkg_add php4-pear-4.3.8.tgz
902 903
903   - Read the » packages(7) manual page for more information about binary
  904 + Read the » packages(7) manual page for more information about binary
904 905 packages on OpenBSD.
905 906
906 907 Using Ports
907 908
908   - You can also compile up PHP from source using the » ports tree.
  909 + You can also compile up PHP from source using the » ports tree.
909 910 However, this is only recommended for users familiar with OpenBSD. The
910 911 PHP 4 port is split into two sub-directories: core and extensions. The
911 912 extensions directory generates sub-packages for all of the supported
@@ -926,7 +927,7 @@ Common Problems
926 927 automatically installs into the correct chroot directories, so no
927 928 special modification is needed there. More information on the
928 929 OpenBSD Apache is available in the » OpenBSD FAQ.
929   - * The OpenBSD 3.6 package for the » gd extension requires XFree86 to
  930 + * The OpenBSD 3.6 package for the » gd extension requires XFree86 to
930 931 be installed. If you do not wish to use some of the font features
931 932 that require X11, install the php4-gd-4.3.8-no_x11.tgz package
932 933 instead.
@@ -951,18 +952,26 @@ Required software
951 952
952 953 Solaris installs often lack C compilers and their related tools. Read
953 954 this FAQ for information on why using GNU versions for some of these
954   - tools is necessary. The required software is as follows:
  955 + tools is necessary.
  956 +
  957 + For unpacking the PHP distribution you need
  958 + * tar
  959 + * gzip or
  960 + * bzip2
  961 +
  962 + For compiling PHP you need
955 963 * gcc (recommended, other C compilers may work)
956 964 * make
957   - * flex
  965 + * GNU sed
  966 +
  967 + For building extra extensions or hacking the code of PHP you might also
  968 + need
  969 + * flex (up to PHP 5.2)
  970 + * re2c
958 971 * bison
959 972 * m4
960 973 * autoconf
961 974 * automake
962   - * perl
963   - * gzip
964   - * tar
965   - * GNU sed
966 975
967 976 In addition, you will need to install (and possibly compile) any
968 977 additional software specific to your configuration, such as Oracle or
@@ -971,14 +980,16 @@ Required software
971 980 Using Packages
972 981
973 982 You can simplify the Solaris install process by using pkgadd to install
974   - most of your needed components.
  983 + most of your needed components. The Image Packaging System (IPS) for
  984 + Solaris 11 Express also contains most of the required components for
  985 + installation using the pkg command.
975 986 __________________________________________________________________
976 987 __________________________________________________________________
977 988
978 989 Debian GNU/Linux installation notes
979 990
980   - This section contains notes and hints specific to installing PHP on »
981   - Debian GNU/Linux.
  991 + This section contains notes and hints specific to installing PHP on
  992 + » Debian GNU/Linux.
982 993 Warning
983 994
984 995 Unofficial builds from third-parties are not supported here. Any bugs
@@ -1205,6 +1216,7 @@ Table of Contents
1205 1216 * Installing a PHP extension on Windows
1206 1217 * Compiling shared PECL extensions with the pecl command
1207 1218 * Compiling shared PECL extensions with phpize
  1219 + * php-config
1208 1220 * Compiling PECL extensions statically into PHP
1209 1221 __________________________________________________________________
1210 1222
@@ -1227,8 +1239,8 @@ Introduction to PECL Installations
1227 1239 To this php.ini file, or through the use of the dl() function.
1228 1240
1229 1241 When building PHP modules, it's important to have known-good versions
1230   - of the required tools (autoconf, automake, libtool, etc.) See the »
1231   - Anonymous SVN Instructions for details on the required tools, and
  1242 + of the required tools (autoconf, automake, libtool, etc.) See the
  1243 + » Anonymous Git Instructions for details on the required tools, and
1232 1244 required versions.
1233 1245 __________________________________________________________________
1234 1246 __________________________________________________________________
@@ -1247,7 +1259,7 @@ Downloading PECL extensions
1247 1259 the PECL web site are available for download and installation using
1248 1260 the » pecl command. Specific revisions may also be specified.
1249 1261 * SVN Most PECL extensions also reside in SVN. A web-based view may
1250   - be seen at » http://svn.php.net/viewvc/pecl/. To download straight
  1262 + be seen at » http://svn.php.net/viewvc/pecl/. To download straight
1251 1263 from SVN, the following sequence of commands may be used:
1252 1264 $ svn checkout http://svn.php.net/repository/pecl/extname/trunk
1253 1265 extname
@@ -1279,7 +1291,7 @@ Where to find an extension?
1279 1291
1280 1292 PHP extensions are usually called "php_*.dll" (where the star
1281 1293 represents the name of the extension) and they are located under the
1282   - "PHP\ext" ("PHP\extensions" in PHP4) folder.
  1294 + "PHP\ext" ("PHP\extensions" in PHP 4) folder.
1283 1295
1284 1296 PHP ships with the extensions most useful to the majority of
1285 1297 developers. They are called "core" extensions.
@@ -1365,7 +1377,7 @@ Resolving problems
1365 1377
1366 1378 Compiling shared PECL extensions with the pecl command
1367 1379
1368   - PECL makes it easy to create shared PHP extensions. Using the » pecl
  1380 + PECL makes it easy to create shared PHP extensions. Using the » pecl
1369 1381 command, do the following:
1370 1382
1371 1383 $ pecl install extname
@@ -1424,6 +1436,51 @@ $ make
1424 1436 __________________________________________________________________
1425 1437 __________________________________________________________________
1426 1438
  1439 +php-config
  1440 +
  1441 + php-config is a simple shell script for obtaining information about the
  1442 + installed PHP configuration.
  1443 +
  1444 + When compiling extensions, if you have multiple PHP versions installed,
  1445 + you may specify for which installation you'd like to build by using the
  1446 + --with-php-config option during configuration, specifying the path of
  1447 + the respective php-config script.
  1448 +
  1449 + The list of command line options provided by the php-config script can
  1450 + be queried anytime by running php-config with the -h switch:
  1451 +Usage: /usr/local/bin/php-config [OPTION]
  1452 +Options:
  1453 + --prefix [...]
  1454 + --includes [...]
  1455 + --ldflags [...]
  1456 + --libs [...]
  1457 + --extension-dir [...]
  1458 + --include-dir [...]
  1459 + --php-binary [...]
  1460 + --php-sapis [...]
  1461 + --configure-options [...]
  1462 + --version [...]
  1463 + --vernum [...]
  1464 +
  1465 + CAPTION: Command line options
  1466 +
  1467 + Option Description
  1468 + --prefix Directory prefix where PHP is installed, e.g. /usr/local
  1469 + --includes List of -I options with all include files
  1470 + --ldflags LD Flags which PHP was compiled with
  1471 + --libs Extra libraries which PHP was compiled with
  1472 + --extension-dir Directory where extensions are searched by default
  1473 + --include-dir Directory prefix where header files are installed by
  1474 + default
  1475 + --php-binary Full path to php CLI or CGI binary
  1476 + --php-sapis Show all SAPI modules available
  1477 + --configure-options Configure options to recreate configuration of
  1478 + current PHP installation
  1479 + --version PHP version
  1480 + --vernum PHP version as integer
  1481 + __________________________________________________________________
  1482 + __________________________________________________________________
  1483 +
1427 1484 Compiling PECL extensions statically into PHP
1428 1485
1429 1486 You might find that you need to build a PECL extension statically into
@@ -1485,11 +1542,11 @@ Other problems
1485 1542 If you are still stuck, someone on the PHP installation mailing list
1486 1543 may be able to help you. You should check out the archive first, in
1487 1544 case someone already answered someone else who had the same problem as
1488   - you. The archives are available from the support page on »
1489   - http://www.php.net/support.php. To subscribe to the PHP installation
1490   - mailing list, send an empty mail to »
1491   - php-install-subscribe@lists.php.net. The mailing list address is »
1492   - php-install@lists.php.net.
  1545 + you. The archives are available from the support page on
  1546 + » http://www.php.net/support.php. To subscribe to the PHP installation
  1547 + mailing list, send an empty mail to
  1548 + » php-install-subscribe@lists.php.net. The mailing list address is
  1549 + » php-install@lists.php.net.
1493 1550
1494 1551 If you want to get help on the mailing list, please try to be precise
1495 1552 and give the necessary details about your environment (which operating
@@ -1504,11 +1561,11 @@ Bug reports
1504 1561 If you think you have found a bug in PHP, please report it. The PHP
1505 1562 developers probably don't know about it, and unless you report it,
1506 1563 chances are it won't be fixed. You can report bugs using the
1507   - bug-tracking system at » http://bugs.php.net/. Please do not send bug
  1564 + bug-tracking system at » http://bugs.php.net/. Please do not send bug
1508 1565 reports in mailing list or personal letters. The bug system is also
1509 1566 suitable to submit feature requests.
1510 1567
1511   - Read the » How to report a bug document before submitting any bug
  1568 + Read the » How to report a bug document before submitting any bug
1512 1569 reports!
1513 1570 __________________________________________________________________
1514 1571 __________________________________________________________________
@@ -1528,14 +1585,14 @@ The configuration file
1528 1585
1529 1586 The configuration file (php.ini) is read when PHP starts up. For the
1530 1587 server module versions of PHP, this happens only once when the web
1531   - server is started. For the CGI and CLI version, it happens on every
  1588 + server is started. For the CGI and CLI versions, it happens on every
1532 1589 invocation.
1533 1590
1534   - php.ini is searched in these locations (in order):
  1591 + php.ini is searched for in these locations (in order):
1535 1592 * SAPI module specific location (PHPIniDir directive in Apache 2, -c
1536 1593 command line option in CGI and CLI, php_ini parameter in NSAPI,
1537 1594 PHP_INI_PATH environment variable in THTTPD)
1538   - * The PHPRC environment variable. Before PHP 5.2.0 this was checked
  1595 + * The PHPRC environment variable. Before PHP 5.2.0, this was checked
1539 1596 after the registry key mentioned below.
1540 1597 * As of PHP 5.2.0, the location of the php.ini file can be set for
1541 1598 different versions of PHP. The following registry keys are examined
@@ -1543,33 +1600,33 @@ The configuration file
1543 1600 [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and
1544 1601 [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP
1545 1602 major, minor and release versions. If there is a value for
1546   - IniFilePath in these keys, then the first one found will be used as
1547   - the location of the php.ini (Windows only).
  1603 + IniFilePath in any of these keys, the first one found will be used
  1604 + as the location of the php.ini (Windows only).
1548 1605 * [HKEY_LOCAL_MACHINE\SOFTWARE\PHP], value of IniFilePath (Windows
1549 1606 only).
1550   - * Current working directory (except CLI)
  1607 + * Current working directory (except CLI).
1551 1608 * The web server's directory (for SAPI modules), or directory of PHP
1552   - (otherwise in Windows)
  1609 + (otherwise in Windows).
1553 1610 * Windows directory (C:\windows or C:\winnt) (for Windows), or
1554   - --with-config-file-path compile time option
  1611 + --with-config-file-path compile time option.
1555 1612
1556   - If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
1557   - e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI
1558   - name can be determined by php_sapi_name().
  1613 + If php-SAPI.ini exists (where SAPI is the SAPI in use, so, for example,
  1614 + php-cli.ini or php-apache.ini), it is used instead of php.ini. The SAPI
  1615 + name can be determined with php_sapi_name().
1559 1616
1560 1617 Note:
1561 1618
1562   - The Apache web server changes the directory to root at startup
  1619 + The Apache web server changes the directory to root at startup,
1563 1620 causing PHP to attempt to read php.ini from the root filesystem if
1564 1621 it exists.
1565 1622
1566   - The php.ini directives handled by extensions are documented
1567   - respectively on the pages of the extensions themselves. The list of the
1568   - core directives is available in the appendix. Probably not all PHP
1569   - directives are documented in the manual though. For a complete list of
  1623 + The php.ini directives handled by extensions are documented on the
  1624 + respective pages of the extensions themselves. A list of the core
  1625 + directives is available in the appendix. Not all PHP directives are
  1626 + necessarily documented in this manual: for a complete list of
1570 1627 directives available in your PHP version, please read your well
1571   - commented php.ini file. Alternatively, you may find the » the latest
1572   - php.ini from SVN helpful too.
  1628 + commented php.ini file. Alternatively, you may find » the latest
  1629 + php.ini from Git helpful too.
1573 1630
1574 1631 Example #1 php.ini example
1575 1632 ; any text on a line after an unquoted semicolon (;) is ignored
@@ -1635,12 +1692,13 @@ Where a configuration setting may be set
1635 1692
1636 1693 CAPTION: Definition of PHP_INI_* modes
1637 1694
1638   - Mode Value Meaning
1639   - PHP_INI_USER 1 Entry can be set in user scripts (like with ini_set())
1640   - or in the Windows registry
1641   - PHP_INI_PERDIR 6 Entry can be set in php.ini, .htaccess or httpd.conf
1642   - PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf
1643   - PHP_INI_ALL 7 Entry can be set anywhere
  1695 + Mode Meaning
  1696 + PHP_INI_USER Entry can be set in user scripts (like with ini_set()) or
  1697 + in the Windows registry. Since PHP 5.3, entry can be set in .user.ini
  1698 + PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or
  1699 + .user.ini (since PHP 5.3)
  1700 + PHP_INI_SYSTEM Entry can be set in php.ini or httpd.conf
  1701 + PHP_INI_ALL Entry can be set anywhere
1644 1702 __________________________________________________________________
1645 1703 __________________________________________________________________
1646 1704
@@ -1788,13 +1846,9 @@ Installation
1788 1846 each request to play in, further weaknesses are introduced into
1789 1847 PHP's system.
1790 1848
1791   - If you feel you have to use a threaded MPM, look at a FastCGI
  1849 + If you want to use a threaded MPM, look at a FastCGI
1792 1850 configuration where PHP is running in its own memory space.
1793 1851
1794   - And finally, this warning against using a threaded MPM is not as
1795   - strong for Windows systems because most libraries on that
1796   - platform tend to be threadsafe.
1797   -
1798 1852 Unix/Windows: Where should my php.ini file be located?
1799 1853 By default on Unix it should be in /usr/local/lib which is
1800 1854 <install-path>/lib. Most people will want to change this at

0 comments on commit 64bd455

Please sign in to comment.
Something went wrong with that request. Please try again.