xref: /web-php/mailing-lists.php (revision ba72bc38)
1<?php
2$_SERVER['BASE_PAGE'] = 'mailing-lists.php';
3include_once __DIR__ . '/include/prepend.inc';
4include_once __DIR__ . '/include/posttohost.inc';
5include_once __DIR__ . '/include/email-validation.inc';
6
7$SIDEBAR_DATA = '
8<h3>Would like to unsubscribe yourself?</h3>
9
10<p>
11 If you have trouble getting off from any of our mailing lists, or
12 would like to unsubscribe from a mailing list not listed here, we
13 have more information for you on <a href="/unsub.php">the
14 unsubscription page</a>.
15</p>
16
17<h3>Other PHP related mailing lists</h3>
18
19<p>
20 Find the <a href="http://pear.php.net/support/lists.php">PEAR
21 lists</a> and the <a href="http://pecl.php.net/support.php">PECL
22 lists</a> on their own pages.
23</p>
24
25<a id="local"></a>
26<h3>Local Mailing Lists and Newsgroups</h3>
27
28<ul class="toc">
29 <li><a href="http://groups.google.com/group/dk.edb.internet.webdesign.serverside.php/topics">Danish Newsgroup</a></li>
30 <li><a href="http://groups.google.com/group/fr.comp.lang.php/topics">French Newsgroup</a></li>
31 <li><a href="http://lists.phpbar.de/mailman/listinfo">German Mailing List</a></li>
32 <li><a href="http://groups.google.com/group/de.comp.lang.php.misc/topics">German Newsgroup</a> (also other topics under de.comp.lang.php)</li>
33 <li><a href="http://groups.yahoo.com/group/php_greek/">Greek Mailing List</a></li>
34 <li><a href="http://weblabor.hu/levlistak">Hungarian Mailing List</a></li>
35 <li><a href="http://www.domeus.it/circles/php">Italian Mailing List (at PHPItalia)</a></li>
36 <li><a href="http://ml.php.gr.jp/">The Japanese PHP User Group\'s Mailing lists</a></li>
37 <li><a href="http://br.groups.yahoo.com/group/php-pt/">Portuguese Mailing List</a></li>
38</ul>
39';
40
41site_header("Mailing Lists", ["current" => "help"]);
42
43// Some mailing list is selected for [un]subscription
44if (isset($_POST['action'])) {
45
46    // No error found yet
47    $error = "";
48
49    // Check email address
50    if (empty($_POST['email']) || $_POST['email'] == 'user@example.com' ||
51        $_POST['email'] == 'fake@from.net' || !is_emailable_address($_POST['email'])) {
52        $error = "You forgot to specify an email address to be added to the list, or specified an invalid address." .
53                 "<br>Please go back and try again.";
54    }
55
56    // Check if any mailing list was selected
57    elseif (empty($_POST['maillist'])) {
58        $error = "You need to select at least one mailing list to subscribe to." .
59                 "<br>Please go back and try again.";
60    }
61
62    // Seems to be a valid email address
63    else {
64
65        // Decide on request mode, email address part and IP address
66        $request = strtolower($_POST['action']);
67        if ($request != "subscribe" && $request != "unsubscribe") {
68            $request = "subscribe";
69        }
70        $remote_addr = i2c_realip();
71
72        // Get in contact with main server to [un]subscribe the user
73        $result = posttohost(
74            "https://main.php.net/entry/subscribe.php",
75            [
76                "request" => $request,
77                "email" => $_POST['email'],
78                "maillist" => $_POST['maillist'],
79                "remoteip" => $remote_addr,
80                "referer" => $MYSITE . "mailing-lists.php",
81            ],
82        );
83
84        // Provide error if unable to [un]subscribe
85        if ($result) {
86            $error = "We were unable to subscribe you due to some technical problems.<br>" .
87                     "Please try again later.";
88        }
89    }
90
91    // Give error information or success report
92    if (!empty($error)) {
93        echo "<p class=\"formerror\">$error</p>";
94    } else {
95?>
96<p>
97 A request has been entered into the mailing list processing queue. You
98 should receive an email at <?php echo clean($_POST['email']); ?> shortly describing
99 how to complete your request.
100</p>
101<?php
102    }
103    site_footer();
104    exit;
105}
106
107// No form submitted
108?>
109<h1>Mailing Lists</h1>
110
111<p>
112 There are many PHP-related mailing lists available on our server.
113 Most of them are archived, and all of them are available as newsgroups
114 on our <a href="news://news.php.net">news server</a>. You can search
115 some mailing lists right from this website from <a href="/search.php">the
116 search page</a> or by using the search input box selecting the
117 appropriate option on the top-right of every page.
118</p>
119<p>
120 There is an experimental web interface for the news server at
121 <a href="http://news.php.net/">http://news.php.net/</a>, and
122 there are also other archives provided by
123 <a href="http://marc.info/">Marc</a>.
124</p>
125
126<h2>Mailing List Posting guidelines</h2>
127
128<p>
129 When posting to mailing lists or newsgroups, please keep the following in mind:
130</p>
131
132<ul>
133 <li>
134  Use a valid email address. Every new poster's email address
135  is checked for validity through confirmation.
136 </li>
137 <li>
138  Send plain ASCII messages, no HTML-formatted emails please.
139 </li>
140 <li>
141  Turn on word wrapping so your entire message doesn't show up on
142  a single line.
143 </li>
144 <li>
145  Be sure to click <strong>Reply-All</strong> to reply to list. Clicking
146  <strong>Reply</strong> will email the author of the message privately.
147 </li>
148 <li>
149  No attachments please, just post a URL if you want someone to
150  look at something.
151 </li>
152 <li>
153  Don't GPG/PGP sign your messages. If you want people to be able
154  to send you encrypted email, stick your key-locator in your signature
155 </li>
156 <li>
157  Don't hijack other peoples' threads. To post on a new topic, start
158  a new message, don't reply and just change the subject.
159 </li>
160 <li>
161  Check the archives before posting a question, chances are it has
162  already been asked and answered a few times.
163 </li>
164 <li>
165  When asking a question, don't just tell us, &quot;it doesn't work&quot;.
166  Tell us what you are trying to accomplish, a <strong>short</strong> code
167  snippet showing how you tried to solve it, what you expected to get and
168  what you got instead.
169 </li>
170</ul>
171<p>
172 And make sure you have read our
173 <a href="https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md">Mailinglist Rules</a>.
174</p>
175<?php
176
177  // array of lists (list, name, short desc., moderated, archive, digest, newsgroup)
178  $general_mailing_lists = [
179
180      'General mailing lists for PHP users',
181      [
182          'php-announce', 'Announcements',
183          'Announcements of new PHP releases are sent to this very low-volume list',
184          true, false, false, "php.announce",
185      ],
186      [
187          'php-general', 'General user list',
188          'This is a high volume list for general PHP support; ask PHP questions here',
189          false, true, true, "php.general",
190      ],
191      [
192          'php-windows', 'Windows PHP users list',
193          'Using PHP on Microsoft Windows',
194          false, true, true, "php.windows",
195      ],
196
197      'Subject specific lists for PHP users',
198      [
199          'php-install', 'Installation issues and problems',
200          'How to install PHP with particular configurations and servers',
201          false, true, true, "php.install",
202      ],
203      [
204          'php-db', 'Databases and PHP',
205          'This list is for the discussion of PHP database topics',
206          false, true, true, "php.db",
207      ],
208      'Non-English language mailing lists',
209      [
210          'php-es', 'Spanish PHP Mailing list',
211          'List for Spanish speaking people interested in PHP',
212          false, false, false, 'php.general.es',
213      ],
214
215  ];
216
217  // array of lists (list, name, short desc., moderated, archive, digest, newsgroup)
218  $internals_mailing_lists = [
219
220      'PHP and Zend Engine internals lists',
221      [
222          'internals', 'Internals list',
223          'A medium volume list for those who want to help out with the development of PHP',
224          false, 'php-internals', true, "php.internals",
225      ],
226      [
227          'internals-win', 'Windows Internals list',
228          'A low volume list for those who want to help out with the development of PHP on Windows',
229          false, false, true, "php.internals.win",
230      ],
231      [
232          'php-cvs', 'Git commit list',
233          'All commits to internals (php-src) and the Zend Engine are posted to this list automatically',
234          true, true, false, "php.cvs",
235      ],
236      [
237          'git-pulls', 'Git pull requests',
238          'Pull requests from Github',
239          false, false, false, "php.git-pulls",
240      ],
241      [
242          'php-qa', 'Quality Assurance list',
243          'List for the members of the PHP-QA Team',
244          false, true, false, "php.qa",
245      ],
246      [
247          'php-bugs', 'General bugs',
248          'General bug activity are posted here',
249          false, false, false, "php.bugs",
250      ],
251      [
252          'standards', 'PHP Standardization and interoperability list',
253          'Development of language standards',
254          false, false, false, "php.standards",
255      ],
256
257      'PHP internal website mailing lists',
258      [
259          'php-webmaster', 'PHP php.net internal infrastructure discussion',
260          'List for discussing and maintaining the php.net web infrastructure.<br>
261       For general PHP support questions, see "General Mailing Lists" or the <a href="/support.php">support page</a>',
262          false, false, false, "php.webmaster",
263      ],
264
265      'PHP documentation mailing lists',
266      [
267          'phpdoc', 'Documentation discussion',
268          'List for discussing the PHP documentation',
269          false, true, false, "php.doc",
270      ],
271      [
272          'doc-cvs', 'Documentation changes and commits',
273          'Changes to the documentation are posted here',
274          true, "php-doc-cvs", false, "php.doc.cvs",
275      ],
276      [
277          'doc-bugs', 'Documentation bugs',
278          'Documentation bug activity (translations, sources, and build system) are posted here',
279          true, 'php-doc-bugs', false, "php.doc.bugs",
280      ],
281  ];
282
283// Print out a table for a given list array
284function output_lists_table($mailing_lists): void
285{
286    echo '<table cellpadding="5" border="0" class="standard mailing-lists">', "\n";
287    foreach ($mailing_lists as $listinfo) {
288        if (!is_array($listinfo)) {
289            echo "<tr><th>{$listinfo}</th><th>Moderated</th><th>Archive</th>" .
290                 "<th>Newsgroup</th><th>Normal</th><th>Digest</th></tr>\n";
291        } else {
292            echo '<tr align="center">';
293            echo '<td align="left"><strong>' . $listinfo[1] . '</strong> <small>&lt;<a href="mailto:' . $listinfo[0] . '@lists.php.net">' . $listinfo[0] . '@lists.php.net</a>&gt;</small><br><small>' . $listinfo[2] . '</small></td>';
294            echo '<td>' . ($listinfo[3] ? 'yes' : 'no') . '</td>';
295
296            // Let the list name defined with a string, if the
297            // list is archived under a different name then php.net
298            // uses for it (for backward compatibilty for example)
299            if ($listinfo[4] !== false) {
300                $larchive = ($listinfo[4] === true ? $listinfo[0] : $listinfo[4]);
301            } else { $larchive = false; }
302            echo '<td>' . ($larchive ? "<a href=\"http://marc.info/?l={$larchive}\">yes</a>" : 'n/a') . '</td>';
303            echo '<td>' . ($listinfo[6] ? "<a href=\"news://news.php.net/{$listinfo[6]}\">yes</a> <a href=\"http://news.php.net/group.php?group={$listinfo[6]}\">http</a>" : 'n/a') . '</td>';
304            echo '<td><input name="maillist" type="radio" value="' . $listinfo[0] . '"></td>';
305            echo '<td>' . ($listinfo[5] ? '<input name="maillist" type="radio" value="' . $listinfo[0] . '-digest">' : 'n/a') . '</td>';
306            echo "</tr>\n";
307        }
308    }
309    echo "</table>\n";
310}
311
312?>
313
314<form method="post" action="/mailing-lists.php">
315
316<h2 id="general">General Mailing Lists</h2>
317
318<?php output_lists_table($general_mailing_lists); ?>
319
320<h2 id="internals">Internals Mailing Lists</h2>
321
322<?php output_lists_table($internals_mailing_lists); ?>
323
324<p class="center">
325 <strong>Email:</strong>
326 <input type="text" name="email" size="40" value="user@example.com">
327 <input type="submit" name="action" value="Subscribe">
328 <input type="submit" name="action" value="Unsubscribe">
329</p>
330
331</form>
332
333<p>
334 You will be sent a confirmation mail at the address you wish to
335 be subscribed or unsubscribed, and only added to the list after
336 following the directions in that mail.
337</p>
338
339<p>
340 <strong>Warning:</strong> The PHP users mailing list gets close to 1500-2000
341 messages per month currently. Do the math. That translates to about 60
342 messages per day. If your mailbox can't handle this sort of traffic you
343 might want to consider subscribing to the digest list instead (two messages
344 per day), using the news server, or reading the mailing list using the
345 archives.
346</p>
347
348<h2>Subscribe via Email</h2>
349
350<p>
351 If you experience trouble subscribing via the form above, you may also
352 subscribe by sending an email to the list server.
353 To subscribe to any mailing list, send an email to
354 <code><em>listname</em>+subscribe@lists.php.net</code>
355 (substituting the name of the list for <code><em>listname</em></code>
356 &mdash; for example, <code>php-general+subscribe@lists.php.net</code>).
357</p>
358
359<h2>Mailing list options</h2>
360
361<p>
362 All of the mailing lists hosted at <a
363 href="http://lists.php.net/">lists.php.net</a> are managed using the <a
364 href="http://mlmmj.org/">mlmmj</a> mailing list software.
365 There are a variety of commands you can use to modify your subscription.
366 For a full overview, send a message to <code>php-whatever+help@lists.php.net</code> (as in,
367 <code>php-general+help@lists.php.net</code>).</a>
368</p>
369
370<h3>Subscribing</h3>
371
372<ul>
373	<li>The normal mailing list, where you receive every message seperately:<br/>
374	Email: <code>php-<em>listname</em>+subscribe@lists.php.net</code></li>
375	<li>The daily digest list, where you receive an email with every message for a whole day at once:<br/>
376	Email: <code>php-<em>listname</em>+subscribe<b>-digest</b>@lists.php.net</code></li>
377	<li>The no email list, where you receive no emails from the list, but you can still post to it:<br/>
378	Email: <code>php-<em>listname</em>+subscribe<b>-nomail</b>@lists.php.net</code></li>
379</ul>
380
381<h3>Unsubscribing</h3>
382
383<p>
384Email: <code>php-<em>listname</em>+unsubscribe@lists.php.net</code>
385</p>
386
387<h3>Help</h3>
388
389<ul>
390	<li>For a FAQ (Frequently Asked Questions):<br/>
391	Email: <code>php-<em>listname</em>+help@lists.php.net</code></li>
392	<li>To reach an administrator:<br/>
393	Email: <code>php-<em>listname</em>+owner@lists.php.net</code></li>
394</ul>
395
396
397<?php site_footer(); ?>
398