1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="ini.core" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Description of core &php.ini; directives</title>
<para>
This list includes the core &php.ini; directives you can set to
configure your PHP setup. Directives handled by extensions are listed
and detailed at the extension documentation pages respectively;
Information on the session directives for example can be found at the
<link linkend="session.configuration">sessions page</link>.
</para>
<note>
<para>
The defaults listed here are used when &php.ini; is not loaded; the values for the production and development &php.ini; may vary.
</para>
</note>
<section xml:id="ini.sect.language-options">
<title>Language Options</title>
<para>
<table>
<title>Language and Misc Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.short-open-tag">short_open_tag</link></entry>
<entry>"1"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.precision">precision</link></entry>
<entry>"14"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.serialize-precision">serialize_precision</link></entry>
<entry>"-1"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry>
Prior to PHP 7.1.0, the default value was 17.
</entry>
</row>
<row>
<entry><link linkend="ini.disable-functions">disable_functions</link></entry>
<entry>""</entry>
<entry><constant>INI_SYSTEM</constant> only</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.disable-classes">disable_classes</link></entry>
<entry>""</entry>
<entry>&php.ini; only</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.exit-on-timeout">exit_on_timeout</link></entry>
<entry>""</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.expose-php">expose_php</link></entry>
<entry>"1"</entry>
<entry>&php.ini; only</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.hard-timeout">hard_timeout</link></entry>
<entry>"2"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry>Available as of PHP 7.1.0.</entry>
</row>
<row>
<entry><link linkend="ini.zend.exception-ignore-args">zend.exception_ignore_args</link></entry>
<entry>"0"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry>Available as of PHP 7.4.0</entry>
</row>
<row>
<entry><link linkend="ini.zend.multibyte">zend.multibyte</link></entry>
<entry>"0"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.script-encoding">zend.script_encoding</link></entry>
<entry>NULL</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.detect-unicode">zend.detect_unicode</link></entry>
<entry>NULL</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.signal-check">zend.signal_check</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.assertions">zend.assertions</link></entry>
<entry>"1"</entry>
<entry><constant>INI_ALL</constant> with restrictions</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.exception-string-param-max-len">zend.exception_string_param_max_len</link></entry>
<entry>"15"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry>Available as of PHP 8.0.0.</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.short-open-tag">
<term>
<parameter>short_open_tag</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Tells PHP whether the short form (<userinput><? ?></userinput>)
of PHP's open tag should be allowed. If you want to use PHP in
combination with XML, you can disable this option in order to
use <userinput><?xml ?></userinput> inline. Otherwise, you
can print it with PHP, for example: <userinput><?php echo '<?xml
version="1.0"?>'; ?></userinput>. Also, if disabled, you must use the
long form of the PHP open tag (<userinput><?php ?></userinput>).
</para>
<note>
<para>
This directive does not affect the shorthand
<userinput><?=</userinput>, which is always available.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.precision">
<term>
<parameter>precision</parameter>
<type>int</type>
</term>
<listitem>
<simpara>
The number of significant digits displayed in floating point numbers.
<literal>-1</literal> means that an enhanced algorithm for rounding
such numbers will be used.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.serialize-precision">
<term>
<parameter>serialize_precision</parameter>
<type>int</type>
</term>
<listitem>
<simpara>
The number of significant digits stored while serializing floating point numbers.
<literal>-1</literal> means that an enhanced algorithm for rounding
such numbers will be used.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.expose-php">
<term>
<parameter>expose_php</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Exposes to the world that PHP is installed on the server, which includes the
PHP version within the HTTP header (e.g., X-Powered-By: PHP/5.3.7).
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.disable-functions">
<term>
<parameter>disable_functions</parameter>
<type>string</type>
</term>
<listitem>
<simpara>
This directive allows disables certain functions.
It takes on a comma-delimited list of function names.
As of PHP 8.0.0, disabling a function removes it definition
allowing userland to redefine it.
Prior to PHP 8.0.0, disabling a function just prevent invoking the function.
</simpara>
<simpara>
Only <link linkend="functions.internal">internal functions</link> can
be disabled using this directive.
<link linkend="functions.user-defined">User-defined functions</link>
are unaffected.
</simpara>
<simpara>
This directive must be set in &php.ini;.
It cannot be set in &httpd.conf;.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.disable-classes">
<term>
<parameter>disable_classes</parameter>
<type>string</type>
</term>
<listitem>
<para>
This directive allows disables certain classes.
It takes on a comma-delimited list of class names.
Disabling a class just prevent instantiating the class.
</para>
<para>
Only internal classes can be disabled using this directive.
User-defined classes are unaffected.
</para>
<simpara>
This directive must be set in &php.ini;.
It cannot be set in &httpd.conf;.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.assertions">
<term>
<parameter>zend.assertions</parameter>
<type>int</type>
</term>
<listitem>
<simpara>
When set to <literal>1</literal>, assertion code will be generated and
executed (development mode). When set to <literal>0</literal>,
assertion code will be generated but it will be skipped (not executed)
at runtime. When set to <literal>-1</literal>, assertion code will not
be generated, making the assertions zero-cost (production mode).
</simpara>
<note>
<para>
If a process is started in production mode, <link linkend="ini.zend.assertions">zend.assertions</link>
cannot be changed at runtime, since the code for assertions was not generated.
</para>
<para>
If a process is started in development mode, <link linkend="ini.zend.assertions">zend.assertions</link>
cannot be set to <literal>-1</literal> at runtime.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.exception-string-param-max-len">
<term>
<parameter>zend.exception_string_param_max_len</parameter>
<type>int</type>
</term>
<listitem>
<simpara>
The maximum length of string function arguments in stringified stack traces.
Must range between <literal>"0"</literal> and <literal>"1000000"</literal>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.hard-timeout">
<term>
<parameter>hard_timeout</parameter>
<type>int</type>
</term>
<listitem>
<para>
When the timeout set in <link linkend="ini.max-execution-time">max_execution_time</link>
has been hit, the PHP runtime will tear down resources gracefully. If
something gets stuck while this happens, the hard timeout will tick
for the set amount of seconds. When the hard timeout is hit, PHP will
exit ungracefully. When set to 0, the hard timeout will never activate.
</para>
<para>
When PHP stops from a hard timeout, it will look something like this:
<screen>
<![CDATA[
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unknown on line 0
]]>
</screen>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.exception-ignore-args">
<term>
<parameter>zend.exception_ignore_args</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Excludes arguments from stack traces generated from exceptions.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.multibyte">
<term>
<parameter>zend.multibyte</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables parsing of source files in multibyte encodings. Enabling zend.multibyte
is required to use character encodings like SJIS, BIG5, etc that contain special
characters in multibyte string data. ISO-8859-1 compatible encodings like UTF-8,
EUC, etc do not require this option.
</para>
<para>
Enabling zend.multibyte requires the mbstring extension to be available.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.script-encoding">
<term>
<parameter>zend.script_encoding</parameter>
<type>string</type>
</term>
<listitem>
<para>
This value will be used unless a
<link linkend="control-structures.declare.encoding">declare(encoding=...)</link>
directive appears at the top of the script. When ISO-8859-1 incompatible encoding
is used, both zend.multibyte and zend.script_encoding must be used.
</para>
<para>
Literal strings will be transliterated from zend.script_encoding to
mbstring.internal_encoding, as if
<function>mb_convert_encoding</function> would have been called.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.detect-unicode">
<term>
<parameter>zend.detect_unicode</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Check for BOM (Byte Order Mark) and see if the file contains valid
multibyte characters.
This detection is performed before processing of
<function>__halt_compiler</function>.
Available only in Zend Multibyte mode.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend.signal-check">
<term>
<parameter>zend.signal_check</parameter>
<type>bool</type>
</term>
<listitem>
<para>
To check for replaced signal handlers on shutdown.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.exit-on-timeout">
<term>
<parameter>exit_on_timeout</parameter>
<type>bool</type>
</term>
<listitem>
<para>
This is an Apache1 mod_php-only directive that forces an Apache child to exit if a PHP execution timeout occurred.
Such a timeout causes an internal longjmp() call in Apache1 which can leave some extensions in an inconsistent
state. By terminating the process any outstanding locks or memory will be cleaned up.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.resource-limits">
<title>Resource Limits</title>
<para>
<table>
<title>Resource Limits</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.memory-limit">memory_limit</link></entry>
<entry>"128M"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.memory-limit">
<term>
<parameter>memory_limit</parameter>
<type>int</type>
</term>
<listitem>
<para>
This sets the maximum amount of memory in bytes that a script
is allowed to allocate. This helps prevent poorly written
scripts for eating up all available memory on a server. Note that
to have no memory limit, set this directive to <literal>-1</literal>.
</para>
&ini.shorthandbytes;
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
See also: <link linkend="ini.max-execution-time">max_execution_time</link>.
</para>
</section>
<section xml:id="ini.sect.performance">
<title>Performance Tuning</title>
<para>
<table>
<title>Performance Tuning</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.realpath-cache-size">realpath_cache_size</link></entry>
<entry>"4M"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry>Prior to PHP 7.0.16 and 7.1.2, the default was <literal>"16K"</literal></entry>
</row>
<row>
<entry><link linkend="ini.realpath-cache-ttl">realpath_cache_ttl</link></entry>
<entry>"120"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
<note>
<para>
Using <link linkend="ini.open-basedir">open_basedir</link> will
<emphasis>disable</emphasis> the realpath cache.
</para>
</note>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.realpath-cache-size">
<term>
<parameter>realpath_cache_size</parameter>
<type>int</type>
</term>
<listitem>
<para>
Determines the size of the realpath cache to be used by PHP. This
value should be increased on systems where PHP opens many files, to
reflect the quantity of the file operations performed.
</para>
<para>
The size represents the total number of bytes in the path strings
stored, plus the size of the data associated with the cache entry. This
means that in order to store longer paths in the cache, the cache size
must be larger. This value does not directly control the number of
distinct paths that can be cached.
</para>
<para>
The size required for the cache entry data is system dependent.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.realpath-cache-ttl">
<term>
<parameter>realpath_cache_ttl</parameter>
<type>int</type>
</term>
<listitem>
<para>
Duration of time (in seconds) for which to cache realpath information
for a given file or directory. For systems with rarely changing files,
consider increasing the value.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.data-handling">
<title>Data Handling</title>
<para>
<table>
<title>Data Handling Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.arg-separator.output">arg_separator.output</link></entry>
<entry>"&"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.arg-separator.input">arg_separator.input</link></entry>
<entry>"&"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.variables-order">variables_order</link></entry>
<entry>"EGPCS"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.request-order">request_order</link></entry>
<entry>""</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.auto-globals-jit">auto_globals_jit</link></entry>
<entry>"1"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.register-argc-argv">register_argc_argv</link></entry>
<entry>"1"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.enable-post-data-reading">enable_post_data_reading</link></entry>
<entry>"1"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.post-max-size">post_max_size</link></entry>
<entry>"8M"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.auto-prepend-file">auto_prepend_file</link></entry>
<entry>NULL</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.auto-append-file">auto_append_file</link></entry>
<entry>NULL</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.default-mimetype">default_mimetype</link></entry>
<entry>"text/html"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.default-charset">default_charset</link></entry>
<entry>"UTF-8"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.input-encoding">input_encoding</link></entry>
<entry>""</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.output-encoding">output_encoding</link></entry>
<entry>""</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.internal-encoding">internal_encoding</link></entry>
<entry>""</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.arg-separator.output">
<term>
<parameter>arg_separator.output</parameter>
<type>string</type>
</term>
<listitem>
<para>
The separator used in PHP generated URLs to separate arguments.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.arg-separator.input">
<term>
<parameter>arg_separator.input</parameter>
<type>string</type>
</term>
<listitem>
<para>
List of separator(s) used by PHP to parse input URLs into variables.
</para>
<note>
<para>
Every character in this directive is considered as separator!
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.variables-order">
<term>
<parameter>variables_order</parameter>
<type>string</type>
</term>
<listitem>
<para>
Sets the order of the EGPCS (<literal>E</literal>nvironment,
<literal>G</literal>et, <literal>P</literal>ost,
<literal>C</literal>ookie, and <literal>S</literal>erver) variable
parsing. For example, if variables_order
is set to <literal>"SP"</literal> then PHP will create the
&link.superglobals; <varname>$_SERVER</varname> and
<varname>$_POST</varname>, but not create
<varname>$_ENV</varname>, <varname>$_GET</varname>, and
<varname>$_COOKIE</varname>. Setting to "" means no
&link.superglobals; will be set.
</para>
<warning>
<para>
In both the CGI and FastCGI SAPIs,
<varname>$_SERVER</varname> is
also populated by values from the environment; <literal>S</literal>
is always equivalent to <literal>ES</literal> regardless of the
placement of <literal>E</literal> elsewhere in this directive.
</para>
</warning>
<note>
<para>
The content and order of
<varname>$_REQUEST</varname> is also
affected by this directive.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.request-order">
<term>
<parameter>request_order</parameter>
<type>string</type>
</term>
<listitem>
<para>
This directive describes the order in which PHP registers GET, POST
and Cookie variables into the _REQUEST array. Registration is done
from left to right, newer values override older values.
</para>
<para>
If this directive is not set, <link
linkend="ini.variables-order">variables_order</link> is used for
<varname>$_REQUEST</varname> contents.
</para>
<para>
Note that the default distribution <filename>php.ini</filename> files does not contain
the <literal>'C'</literal> for cookies, due to security concerns.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.auto-globals-jit">
<term>
<parameter>auto_globals_jit</parameter>
<type>bool</type>
</term>
<listitem>
<para>
When enabled, the SERVER, REQUEST, and ENV variables are created when they're
first used (Just In Time) instead of when the script starts. If these
variables are not used within a script, having this directive on will
result in a performance gain.
</para>
<warning>
<para>
Usage of SERVER, REQUEST, and ENV variables is checked during the compile time
so using them through e.g. <link
linkend="language.variables.variable">variable variables</link> will
not cause their initialization.
</para>
</warning>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.register-argc-argv">
<term>
<parameter>register_argc_argv</parameter>
<type>bool</type>
</term>
<listitem>
<simpara>
Tells PHP whether to declare the argv & argc variables
(that would contain the GET information).
</simpara>
<simpara>
See also <link linkend="features.commandline">command line</link>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.enable-post-data-reading">
<term>
<parameter>enable_post_data_reading</parameter>
<type>bool</type>
</term>
<listitem>
<simpara>
Disabling this option causes <varname>$_POST</varname> and
<varname>$_FILES</varname> <emphasis>not</emphasis> to be populated.
The only way to read postdata will then be through the
<link linkend="wrappers.php">php://input</link> stream wrapper.
This can be useful to proxy requests or to process
the POST data in a memory efficient fashion.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.post-max-size">
<term>
<parameter>post_max_size</parameter>
<type>int</type>
</term>
<listitem>
<simpara>
Sets max size of post data allowed. This setting also affects
file upload. To upload large files, this value must be larger
than <link linkend="ini.upload-max-filesize">upload_max_filesize</link>.
</simpara>
<simpara>
Generally speaking,
<link linkend="ini.memory-limit">memory_limit</link> should be
larger than <parameter>post_max_size</parameter>.
</simpara>
&ini.shorthandbytes;
<simpara>
If the size of post data is greater than post_max_size, the
<varname>$_POST</varname> and <varname>$_FILES</varname>
<link linkend="language.variables.superglobals">superglobals</link>
are empty. This can be tracked in various ways, e.g. by passing the
<varname>$_GET</varname> variable to the script processing the data,
i.e. <literal><form action="edit.php?processed=1"></literal>,
and then checking if <varname>$_GET['processed']</varname> is set.
</simpara>
<para>
<note>
<para>
PHP allows shortcuts for byte values, including K (kilo), M (mega)
and G (giga). PHP will do the conversions automatically if you
use any of these. Be careful not to exceed the 32 bit signed integer
limit (if you're using 32bit versions) as it will cause your script
to fail.
</para>
</note>
</para>
<para>
<table>
<title>Changelog for <literal>post_max_size</literal></title>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.4</entry>
<entry>
<parameter>post_max_size</parameter> = 0 will not disable the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP.
</entry>
</row>
<row>
<entry>5.3.2 , 5.2.12</entry>
<entry>
Allow unlimited post size by setting <parameter>post_max_size</parameter> to 0.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.auto-prepend-file">
<term>
<parameter>auto_prepend_file</parameter>
<type>string</type>
</term>
<listitem>
<para>
Specifies the name of a file that is automatically parsed
before the main file. The file is included as if it was
called with the <function>require</function> function, so
<link linkend="ini.include-path">include_path</link> is used.</para>
<para>
The special value <literal>none</literal>
disables auto-prepending.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.auto-append-file">
<term>
<parameter>auto_append_file</parameter>
<type>string</type>
</term>
<listitem>
<para>
Specifies the name of a file that is automatically parsed
after the main file. The file is included as if it was
called with the <function>require</function> function, so
<link linkend="ini.include-path">include_path</link> is used.</para>
<para>
The special value <literal>none</literal>
disables auto-appending.
<note>
<simpara>
If the script is terminated with <function>exit</function>,
auto-append will <emphasis>not</emphasis> occur.</simpara>
</note>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.default-mimetype">
<term>
<parameter>default_mimetype</parameter>
<type>string</type>
</term>
<listitem>
<para>
By default, PHP will output a media type using the Content-Type header.
To disable this, simply set it to be empty.
</para>
<para>
PHP's built-in default media type is set to text/html.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.default-charset">
<term>
<parameter>default_charset</parameter>
<type>string</type>
</term>
<listitem>
<para>
"UTF-8" is the default value and its value is used
as the default character encoding for
<function>htmlentities</function>,
<function>html_entity_decode</function> and
<function>htmlspecialchars</function> if the
<parameter>encoding</parameter> parameter is omitted. The value of
<parameter>default_charset</parameter> will also be used to set the
default character set for <link linkend="book.iconv">iconv</link>
functions if the
<link linkend="ini.iconv.input-encoding"><parameter>iconv.input_encoding</parameter></link>,
<link linkend="ini.iconv.output-encoding"><parameter>iconv.output_encoding</parameter></link> and
<link linkend="ini.iconv.internal-encoding"><parameter>iconv.internal_encoding</parameter></link>
configuration options are unset, and for
<link linkend="book.mbstring">mbstring</link> functions if the
<link linkend="ini.mbstring.http-input"><parameter>mbstring.http_input</parameter></link>
<link linkend="ini.mbstring.http-output"><parameter>mbstring.http_output</parameter></link>
<link linkend="ini.mbstring.internal-encoding"><parameter>mbstring.internal_encoding</parameter></link>
configuration option is unset.
</para>
<para>
All versions of PHP will use this value as the charset within the
default Content-Type header sent by PHP if the header isn't overridden
by a call to <function>header</function>.
</para>
<para>
Setting <parameter>default_charset</parameter> to an empty value is
not recommended.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.input-encoding">
<term>
<parameter>input_encoding</parameter>
<type>string</type>
</term>
<listitem>
<para>
This setting is used for multibyte modules
such as mbstring and iconv. Default is empty.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.output-encoding">
<term>
<parameter>output_encoding</parameter>
<type>string</type>
</term>
<listitem>
<para>
This setting is used for multibyte modules
such as mbstring and iconv. Default is empty.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.internal-encoding">
<term>
<parameter>internal_encoding</parameter>
<type>string</type>
</term>
<listitem>
<para>
This setting is used for multibyte modules
such as mbstring and iconv. Default is empty. If empty,
<link linkend="ini.default-charset">default_charset</link> is used.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.path-directory">
<title>Paths and Directories</title>
<para>
<table>
<title>Paths and Directories Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.include-path">include_path</link></entry>
<entry>".;/path/to/php/pear"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.open-basedir">open_basedir</link></entry>
<entry>NULL</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.doc-root">doc_root</link></entry>
<entry>NULL</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.user-dir">user_dir</link></entry>
<entry>NULL</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.user-ini.cache-ttl">user_ini.cache_ttl</link></entry>
<entry>"300"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.user-ini.filename">user_ini.filename</link></entry>
<entry>".user.ini"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.extension-dir">extension_dir</link></entry>
<entry>"/path/to/php"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.extension">extension</link></entry>
<entry>NULL</entry>
<entry>&php.ini; only</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend-extension">zend_extension</link></entry>
<entry>NULL</entry>
<entry>&php.ini; only</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.check-shebang-line">cgi.check_shebang_line</link></entry>
<entry>"1"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.discard-path">cgi.discard_path</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link></entry>
<entry>"1"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.force-redirect">cgi.force_redirect</link></entry>
<entry>"1"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.nph">cgi.nph</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.redirect-status-env">cgi.redirect_status_env</link></entry>
<entry>NULL</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.cgi.rfc2616-headers">cgi.rfc2616_headers</link></entry>
<entry>"0"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.fastcgi.impersonate">fastcgi.impersonate</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.fastcgi.logging">fastcgi.logging</link></entry>
<entry>"1"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.include-path">
<term>
<parameter>include_path</parameter>
<type>string</type>
</term>
<listitem>
<para>
Specifies a list of directories where the
<function>require</function>, <function>include</function>,
<function>fopen</function>, <function>file</function>,
<function>readfile</function> and <function>file_get_contents</function>
functions look for files. The format is like the system's
<envar>PATH</envar> environment variable: a list of directories
separated with a colon in Unix or semicolon in Windows.
</para>
<para>
PHP considers each entry in the include path separately when looking for
files to include. It will check the first path, and if it doesn't find
it, check the next path, until it either locates the included file or
returns with an
<constant>E_WARNING</constant>
or an <constant>E_ERROR</constant>.
You may modify or set your include path at runtime using
<function>set_include_path</function>.
</para>
<para>
<example>
<title>Unix include_path</title>
<programlisting role="php.ini">
<![CDATA[
include_path=".:/php/includes"
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Windows include_path</title>
<programlisting role="php.ini">
<![CDATA[
include_path=".;c:\php\includes"
]]>
</programlisting>
</example>
</para>
<para>
Using a <literal>.</literal> in the include path allows for
relative includes as it means the current directory. However,
it is more efficient to explicitly use <literal>include
'./file'</literal> than having PHP always check the current
directory for every include.
</para>
<note>
<para>
<literal>ENV</literal> variables are also accessible in .ini files.
As such it is possible to reference the home directory using
<literal>${LOGIN}</literal> and <literal>${USER}</literal>.
</para>
<para>
Environment variables may vary between Server APIs as those environments
may be different.
</para>
</note>
<para>
<example>
<title>Unix include_path using ${USER} env variable</title>
<programlisting role="php.ini">
<![CDATA[
include_path = ".:${USER}/pear/php"
]]>
</programlisting>
</example>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.open-basedir">
<term>
<parameter>open_basedir</parameter>
<type>string</type>
</term>
<listitem>
<para>
Limit the files that can be accessed by PHP to the specified
directory-tree, including the file itself.
</para>
<para>
When a script tries to access the filesystem, for example using
<function>include</function>, or <function>fopen</function>, the location of the file
is checked.
When the file is outside the specified directory-tree, PHP will refuse to access it.
All symbolic links are resolved, so it's not possible to avoid this restriction
with a symlink. If the file doesn't exist then the symlink couldn't be
resolved and the filename is compared to (a resolved) <option>open_basedir</option>.
</para>
<para>
<option>open_basedir</option> can affect more than just filesystem functions; for example
if <literal>MySQL</literal> is configured to use <literal>mysqlnd</literal> drivers,
<literal>LOAD DATA INFILE</literal> will be affected by <option>open_basedir</option>.
Much of the extended functionality of PHP uses <literal>open_basedir</literal> in this way.
</para>
<para>
The special value <systemitem class="filesystem">.</systemitem>
indicates that the working directory of the script will be used as the
base-directory. This is, however, a little dangerous as the working directory
of the script can easily be changed with <function>chdir</function>.
</para>
<para>
In <filename>httpd.conf</filename>, <option>open_basedir</option> can be turned off
(e.g. for some virtual hosts)
<link linkend="configuration.changes.apache">the same way</link> as
any other configuration directive with "<literal>php_admin_value open_basedir
none</literal>".
</para>
<para>
Under Windows, separate the directories with a semicolon. On all
other systems, separate the directories with a colon. As an Apache
module, <option>open_basedir</option> paths from parent directories are now
automatically inherited.
</para>
<para>
The restriction specified with <option>open_basedir</option> is a
directory name, not a prefix.
</para>
<para>
The default is to allow all files to be opened.
</para>
<note>
<simpara>
open_basedir can be tightened at run-time. This means
that if open_basedir is set to <literal>/www/</literal> in &php.ini;
a script can tighten the configuration to
<literal>/www/tmp/</literal> at run-time with
<function>ini_set</function>. When listing several directories, you
can use the <constant>PATH_SEPARATOR</constant> constant as a separator
regardless of the operating system.
</simpara>
<simpara>
As of PHP 8.3.0, <option>open_basedir</option> no longer accepts a
paths containing the parent directory (<literal>..</literal>) when
set at runtime using <function>ini_set</function>.
</simpara>
</note>
<note>
<para>
Using open_basedir will set <link linkend="ini.realpath-cache-size">realpath_cache_size</link>
to <literal>0</literal> and thus <emphasis>disable</emphasis> the realpath cache.
</para>
</note>
<caution>
<para>
<literal>open_basedir</literal> is just an extra safety net, that is in no way
comprehensive, and can therefore not be relied upon when security is needed.
</para>
</caution>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.doc-root">
<term>
<parameter>doc_root</parameter>
<type>string</type>
</term>
<listitem>
<para>
PHP's "root directory" on the server. Only used if
non-empty.
If PHP was not compiled with FORCE_REDIRECT, you <emphasis>should
</emphasis> set doc_root if you are running PHP as a CGI under any web
server (other than IIS). The alternative is to use the
<link linkend="ini.cgi.force-redirect">
cgi.force_redirect</link> configuration below.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.user-ini.cache-ttl">
<term>
<parameter>user_ini.cache_ttl</parameter>
<type>int</type>
</term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.user-ini.filename">
<term>
<parameter>user_ini.filename</parameter>
<type>string</type>
</term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.user-dir">
<term>
<parameter>user_dir</parameter>
<type>string</type>
</term>
<listitem>
<para>
The base name of the directory used on a user's home directory for PHP
files, for example <filename class="directory">public_html
</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.extension-dir">
<term>
<parameter>extension_dir</parameter>
<type>string</type>
</term>
<listitem>
<para>
In what directory PHP should look for dynamically loadable
extensions. It is recommended to specify an absolute path. See also: <link linkend="ini.enable-dl">enable_dl</link>,
and <function>dl</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.extension">
<term>
<parameter>extension</parameter>
<type>string</type>
</term>
<listitem>
<para>
Which dynamically loadable extensions to load when PHP starts up.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.zend-extension">
<term>
<parameter>zend_extension</parameter>
<type>string</type>
</term>
<listitem>
<para>
Name of dynamically loadable Zend extension (for example
XDebug) to load when PHP starts up.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.check-shebang-line">
<term>
<parameter>cgi.check_shebang_line</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Controls whether <acronym>CGI</acronym> PHP checks for line starting
with <literal>#!</literal> (shebang) at the top of the running script.
This line might be needed if the script support running both as
stand-alone script and via PHP <acronym>CGI</acronym>. PHP in
<acronym>CGI</acronym> mode skips this line and ignores its content if
this directive is turned on.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.discard-path">
<term>
<parameter>cgi.discard_path</parameter>
<type>bool</type>
</term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.fix-pathinfo">
<term>
<parameter>cgi.fix_pathinfo</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Provides <emphasis>real</emphasis> <literal>PATH_INFO</literal>/
<literal>PATH_TRANSLATED</literal> support for <acronym>CGI</acronym>.
PHP's previous behaviour was to set <literal>PATH_TRANSLATED</literal>
to <literal>SCRIPT_FILENAME</literal>, and to not grok what <literal>
PATH_INFO</literal> is. For more information on
<literal>PATH_INFO</literal>, see the <acronym>CGI</acronym> specs.
Setting this to <literal>1</literal> will cause PHP
<acronym>CGI</acronym> to fix its paths to conform to the spec. A
setting of zero causes PHP to behave as before. It is turned on by
default. You should fix your scripts to use
<literal>SCRIPT_FILENAME</literal> rather than
<literal>PATH_TRANSLATED</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.force-redirect">
<term>
<parameter>cgi.force_redirect</parameter>
<type>bool</type>
</term>
<listitem>
<para>
cgi.force_redirect is necessary to provide security running PHP as a
<acronym>CGI</acronym> under most web servers. Left undefined, PHP
turns this on by default. You can turn it off <emphasis>at your own
risk</emphasis>.
</para>
<note>
<para>
Windows Users: When using IIS this option <emphasis>must</emphasis>
be turned off. For OmniHTTPD or Xitami the same applies.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.nph">
<term>
<parameter>cgi.nph</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If cgi.nph is enabled it will force cgi to always sent Status: 200 with
every request.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.redirect-status-env">
<term>
<parameter>cgi.redirect_status_env</parameter>
<type>string</type>
</term>
<listitem>
<para>
If cgi.force_redirect is turned on, and you are not running under
Apache or Netscape (iPlanet) web servers, you <emphasis>may</emphasis>
need to set an environment variable name that PHP will look for to
know it is OK to continue execution.
</para>
<note>
<para>
Setting this variable <emphasis>may</emphasis> cause security issues,
<emphasis>know what you are doing first</emphasis>.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.cgi.rfc2616-headers">
<term>
<parameter>cgi.rfc2616_headers</parameter>
<type>int</type>
</term>
<listitem>
<para>
Tells PHP what type of headers to use when sending HTTP response
code. If it's set to 0, PHP sends a <link xlink:href="&url.rfc;3875">RFC 3875</link>
"Status:" header that is supported by Apache and other web servers. When this option
is set to 1, PHP will send <link xlink:href="&url.rfc;2616">RFC 2616</link> compliant
headers.
</para>
<para>
If this option is enabled, and you are running PHP in a CGI environment (e.g. PHP-FPM)
you should not use standard RFC 2616 style HTTP status response headers, you should
instead use their RFC 3875 equivalent e.g. instead of header("HTTP/1.0 404 Not found");
you should use header("Status: 404 Not Found");
</para>
<para>
Leave it set to 0 unless you know what you're doing.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.fastcgi.impersonate">
<term>
<parameter>fastcgi.impersonate</parameter>
<type>string</type>
</term>
<listitem>
<para>
FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
security tokens of the calling client. This allows IIS to define the
security context that the request runs under. mod_fastcgi under Apache
does not currently support this feature (03/17/2002)
Set to 1 if running under IIS. Default is zero.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.fastcgi.logging">
<term>
<parameter>fastcgi.logging</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Turns on SAPI logging when using FastCGI. Default is
to enable logging.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.file-uploads">
<title>File Uploads</title>
<para>
<table>
<title>File Uploads Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.file-uploads">file_uploads</link></entry>
<entry>"1"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.upload-tmp-dir">upload_tmp_dir</link></entry>
<entry>NULL</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.max-input-nesting-level">max_input_nesting_level</link></entry>
<entry>64</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.max-input-vars">max_input_vars</link></entry>
<entry>1000</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.upload-max-filesize">upload_max_filesize</link></entry>
<entry>"2M"</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.max-file-uploads">max_file_uploads</link></entry>
<entry>20</entry>
<entry><constant>INI_PERDIR</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.file-uploads">
<term>
<parameter>file_uploads</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Whether or not to allow HTTP
<link linkend="features.file-upload">file uploads</link>. See also the
<link linkend="ini.upload-max-filesize">upload_max_filesize</link>,
<link linkend="ini.upload-tmp-dir">upload_tmp_dir</link>, and
<link linkend="ini.post-max-size">post_max_size</link> directives.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.upload-tmp-dir">
<term>
<parameter>upload_tmp_dir</parameter>
<type>string</type>
</term>
<listitem>
<para>
The temporary directory used for storing files when doing
file upload. Must be writable by whatever user PHP
is running as. If not specified PHP will use the system's default.
</para>
<para>
If the directory specified here is not writable, PHP falls back to
the system default temporary directory. If
<link linkend="ini.open-basedir">open_basedir</link> is on, then
the system default directory must be allowed for an upload to
succeed.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.upload-max-filesize">
<term>
<parameter>upload_max_filesize</parameter>
<type>int</type>
</term>
<listitem>
<para>
The maximum size of an uploaded file.
</para>
<para>
<link linkend="ini.post-max-size">post_max_size</link> must be larger than this value.
</para>
&ini.shorthandbytes;
</listitem>
</varlistentry>
<varlistentry xml:id="ini.max-file-uploads">
<term>
<parameter>max_file_uploads</parameter>
<type>int</type>
</term>
<listitem>
<para>
The maximum number of files allowed to be uploaded simultaneously.
Upload fields left blank on submission do not
count towards this limit.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.sql-general">
<title>General SQL</title>
<para>
<table>
<title>General SQL Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.sql.safe-mode">sql.safe_mode</link></entry>
<entry>"0"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry>Removed as of PHP 7.2.0</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.sql.safe-mode">
<term>
<parameter>sql.safe_mode</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If turned on, database connection functions that specify default values
will use those values in place of any user-supplied arguments. For details
on the default values, see the documentation for the relevant connection
functions.
</para>
<warning>
<simpara>
This feature has been <emphasis>REMOVED</emphasis> as of PHP 7.2.0.
</simpara>
</warning>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ini.sect.windows">
<title>Windows Specific</title>
<para>
<table>
<title>Windows Specific Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.windows-show-crt-warning">windows.show_crt_warning</link></entry>
<entry>"0"</entry>
<entry><constant>INI_ALL</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.windows-show-crt-warning">
<term>
<parameter>windows.show_crt_warning</parameter>
<type>bool</type>
</term>
<listitem>
<para>
This directive shows the Windows CRT warnings when enabled.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|