features/commandline.xml
74ba8fee2972b6ba4f955392d760dea54e757a95
74ba8fee2972b6ba4f955392d760dea54e757a95
...
...
@@ -5,7 +5,7 @@
5
5
<titleabbrev>Command line usage</titleabbrev>
6
6
7
7
<!--Introduction: {{{-->
8
-
<section xml:id="features.commandline.introduction">
8
+
<section xml:id="features.commandline.introduction" annotations="chunk:false">
9
9
<title>Introduction</title>
10
10
11
11
<para>
...
...
@@ -36,7 +36,7 @@
36
36
<option role="configure">--disable-cgi</option> option is used, the &cli; is
37
37
copied to <filename>{PREFIX}/bin/php</filename> during
38
38
<command>make install</command> otherwise the <acronym>CGI</acronym> is placed
39
-
there. So, for example, if <option role="configure">--with-apxs </option> is
39
+
there. So, for example, if <option role="configure">--with-apxs</option> is
40
40
in your configure line then the &cli; is copied to <filename>{PREFIX}/bin/php
41
41
</filename> during <command>make install</command>. If you want to override
42
42
the installation of the <acronym>CGI</acronym> binary, use <command>make
...
...
@@ -56,7 +56,7 @@
56
56
</note>
57
57
58
58
<para>
59
-
As of PHP 5, the &cli; binary is distributed in the main folder as <filename>
59
+
The &cli; binary is distributed in the main folder as <filename>
60
60
php.exe</filename> on Windows. The <acronym>CGI</acronym> version is
61
61
distributed as <filename>php-cgi.exe</filename>. Additionally, a <filename>
62
62
php-win.exe</filename> is distributed if PHP is configured using
...
...
@@ -139,7 +139,7 @@
139
139
<entry>&false;</entry>
140
140
<entry>
141
141
Defaults to &false;, as it can be quite hard to read error messages
142
-
in the shell enviroment when they are cluttered up with uninterpreted
142
+
in the shell environment when they are cluttered up with uninterpreted
143
143
<acronym>HTML</acronym> tags.
144
144
</entry>
145
145
</row>
...
...
@@ -182,6 +182,27 @@
182
182
also be found in the <varname>$_SERVER</varname> array, for example:
183
183
<varname>$_SERVER['argv']</varname>.
184
184
</para>
185
+
<warning>
186
+
<para>
187
+
The presence of <varname>$argv</varname> or <varname>$_SERVER['argv']</varname>
188
+
is not a reliable indication that a script is being run from the
189
+
command line because they may be set in other contexts when
190
+
<link linkend="ini.register-argc-argv">register_argc_argv</link> is enabled.
191
+
The value returned by <function>php_sapi_name</function> should be checked
192
+
instead.
193
+
<informalexample>
194
+
<programlisting role="php">
195
+
<![CDATA[
196
+
<?php
197
+
198
+
if (php_sapi_name() === 'cli') {
199
+
echo "This is being run from the command line!\n";
200
+
}
201
+
]]>
202
+
</programlisting>
203
+
</informalexample>
204
+
</para>
205
+
</warning>
185
206
</entry>
186
207
</row>
187
208
<row>
...
...
@@ -462,6 +483,7 @@ $ php -c /custom/directory/custom-file.ini my_script.php
462
483
</screen>
463
484
</para>
464
485
<para><example>
486
+
<title>Example of using <literal>-d</literal> to set an INI setting</title>
465
487
<screen>
466
488
<![CDATA[
467
489
# Omitting the value part will set the given configuration directive to "1"
...
...
@@ -506,13 +528,6 @@ string(15) "doesntmakesense"
506
528
<option>-f</option> is optional and may be omitted - providing just
507
529
the filename to execute is sufficient.
508
530
</para>
509
-
<note>
510
-
<para>
511
-
To pass arguments to a script, the first argument must be
512
-
<literal>--</literal>, otherwise PHP will interpret them as PHP
513
-
options.
514
-
</para>
515
-
</note>
516
531
</entry>
517
532
</row>
518
533
<row>
...
...
@@ -540,19 +555,28 @@ string(15) "doesntmakesense"
540
555
<entry>--syntax-check</entry>
541
556
<entry>
542
557
<para>
543
-
Provides a convenient way to perform only a syntax check
544
-
on the given PHP code. On success, the text
558
+
Syntax check but do not execute the given PHP code.
559
+
The input from standard input will be processed if no filenames are specified,
560
+
otherwise each filename will be checked.
561
+
On success, the text
545
562
<literal>No syntax errors detected in <filename></literal> is
546
-
written to standard output and the shell return code is
547
-
<literal>0</literal>. On failure, the text <literal>Errors parsing
548
-
<filename></literal> in addition to the internal parser error
549
-
message is written to standard output and the shell return code is set
550
-
to <literal>-1</literal>.
563
+
written to standard output.
564
+
On failure, the text <literal>Errors parsing <filename></literal>
565
+
is written to standard output in addition to the internal parser error.
566
+
If any failures are found in the specified files (or standard input),
567
+
the shell return code is set to <literal>-1</literal>, otherwise the
568
+
shell return code is set to <literal>0</literal>.
551
569
</para>
552
570
<para>
553
-
This option won't find fatal errors (like undefined functions). Use
554
-
the <option>-f</option> to test for fatal errors too.
571
+
This option won't find fatal errors (like undefined functions) that
572
+
require executing the code.
555
573
</para>
574
+
<note>
575
+
<para>
576
+
Prior to PHP 8.3.0, it was only possible to specify one filename to
577
+
be checked.
578
+
</para>
579
+
</note>
556
580
<note>
557
581
<para>
558
582
This option does not work together with the <option>-r</option>
...
...
@@ -660,7 +684,7 @@ array(370) {
660
684
experienced - if appropriate, a bug report should be opened at
661
685
<link xlink:href="&url.php.bugs;">&url.php.bugs;</link>.
662
686
It is still easy to run into trouble when trying to use variables
663
-
(shell or PHP) in commnad-line code, or using backslashes for
687
+
(shell or PHP) in command-line code, or using backslashes for
664
688
escaping, so take great care when doing so. You have been warned!
665
689
</para>
666
690
</note>
...
...
@@ -686,7 +710,7 @@ array(370) {
686
710
<entry>--process-begin</entry>
687
711
<entry>
688
712
<para>
689
-
PHP code to execute before processing stdin. Added in PHP 5.
713
+
PHP code to execute before processing stdin.
690
714
</para>
691
715
</entry>
692
716
</row>
...
...
@@ -695,7 +719,7 @@ array(370) {
695
719
<entry>--process-code</entry>
696
720
<entry>
697
721
<para>
698
-
PHP code to execute for every input line. Added in PHP 5.
722
+
PHP code to execute for every input line.
699
723
</para>
700
724
<para>
701
725
There are two special variables available in this mode:
...
...
@@ -711,7 +735,7 @@ array(370) {
711
735
<entry>--process-file</entry>
712
736
<entry>
713
737
<para>
714
-
PHP file to execute for every input line. Added in PHP 5.
738
+
PHP file to execute for every input line.
715
739
</para>
716
740
</entry>
717
741
</row>
...
...
@@ -720,7 +744,7 @@ array(370) {
720
744
<entry>--process-end</entry>
721
745
<entry>
722
746
<para>
723
-
PHP code to execute after processing the input. Added in PHP 5.
747
+
PHP code to execute after processing the input.
724
748
</para>
725
749
<para><example>
726
750
<title>Using the <option>-B</option>, <option>-R</option> and
...
...
@@ -742,7 +766,7 @@ Total Lines: 37328
742
766
<entry>
743
767
<para>
744
768
Starts <link linkend="features.commandline.webserver">built-in web
745
-
server</link>. Available as of PHP 5.4.0.
769
+
server</link>.
746
770
</para>
747
771
</entry>
748
772
</row>
...
...
@@ -752,7 +776,6 @@ Total Lines: 37328
752
776
<entry>
753
777
Specifies document root for <link
754
778
linkend="features.commandline.webserver">built-in web server</link>.
755
-
Available as of PHP 5.4.0.
756
779
</entry>
757
780
</row>
758
781
<row>
...
...
@@ -830,8 +853,7 @@ Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
830
853
<entry>--ini</entry>
831
854
<entry>
832
855
<para>
833
-
Show configuration file names and scanned directories. Available as
834
-
of PHP 5.2.3.
856
+
Show configuration file names and scanned directories.
835
857
<example>
836
858
<title><literal>--ini</literal> example</title>
837
859
<programlisting role="shell">
...
...
@@ -853,7 +875,7 @@ Additional .ini files parsed: (none)
853
875
<entry>
854
876
<para>
855
877
Show information about the given function or class method (e.g.
856
-
number and name of the parameters). Available as of PHP 5.1.2.
878
+
number and name of the parameters).
857
879
</para>
858
880
<para>
859
881
This option is only available if PHP was compiled with
...
...
@@ -884,7 +906,7 @@ Function [ <internal> public function var_dump ] {
884
906
<entry>
885
907
<para>
886
908
Show information about the given class (list of constants, properties
887
-
and methods). Available as of PHP 5.1.2.
909
+
and methods).
888
910
</para>
889
911
<para>
890
912
This option is only available if PHP was compiled with
...
...
@@ -933,7 +955,7 @@ Class [ <internal:standard> class Directory ] {
933
955
<entry>
934
956
<para>
935
957
Show information about the given extension (list of &php.ini; options,
936
-
defined functions, constants and classes). Available as of PHP 5.1.2.
958
+
defined functions, constants and classes).
937
959
</para>
938
960
<para>
939
961
This option is only available if PHP was compiled with
...
...
@@ -967,7 +989,6 @@ Extension [ <persistent> extension #19 json version 1.2.1 ] {
967
989
<para>
968
990
Show the configuration information for the given Zend extension (the
969
991
same information that is returned by <function>phpinfo</function>).
970
-
Available as of PHP 5.4.0.
971
992
</para>
972
993
</entry>
973
994
</row>
...
...
@@ -978,7 +999,7 @@ Extension [ <persistent> extension #19 json version 1.2.1 ] {
978
999
<para>
979
1000
Show the configuration information for the given extension (the same
980
1001
information that is returned by <function>phpinfo</function>).
981
-
Available as of PHP 5.2.2. The core configuration information
1002
+
The core configuration information
982
1003
is available using "main" as extension name.
983
1004
</para>
984
1005
<para>
...
...
@@ -1049,12 +1070,6 @@ $ php -f my_script.php
1049
1070
restriction on which files can be executed; in particular, the filename
1050
1071
is not required have a <literal>.php</literal> extension.
1051
1072
</para>
1052
-
<note>
1053
-
<para>
1054
-
If arguments need to be passed to the script when using
1055
-
<option>-f</option>, the first argument must be <literal>--</literal>.
1056
-
</para>
1057
-
</note>
1058
1073
</listitem>
1059
1074
<listitem>
1060
1075
<para>
...
...
@@ -1110,8 +1125,8 @@ $ some_application | some_filter | php | sort -u > final_output.txt
1110
1125
first index (zero) always contains the name of the script as called from the
1111
1126
command line. Note that, if the code is executed in-line using the command
1112
1127
line switch <option>-r</option>, the value of <varname>$argv[0]</varname>
1113
-
will be just a dash (<literal>-</literal>). The same is true if the code is
1114
-
executed via a pipe from <literal>STDIN</literal>.
1128
+
will be <literal>"Standard input code"</literal>; prior to PHP 7.2.0, it was a dash (<literal>"-"</literal>) instead. The same is true if the code is
1129
+
executed via a pipe from <constant>STDIN</constant>.
1115
1130
</para>
1116
1131
1117
1132
<para>
...
...
@@ -1267,7 +1282,7 @@ This is a command line PHP script with one option.
1267
1282
<para>
1268
1283
<example>
1269
1284
<title>Batch file to run a command line PHP script (script.bat)</title>
1270
-
<programlisting role="shell">
1285
+
<programlisting role="winbat">
1271
1286
<![CDATA[
1272
1287
@echo OFF
1273
1288
"C:\php\php.exe" script.php %*
...
...
@@ -1295,6 +1310,14 @@ This is a command line PHP script with one option.
1295
1310
extension, as described in <link linkend="install.windows.commandline">Command
1296
1311
Line PHP on Microsoft Windows</link>.
1297
1312
</para>
1313
+
1314
+
<note>
1315
+
<para>
1316
+
On Windows it is recommended to run PHP under an actual user account.
1317
+
When running under a network service certain operations will fail, because
1318
+
"No mapping between account names and security IDs was done".
1319
+
</para>
1320
+
</note>
1298
1321
</section>
1299
1322
<!--}}}-->
1300
1323
...
...
@@ -1405,9 +1428,11 @@ php -r 'fwrite(STDERR, "stderr\n");'
1405
1428
<title>Interactive shell</title>
1406
1429
1407
1430
<para>
1408
-
As of PHP 5.1.0, the &cli.sapi; provides an interactive shell using the
1431
+
The &cli.sapi; provides an interactive shell using the
1409
1432
<option>-a</option> option if PHP is compiled with the <option
1410
1433
role="configure">--with-readline</option> option.
1434
+
As of PHP 7.1.0 the interactive shell is also available on Windows, if the
1435
+
<link linkend="book.readline">readline extension</link> is enabled.
1411
1436
</para>
1412
1437
1413
1438
<para>
...
...
@@ -1475,14 +1500,16 @@ php > $foo[TAB]ThisIsAReallyLongVariableName
1475
1500
</programlisting>
1476
1501
</example>
1477
1502
1478
-
<para>
1503
+
<simpara>
1479
1504
The interactive shell stores your history which can be accessed using the up
1480
1505
and down keys. The history is saved in the
1481
1506
<filename>~/.php_history</filename> file.
1482
-
</para>
1507
+
As of PHP 8.4.0, the path to the history file can be set using the
1508
+
<envar>PHP_HISTFILE</envar> environment variable.
1509
+
</simpara>
1483
1510
1484
1511
<para>
1485
-
As of PHP 5.4.0, the &cli.sapi; provides
1512
+
The &cli.sapi; provides
1486
1513
the &php.ini; settings <parameter>cli.pager</parameter> and
1487
1514
<parameter>cli.prompt</parameter>. The <parameter>cli.pager</parameter>
1488
1515
setting allows an external program (such as <filename>less</filename>) to
...
...
@@ -1492,7 +1519,7 @@ php > $foo[TAB]ThisIsAReallyLongVariableName
1492
1519
</para>
1493
1520
1494
1521
<para>
1495
-
In PHP 5.4.0 it was also made possible to set
1522
+
It is also possible to set
1496
1523
&php.ini; settings in the interactive shell using a shorthand notation.
1497
1524
</para>
1498
1525
...
...
@@ -1588,12 +1615,31 @@ php >
1588
1615
</para>
1589
1616
</note>
1590
1617
1591
-
<note>
1618
+
<section xml:id="features.commandline.interactive.mode">
1619
+
<title>Interactive mode</title>
1592
1620
<para>
1593
-
<link linkend="language.oop5.autoload">Autoloading</link> is not
1594
-
available if using PHP in &cli; interactive mode.
1621
+
If the readline extension is not available, prior to PHP 8.1.0, invoking the &cli.sapi; with the
1622
+
<option>-a</option> option provided the interactive mode. In this mode, a
1623
+
complete PHP script is supposed to be given via STDIN, and after termination
1624
+
with
1625
+
<keycombo action='simul'>
1626
+
<keycap>CTRL</keycap>
1627
+
<keycap>D</keycap>
1628
+
</keycombo>
1629
+
(POSIX) or
1630
+
<keycombo action='simul'>
1631
+
<keycap>CTRL</keycap>
1632
+
<keycap>Z</keycap>
1633
+
</keycombo>
1634
+
followed by <keycap>ENTER</keycap> (Windows), this script is evaluated.
1635
+
This is basically the same as invoking the &cli.sapi; without the <option>-a</option>
1636
+
option.
1595
1637
</para>
1596
-
</note>
1638
+
<para>
1639
+
As of PHP 8.1.0, invoking the &cli.sapi; with the <option>-a</option> option
1640
+
fails, if the readline extension is not available.
1641
+
</para>
1642
+
</section>
1597
1643
</section>
1598
1644
<!--}}}-->
1599
1645
...
...
@@ -1603,7 +1649,7 @@ php >
1603
1649
1604
1650
<warning>
1605
1651
<para>
1606
-
This web server was designed to aid application development. It may also
1652
+
This web server is designed to aid application development. It may also
1607
1653
be useful for testing purposes or for application demonstrations that are
1608
1654
run in controlled environments. It is not intended to be a full-featured
1609
1655
web server. It should not be used on a public network.
...
...
@@ -1611,11 +1657,12 @@ php >
1611
1657
</warning>
1612
1658
1613
1659
<para>
1614
-
As of PHP 5.4.0, the &cli.sapi; provides a built-in web server.
1660
+
The &cli.sapi; provides a built-in web server.
1615
1661
</para>
1616
1662
1617
1663
<para>
1618
-
PHP applications will stall if a request is blocked.
1664
+
The web server runs only one single-threaded process, so
1665
+
PHP applications will stall if a request is blocked.
1619
1666
</para>
1620
1667
1621
1668
<para>
...
...
@@ -1623,8 +1670,11 @@ php >
1623
1670
PHP was started, unless the -t option is used to specify an
1624
1671
explicit document root. If a URI request does not specify a file,
1625
1672
then either index.php or index.html in the given directory are
1626
-
returned. If neither file exists, then a 404 response code is
1627
-
returned.
1673
+
returned. If neither file exists, the lookup for index.php and index.html
1674
+
will be continued in the parent directory and so on until one is found or
1675
+
the document root has been reached. If an index.php or index.html is found,
1676
+
it is returned and $_SERVER['PATH_INFO'] is set to the trailing part of
1677
+
the URI. Otherwise a 404 response code is returned.
1628
1678
</para>
1629
1679
1630
1680
<para>
...
...
@@ -1636,61 +1686,82 @@ php >
1636
1686
</para>
1637
1687
1638
1688
<para>
1639
-
Standard MIME types are returned for files with extensions: .3gp,
1640
-
.apk, .avi, .bmp, .css, .csv, .doc, .docx, .flac, .gif, .gz,
1641
-
.gzip, .htm, .html, .ics, .jpe, .jpeg, .jpg, .js, .kml, .kmz,
1642
-
.m4a, .mov, .mp3, .mp4, .mpeg, .mpg, .odp, .ods, .odt, .oga, .ogg,
1643
-
.ogv, .pdf, .pdf, .png, .pps, .pptx, .qt, .svg, .swf, .tar, .text,
1644
-
.tif, .txt, .wav, .webm, .wmv, .xls, .xlsx, .xml, .xsl, .xsd, and .zip.
1689
+
Standard MIME types are returned for files with extensions:
1690
+
<simplelist type="inline">
1691
+
<member><literal>.3gp</literal></member>
1692
+
<member><literal>.apk</literal></member>
1693
+
<member><literal>.avi</literal></member>
1694
+
<member><literal>.bmp</literal></member>
1695
+
<member><literal>.css</literal></member>
1696
+
<member><literal>.csv</literal></member>
1697
+
<member><literal>.doc</literal></member>
1698
+
<member><literal>.docx</literal></member>
1699
+
<member><literal>.flac</literal></member>
1700
+
<member><literal>.gif</literal></member>
1701
+
<member><literal>.gz</literal></member>
1702
+
<member><literal>.gzip</literal></member>
1703
+
<member><literal>.htm</literal></member>
1704
+
<member><literal>.html</literal></member>
1705
+
<member><literal>.ics</literal></member>
1706
+
<member><literal>.jpe</literal></member>
1707
+
<member><literal>.jpeg</literal></member>
1708
+
<member><literal>.jpg</literal></member>
1709
+
<member><literal>.js</literal></member>
1710
+
<member><literal>.kml</literal></member>
1711
+
<member><literal>.kmz</literal></member>
1712
+
<member><literal>.m4a</literal></member>
1713
+
<member><literal>.mov</literal></member>
1714
+
<member><literal>.mp3</literal></member>
1715
+
<member><literal>.mp4</literal></member>
1716
+
<member><literal>.mpeg</literal></member>
1717
+
<member><literal>.mpg</literal></member>
1718
+
<member><literal>.odp</literal></member>
1719
+
<member><literal>.ods</literal></member>
1720
+
<member><literal>.odt</literal></member>
1721
+
<member><literal>.oga</literal></member>
1722
+
<member><literal>.ogg</literal></member>
1723
+
<member><literal>.ogv</literal></member>
1724
+
<member><literal>.pdf</literal></member>
1725
+
<member><literal>.png</literal></member>
1726
+
<member><literal>.pps</literal></member>
1727
+
<member><literal>.pptx</literal></member>
1728
+
<member><literal>.qt</literal></member>
1729
+
<member><literal>.svg</literal></member>
1730
+
<member><literal>.swf</literal></member>
1731
+
<member><literal>.tar</literal></member>
1732
+
<member><literal>.text</literal></member>
1733
+
<member><literal>.tif</literal></member>
1734
+
<member><literal>.txt</literal></member>
1735
+
<member><literal>.wav</literal></member>
1736
+
<member><literal>.webm</literal></member>
1737
+
<member><literal>.wmv</literal></member>
1738
+
<member><literal>.xls</literal></member>
1739
+
<member><literal>.xlsx</literal></member>
1740
+
<member><literal>.xml</literal></member>
1741
+
<member><literal>.xsl</literal></member>
1742
+
<member><literal>.xsd</literal></member>
1743
+
<member><literal>.zip</literal></member>
1744
+
</simplelist>
1745
+
.
1645
1746
</para>
1646
1747
1647
-
1648
-
<table>
1649
-
<title>Changelog: Supported MIME Types (file extensions)</title>
1650
-
<tgroup cols="2">
1651
-
<thead>
1652
-
<row>
1653
-
<entry>&Version;</entry>
1654
-
<entry>&Description;</entry>
1655
-
</row>
1656
-
</thead>
1657
-
<tbody>
1658
-
<row>
1659
-
<entry>5.5.12</entry>
1660
-
<entry>
1661
-
.xml, .xsl, and .xsd
1662
-
</entry>
1663
-
</row>
1664
-
<row>
1665
-
<entry>5.5.7</entry>
1666
-
<entry>
1667
-
.3gp, .apk, .avi, .bmp, .csv, .doc, .docx, .flac, .gz, .gzip,
1668
-
.ics, .kml, .kmz, .m4a, .mp3, .mp4, .mpg, .mpeg, .mov, .odp, .ods,
1669
-
.odt, .oga, .pdf, .pptx, .pps, .qt, .swf, .tar, .text, .tif, .wav,
1670
-
.wmv, .xls, .xlsx, and .zip
1671
-
</entry>
1672
-
</row>
1673
-
<row>
1674
-
<entry>5.5.5</entry>
1675
-
<entry>
1676
-
.pdf
1677
-
</entry>
1678
-
</row>
1679
-
<row>
1680
-
<entry>5.4.11</entry>
1681
-
<entry>
1682
-
.ogg, .ogv, and .webm
1683
-
</entry>
1684
-
</row>
1685
-
<row>
1686
-
<entry>5.4.4</entry>
1687
-
<entry>
1688
-
.htm and .svg
1689
-
</entry>
1690
-
</row>
1691
-
</tbody>
1692
-
</tgroup>
1693
-
</table>
1748
+
<simpara>
1749
+
As of PHP 7.4.0, the built-in webserver can be configured to fork multiple
1750
+
workers in order to test code that requires multiple concurrent requests
1751
+
to the built-in webserver.
1752
+
Set the <envar>PHP_CLI_SERVER_WORKERS</envar> environment variable to the
1753
+
number of desired workers before starting the server.
1754
+
</simpara>
1755
+
<note>
1756
+
<simpara>This feature is not supported on Windows.</simpara>
1757
+
</note>
1758
+
<warning>
1759
+
<para>
1760
+
This <emphasis>experimental</emphasis> feature is <emphasis>not</emphasis>
1761
+
intended for production usage. Generally, the built-in Web Server is
1762
+
<emphasis>not</emphasis> intended for production usage.
1763
+
</para>
1764
+
</warning>
1694
1765
1695
1766
<example>
1696
1767
<title>Starting the web server</title>
...
...
@@ -1729,6 +1800,10 @@ Press Ctrl-C to quit.
1729
1800
[Thu Jul 21 10:48:52 2011] ::1:39149 GET /favicon.ico - Request read
1730
1801
]]>
1731
1802
</screen>
1803
+
<para>
1804
+
Note that prior to PHP 7.4.0, symlinked statical resources have not been
1805
+
accessible on Windows, unless the router script would handle these.
1806
+
</para>
1732
1807
</example>
1733
1808
1734
1809
<example>
...
...
@@ -1825,14 +1900,19 @@ $ php -S localhost:8000 router.php
1825
1900
1826
1901
<example>
1827
1902
<title>Accessing the CLI Web Server From Remote Machines</title>
1828
-
<para>
1829
-
You can make the web server accessible on port 8000 to any interface with:
1830
-
</para>
1903
+
<para>
1904
+
You can make the web server accessible on port 8000 to any interface with:
1905
+
</para>
1831
1906
<programlisting role="shell">
1832
1907
<![CDATA[
1833
1908
$ php -S 0.0.0.0:8000
1834
1909
]]>
1835
1910
</programlisting>
1911
+
<warning>
1912
+
<para>
1913
+
The built-in Web Server should not be used on a public network.
1914
+
</para>
1915
+
</warning>
1836
1916
</example>
1837
1917
1838
1918
</section>
...
...
@@ -1852,12 +1932,12 @@ $ php -S 0.0.0.0:8000
1852
1932
<entry>&Changelog;</entry>
1853
1933
</row>
1854
1934
</thead>
1855
-
<tbody>
1935
+
<tbody xml:id="features.commandline.ini.list">
1856
1936
<row>
1857
1937
<entry><link linkend="ini.cli-server.color">cli_server.color</link></entry>
1858
1938
<entry>"0"</entry>
1859
-
<entry>PHP_INI_ALL</entry>
1860
-
<entry>Available since PHP 5.4.0.</entry>
1939
+
<entry><constant>INI_ALL</constant></entry>
1940
+
<entry></entry>
1861
1941
</row>
1862
1942
</tbody>
1863
1943
</tgroup>
...
...
@@ -1871,7 +1951,7 @@ $ php -S 0.0.0.0:8000
1871
1951
<varlistentry xml:id="ini.cli-server.color">
1872
1952
<term>
1873
1953
<parameter>cli_server.color</parameter>
1874
-
<type>boolean</type>
1954
+
<type>bool</type>
1875
1955
</term>
1876
1956
<listitem>
1877
1957
<para>
1878
1958