Firefox PHP

http and https: simple hack to admin/settings.php

Posted by krejtep 
All files from this thread

File Name File Size   Posted by Date  
settings.php.diff.txt 769 bytes open | download krejtep 05/18/2006 Read message
http and https: simple hack to admin/settings.php
May 18, 2006 08:50PM
I use phorum3 on a site and am setting up phorum5 on another. In the previous case I found that requiring (via apache mod_rewrite) users accessing the site from outside our domain to use the https protocol cut the spam were we getting to a trickle. (We allow anonymous posting). When I was playing with phorum5 it turned out that I was unable to login as a normal user over https because http_path was set to
[host.domain] We need our moderators to be able to login remotely.

So I decided I wanted http_path to be a relative url. The admin GUI did not allow this and when I went into the database and changed it by hand:

update phorum_settings set data='/forums' where name = 'http_path';

This broke the admin GUI as it would trigger the error

"The provided HTTP Path is not a valid URL."

whenever an additional change was attempted.

Not being able to find any obvious way to achieve the desired modification with a mod hook I modified include/admin/settings.php
to allow any URL beginning w/ "/"

unified diff attached

I am still quite unfamiliar w/this version of phorum (version 5.1.12), and realize that there may be a more upgrade friendly way to achieve the
desired result.


(BTW: preview did not work for me here, was it because of the attachment?)
open | download - settings.php.diff.txt (769 bytes)
Re: http and https: simple hack to admin/settings.php
May 18, 2006 11:58PM
Not really. I just wrote a common hook module to alter the URL on the fly for the site I have that uses two URLs. Just hard coded the suckers. Just use one in the admin and then the common hook module can overwrite it if needed.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: http and https: simple hack to admin/settings.php
May 19, 2006 07:46PM
thanks, I've followed your suggestion. My solution above had an unexpected problem: moderation emails contained the relative path rather than the full url.

Sorry, only registered users may post in this forum.

Click here to login