[pmwiki-users] Enableing pmWiki for SSL

IchBin weconsul at ptd.net
Sun Apr 29 00:04:22 CDT 2007


I looked at the docs for using SSL in pmWiki. I found the pre version 
2.2.0-beta18 SwitchToSSLMode recipe. Also saw the
SwitchToSSLMode-Talk recipe.

I tried the SwitchToSSLMode SSL implementation in my config but received 
the following error:

Fatal error: Only variables can be passed by reference in 
C:\wwwroot\www\GlobalStudentsInc.com\local\config.php on line 222

line 222 => $ScriptUrl = str_replace('http:','https:',$ScriptUrl,1);
  	    $PubDirUrl = str_replace('http:','https:',$PubDirUrl,1);
    	    if ($_SERVER['SERVER_PORT'] != 443) {
      	        if (!@$pagename) { header("Location: $ScriptUrl");
      	           } else { Redirect($pagename); }
    	     }

I have <attached> the Xdebug information.

But I see in prior SSL questions, in the newsgroup, PM said that after 
version 2.2.0-beta18 you could just use this code:

     if ($UrlScheme != 'https:') {
       $ScriptUrl = str_replace($UrlScheme, 'https:', $ScriptUrl);
       if (!@$pagename) { header("Location: $ScriptUrl"); exit; }
       Redirect($pagename);
     }

Ok, with this code I can not connect to my apache server that is running 
on my machine. I am sure the https is setup on port 443 in the apache2 
conf.

I enter the link: http://68.83.247.195:80 and browser returns this 
modified link (I do notice the extra : in the URL):
http://68.83.247.195:80/https:://68.83.247.195:80/pmwiki.php

Then I get a "Forbidden You don't have permission to access 
/https:://68.83.247.195:80/pmwiki.php on this server."

I am running this pmWiki on a VirtualHost in my Apache config. What am I 
missing?

-- 
Thanks in Advance...           http://weconsultants.prophp.org
IchBin, Philadelphia, Pa, USA  http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070429/7894cc19/attachment-0001.htm 


More information about the pmwiki-users mailing list