minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications /

Running basic installation of miniBB 2 with PHP version below 4.1.0

 
Paul
CEO
#1 | Posted: 11 Nov 2005 12:22 | Edited by: Paul
Reply 
As far as you might know, $_GET, $_POST, $_COOKIE, also as $_SESSION were introduced only in PHP 4.1.0. This is a minimum requirement for running miniBB 2. But anyway, if you have version below (I've implemented this in 4.0.6), there are 2 simple steps for doing that:

1) Edit setup_options.php and paste at the very top of it (before $DB='mysql'; ) the following code:


/* PHP 4.0.6 specific */

if(isset($HTTP_GET_VARS) and is_array($HTTP_GET_VARS) and sizeof($HTTP_GET_VARS)>0) foreach($HTTP_GET_VARS as $key=>$val) $GLOBALS['_GET'][$key]=$HTTP_GET_VARS[$key];

if(isset($HTTP_POST_VARS) and is_array($HTTP_POST_VARS) and sizeof($HTTP_POST_VARS)>0) foreach($HTTP_POST_VARS as $key=>$val) $GLOBALS['_POST'][$key]=$HTTP_POST_VARS[$key];

if(isset($HTTP_COOKIE_VARS) and is_array($HTTP_COOKIE_VARS) and sizeof($HTTP_COOKIE_VARS)>0) foreach($HTTP_COOKIE_VARS as $key=>$val) $GLOBALS['_COOKIE'][$key]=$HTTP_COOKIE_VARS[$key];

/* PHP 4.0.6 specific */


2) Edit bb_cookie.php and in getMyCookie() function, declare $_COOKIE variable as global:


function getMyCookie(){
global $_COOKIE;
...........


It seems, that's all...
_Marco
Forums Member
#2 | Posted: 29 Nov 2005 21:56
Reply 
Hi Paul,

As soon as I read this topic, I knew it would be the solution for my problem :-)
My official site runs on PHP 4.0.6. When I started testing the first time, I noticed the problem. The problem did not show on my test server (PHP 5.0.4). I decided that I would have to ask my hoster to move the website to another server, because of this issue (and some others). My website is running a few years now and the server is getting kinda old.

Today I tried it out (because of the preformatted text issue).

Could you please complete part 2 of this solution? Now it ends with ......... and I would not know how to complete the function getMyCookie(){ section or what lines to remove.

Thanks in advance.

_Marco
Team
8-)
#3 | Posted: 29 Nov 2005 22:24
Reply 
_Marco
You just need to paste global $_COOKIE; right after the line function getMyCookie(){ that's all.
_Marco
Forums Member
#4 | Posted: 29 Nov 2005 22:35
Reply 
It get's a kinda funny result.

1.) The forum does net remember my username/password
2.) The whoisonline plugin remembers every user I try. Now I'm online 3 times :-)

http://www.ohrj.net/young-ae.nl/index.php?

_Marco
Paul
CEO
#5 | Posted: 30 Nov 2005 11:27
Reply 
Unfortunatelly, I can not say exactly what the problem is, because I haven't such old version of PHP installed, and now it's not available for me anymore. If you could provide some temporary server details, probably I could check the reason more deeper. And be sure you have the latest miniBB version installed.
_Marco
Forums Member
#6 | Posted: 30 Nov 2005 18:49
Reply 
Okido, I will send you some details by email. Thanks.

_Marco
_Marco
Forums Member
#7 | Posted: 2 Dec 2005 17:31
Reply 
Good news and bad news.

Good news: I got it working on PHP 4.0.6 !
Today I have setup an account for Paul, with a clean miniBB 2.0 RC4c. After adding the code for 4.0.6 it worked!
After that I copied both adjusted files to my testforum on the same server. That worked too!

Bad news: I don't know what I did wrong before. The code is a 100% the same. The only difference are other settings in setup_options.php.

I will now adjust my new setup_options step by step, and report the result here.

Oh Boy I'm glad :-)

_Marco
_Marco
Forums Member
#8 | Posted: 2 Dec 2005 18:32
Reply 
hmpf, checked everything twice but it all seems ok now.
Maybe I just made a real stupid mistake :(

Sorry to bother you. If you like you can still get that testaccount on my server :)

_Marco
Paul
CEO
#9 | Posted: 4 Dec 2005 17:07
Reply 
That's ok if it's working :) You know I am busy person, so let's use your account next time, if needed. Cheers.
 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 26
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®