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

DFaure pmwiki-users at mailinator.com
Wed Dec 20 08:17:17 CST 2006


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:
> > While looking at the directory strcuture, I noticed that the link to the
> > style sheet by default isn't set correctly. You get
> >
> >   <link rel='stylesheet'
> >       href='http://<DOMAIN>/pmwiki/pub/skins/pmwiki/pmwiki.css'
> >       type='text/css' />
> >
> > even though the URI to pmwiki.php uses 'https' rather than 'http', i.e.
> >
> >       https://<DOMAIN>/pmwiki/pmwiki.php
> >
> > The installation can be fixed by adding to config.php something like
> >
> >       $ScriptUrl = 'https://<DOMAIN>/pmwiki/pmwiki.php';
> >       $PubDirUrl = 'https://<DOMAIN>/pmwiki/pub';
> >
> > However, is there a reason why pmwiki can't detect the 'https' and use
> > that for $PubDirUrl? I noticed that 'http:' is hardcoded in pmwiki.php:
> >
> > $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
> > $PubDirUrl = preg_replace('#/[^/]*$#','/pub',$ScriptUrl,1);
> >
> > So, is there some way to make pmwiki do this better?
>
> 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.

;)
Dom




More information about the pmwiki-users mailing list