[pmwiki-users] Enableing pmWiki for SSL
IchBin
weconsul at ptd.net
Sun Apr 29 22:41:00 CDT 2007
H. Fox wrote:
> On 4/28/07, IchBin <weconsul at ptd.net> wrote:
>> 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);
>
> I don't think this has anything to do with the recipe at
>
> http://www.pmwiki.org/wiki/Cookbook/SwitchToSSLMode
>
> which doesn't use str_replace. It looks like something from the
> (very) old recipe that was in the PmWiki V1 Cookbook.
>
> Try the current version of the recipe.
>
> Hagan
Thanks for helping..
Yes the SwitchToSSLMode I initial tried was for a prior version. I still
have problems with the below code that PM suggested as mentioned in the
prior message.
if ($UrlScheme != 'https:') {
$ScriptUrl = str_replace($UrlScheme, 'https:', $ScriptUrl);
if (!@$pagename) { header("Location: $ScriptUrl"); exit; }
Redirect($pagename);
}
I tried the more current version of SwitchToSSLMode and I am not getting
any errors. My expectation was to see the http reference changed to
https. I did not see that happen.
Problem is when I first check for
$_SERVER['HTTPS'] = 0 or
$_SERVER['SERVER_PORT'] == '443'
I do not get a hit on either checks so the URL is not updated to use
'HTTPS:'.
Just do not understand. The prior examples would automatically change
the URL's HTTP to HTTPS which this code is not doing. I need to find out
where $_SERVER['HTTPS'] and and $_SERVER['SERVER_PORT'] are loaded. And
where is this information coming from. Would it be from my Apache
server? I do not see them on a phpinfo().
Also if I go to a browser and manual enter my URL HTTP I get an error:
Error! Access to this port is disabled for security reasons
You tried to access the address https://68.83.247.195
--
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-)
More information about the pmwiki-users
mailing list