miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Running basic installation of miniBB 2 with PHP version below 4.1.0

Author Paul
Lead Developer
#1 | Posted: 11 Nov 2005 12:22 | Edited by: Paul 
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...

Author _Marco
Registered
#2 | Posted: 29 Nov 2005 21:56 
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.

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

Author Team
8-)
#3 | Posted: 29 Nov 2005 22:24 
_Marco
You just need to paste global $_COOKIE; right after the line function getMyCookie(){ that's all.

Author _Marco
Registered
#4 | Posted: 29 Nov 2005 22:35 
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

Author Paul
Lead Developer
#5 | Posted: 30 Nov 2005 11:27 
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.

Author _Marco
Registered
#6 | Posted: 30 Nov 2005 18:49 
Okido, I will send you some details by email. Thanks.

_Marco

Author _Marco
Registered
#7 | Posted: 2 Dec 2005 17:31 
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

Author _Marco
Registered
#8 | Posted: 2 Dec 2005 18:32 
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

Author Paul
Lead Developer
#9 | Posted: 4 Dec 2005 17:07 
That's ok if it's working :) You know I am busy person, so let's use your account next time, if needed. Cheers.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Running basic installation of miniBB 2 with PHP version below 4.1.0 Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB