xref: /web-php/mirroring-troubles.php (revision d9be047d)
1<?php
2$_SERVER['BASE_PAGE'] = 'mirroring-troubles.php';
3include_once __DIR__ . '/include/prepend.inc';
4
5$SIDEBAR_DATA = '
6<h3>Other mirror information</h3>
7<p>
8 See also the instructions for <a href="/mirroring.php">setting up a mirror</a>.
9</p>
10';
11
12site_header("The PHP mirrors problem and troubleshooting guide", ["current" => "help"]);
13?>
14
15<h1>Common troubles that mirrors of PHP.net face</h1>
16<p>
17 Mirroring the PHP.net website requires a few specific settings and
18 considerations, and this document provides a list of problems with possible
19 solutions. The [<strong>?</strong>] link within each title may be used to
20 test this mirror.
21</p>
22
23<a name="multiviews"></a>
24<h3>MultiViews are on [<a href="/functions">?</a>]</h3>
25<p>
26 Because the 'Options' directive may be ignored in VirtualHost, a
27 solution is to move the MultiViews option into a specific
28 directory and disable it from there. For example:
29</p>
30<pre class="info">
31  &lt;VirtualHost *:80&gt;
32    &lt;Directory /path/to/phpweb&gt;
33      Options -Indexes -MultiViews
34    &lt;/Directory&gt;
35
36    DocumentRoot /path/to/phpweb
37    ServerName ....
38    ....
39  &lt;/VirtualHost&gt;
40</pre>
41<p>
42 The <a href="mirroring.php#settings">mirror settings</a> example also
43 demonstrates this use. See also the Apache documentation that describes
44 <a href="http://httpd.apache.org/docs/content-negotiation.html">
45 Content Negotiation</a>.
46</p>
47
48<a name="content-type"></a>
49<h3>Improper Content-Type [<a href="/manual/en/faq.html.php">?</a>]</h3>
50<p>
51 Some pages are returning incorrect <code>Content-Type</code> headers. For example,
52 xx.php.net/manual/en/faq.html.php should be returning <code>text/html</code>
53 instead of <code>application/x-httpd-php</code>. See also the Apache
54 documentation describing
55 <a href="http://httpd.apache.org/docs/content-negotiation.html">Content
56 Negotiation</a>. This problem might be specific to
57 <a href="http://apache.lexa.ru/">Russian Apache</a>.
58</p>
59
60<a name="manual-redirect"></a>
61<h3>Manual redirects [<a href="/manual/">?</a>]</h3>
62<p>
63 By default, Apache inserts an alias for <code>/manual/</code> in the configuration
64 and this causes problems for mirrors. So for example if you find that
65 the manuals are listed on the documentation page but all of the links
66 open up a search page, you probably suffer from this problem and must
67 remove that alias.
68</p>
69
70<a name="shortcuts"></a>
71<h3>Broken manual shortcuts [<a href="/echo">?</a>]</h3>
72<p>
73 If the shortcut features [e.g. xx.php.net/echo] are not working, be sure
74 the manual files are really under <code>DOCUMENT_ROOT</code> and that the English
75 manual files are present. Also make sure that you have a correct
76 ErrorDocument setting.
77</p>
78
79<a name="invalid-data"></a>
80<h3>Invalid data types [<a href="/testing">?</a>]</h3>
81<p>
82 Invalid data is being received, and this is probably caused by improper error
83 handler settings. See the <a href="mirroring.php">mirror guidelines</a>
84 for how to setup the ErrorDocument.
85</p>
86
87<a name="var"></a>
88<h3>A misguided var handler [<a href="/manual/en/ref.var.php">?</a>]</h3>
89<p>
90 The <a href="mirroring.php">mirroring guidelines</a> mention that Apache2
91 enables a 'var' handler by default and this may be disabled by using
92 <code>RemoveHandler var</code> in the configuration file.
93</p>
94
95<a name="msi"></a>
96<h3>Mishandling of .msi files</h3>
97<p>
98 When improperly set, users are not given a "download this file" prompt
99 when attempting to download the PHP Installer (a .msi file). Your web
100 server configuration should be adjusted to force .msi files as
101 'application/octet-stream'. In Apache this may be done by using:
102 <code>AddType application/octet-stream .msi</code>
103</p>
104
105<a name="outbound"></a>
106<h3>Unable to do external searches [<a href="results.php?q=curl&p=manual&l=en">?</a>]</h3>
107<p>
108 Several searches require outbound connections to www.php.net, so this is
109 a test for that. The www.php.net box then connects to a third-party search engine.
110</p>
111
112<?php
113site_footer();
114