[pmwiki-users] "Bug" when installing to a secure server?

Patrick R. Michaud pmichaud at pobox.com
Wed Dec 20 10:19:48 CST 2006


On Wed, Dec 20, 2006 at 03:17:17PM +0100, DFaure wrote:
> On 12/20/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Wed, Dec 20, 2006 at 02:20:18PM +0100, christian.ridderstrom at gmail.com 
> >wrote:
> >>
> >> However, is there a reason why pmwiki can't detect the 'https' and use
> >> that for $PubDirUrl? 
> >
> >This is PITS #00527 (http://www.pmwiki.org/wiki/PITS/00527).
> >
> >I can get PmWiki to automatically use https: instead of http:,
> >*IF* we can find a reliable way to detect when a server is being
> >accessed via https.  Supposedly IIS sets the HTTPS environment
> >variable to either "on" or "off".  I haven't found explicit
> >documentation of what Apache does -- if someone can point me to
> >that then I can make the appropriate changes to pmwiki.php.
> >
> According to:
> 
> http://www.modssl.org/docs/2.8/ssl_reference.html#ToC25
> http://httpd.apache.org/docs/2.2/mod/mod_ssl.html
> 
> and:
> 
> https://secure.salzburgresearch.at/admin/phpinfo.php
> 
> I think you may rely on the HTTPS environment variable.

Hmm.  It's annoying that none of the Apache/mod_ssl docs
actually say what value the HTTPS environment variable will 
be set to when running via a secure connection.  

But based on the phpinfo you've given above I guess we'll 
just assume 'https:' whenever $_SERVER['HTTPS'] is 'on', and
'http:' otherwise.

Thanks!

Pm




More information about the pmwiki-users mailing list