[pmwiki-users] SSL Migration & Coexistance etc.

Peter Kay pkay42 at gmail.com
Mon Jun 5 13:28:07 CDT 2017


I know that for me, when I was a relative newbie, I would read through
default config files and just gloss right over anything I didn't
understand.  As I became more experienced, I found reading the notes
(# This setting allows....etc) very useful, especially for systems I
wasn't super familiar with.

It might be very valuable to have something like:
# Use UTF-8 encodings - new wikis should enable this
include_once("scripts/xlpage-utf-8.php");
# If you are running a farm, you'll need to use this instead:
# include_once("$FarmD/scripts/xlpage-utf-8.php");

A normal new user will happily accept the first line, whereas a more
experienced farm user will know what they're doing and uncomment the
second line - without having to go searching for an error message when
things break.  Having full options in the default config files has a
big advantage in that a user doesn't have to look at any other sources
besides the file they are editing.  I would tend to err on the side of
making things easy for an administrator to set up.

Very very few of us would be able to write a config file from scratch ;)

(Similarly, I might add the comment # You may also have relative URLs
for your $PubDirURL, but older browsers or screenreaders may not work
properly.  See tinurllink for more information.  For someone who knows
every single user of their site, that could be very useful, and
knowing it will work saves headache and work.  At the same time, if
someone wants to read more, a link provides information.)

--Peter


On Sun, Jun 4, 2017 at 12:59 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Sun, Jun 04, 2017 at 04:35:58PM +0200, Walter Keller wrote:
>>         $PubDirUrl = 'http://www.mydomain.com/path/to/pub';
>>    ===> $PubDirUrl = '//www.mydomain.com/path/to/pub';
>> By the definition of URIs, the browser use http: or https: as in the
>> current request and everything works like a charme.
>>
>> (1) I propose to change sample-config.php accordingly - or can anybody
>> see a disadvantage here?
>
> 1a.  Historically, some browsers and web consumers don't properly handle the '//...' link format.  Yes, technically such browsers are out of specification, but "your browser is out of spec" isn't exactly the message many sites want to be transmitting to their visitors.  And desktop browsers aren't the only consumers of web content -- we also have reader apps on smart phones, search engine spiders, site analysis tools, etc.
>
> PmWiki strives to follow a "strict in what it produces, liberal in what it accepts" philosophy.  The "strict" part of that implies that any urls we produce really ought to be as complete as possible.
>
> 1b.  There are a number of sites recommending against relative URLs:
>     https://jeremywagner.me/blog/stop-using-the-protocol-relative-url
>     https://www.paulirish.com/2010/the-protocol-relative-url/
>     http://www.dirigodev.com/blog/seo-web-best-practices/relative-vs-absolute-urls-seo/
>     https://moz.com/blog/relative-vs-absolute-urls-whiteboard-friday
>
> 1c.  The sample-config.php file serves several purposes; one of them is to help get things up and running quickly, and another is to educate.  A lot of newcomers aren't going to be familiar with the nuances of relative-scheme URLs, and are likelier to be confused upon seeing a "url" that doesn't include a scheme.  They might not even recognize it as a url.  In the interest of keeping sample-config.php as accessible to newcomers as possible, I'd prefer it to continue to use the full url.
>
> So, while I completely recognize the value of relative-scheme urls, I think its usage belongs in cookbook or discussion and not something that is considered a best default practice.  I totally accept that others' may have different views on this.
>
>> (3) while integrating the newest sample-config.php, I had to change
>>          include_once("scripts/xlpage-utf-8.php");
>>     ==>  include_once("$FarmD/scripts/xlpage-utf-8.php");
>>    I guess this is necessary for every wikifarm and should
>>    be changed in sample-config.php
>
> Again, sample-config.php's intended audience has traditionally been newcomers... and I really didn't want to burden a newcomer with "What's this $FarmD variable used for?!" when they're unlikely to be using a farm anyway for their initial setup.  If this change is made, it'd be the _only_ reference to $FarmD (or farming) inside of sample-config.php.  I think I'd rather keep the simplicity for now... someone who is building a WikiFarm will be able to figure out the need for $FarmD pretty quickly I think.  (Perhaps your experience here was otherwise.)
>
> Thanks for the excellent suggestions and analysis!
>
> Pm
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list