boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

first time user of b2

 
Post new topic   Reply to topic    boardom Forum Index -> Installation issues
View previous topic :: View next topic  
Author Message
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 6:52 am    Post subject: first time user of b2 Reply with quote

i guess im just really confused with this thing and id really love to get it to work.
heres what happens when i do the b2install.php

Quote:
$msg

"; echo "

query:
$sql
"; echo "

error:
$error
"; die(); } $connexion = mysql_connect($server,$loginsql,$passsql) or die("Can't connect to the database
".mysql_error()); $dbconnexion = mysql_select_db($base, $connexion); if (!$dbconnexion) { echo mysql_error(); die(); } echo "Now creating the necessary tables in the database...

"; # Note: if you want to start again with a clean b2 database, # just remove the // in this file // $query = "DROP TABLE IF EXISTS $tableposts"; // $q = mysql_query($query) or die ("doh, can't drop the table \"$tableposts\" in the database."); $query = "CREATE TABLE $tableposts ( ID int(10) unsigned NOT NULL auto_increment, post_author int(4) DEFAULT '0' NOT NULL, post_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, post_content text NOT NULL, post_title text NOT NULL, post_category int(4) DEFAULT '0' NOT NULL, post_karma int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (ID), UNIQUE ID (ID) )"; $q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tableposts\" in the database.", $query, mysql_error()); $now = date('Y-m-d H:i:s'); $query = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ('1', '$now', 'This is the first post. Edit or delete it, then start blogging !', 'Hello world !', '1')"; $q = mysql_query($query) or mysql_doh("doh, can't insert a first post in the table \"$tableposts\" in the database.", $query, mysql_error()); echo "posts: OK
"; // $query = "DROP TABLE IF EXISTS $tablecategories"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablecategories\" in the database."); $query="CREATE TABLE $tablecategories (cat_ID int(4) NOT NULL auto_increment, cat_name TINYTEXT not null , KEY (cat_ID))"; $q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablecategories\" in the database.", $query, mysql_error()); $query = "INSERT INTO $tablecategories (cat_ID, cat_name) VALUES ('0', 'General')"; $q = mysql_query($query) or mysql_doh("doh, can't set the default category in the table \"$tablecategories\" in the database.", $query, mysql_error()); $query = "UPDATE $tableposts SET post_category=\"1\""; $result = mysql_query($query) or mysql_doh("Oops, can't set the default category on $tableposts.", $query, mysql_error()); echo "b2categories: OK
"; // $query = "DROP TABLE IF EXISTS $tablecomments"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablecomments\" in the database."); $query = "CREATE TABLE $tablecomments ( comment_ID int(11) unsigned NOT NULL auto_increment, comment_post_ID int(11) DEFAULT '0' NOT NULL, comment_author tinytext NOT NULL, comment_author_email varchar(100) NOT NULL, comment_author_url varchar(100) NOT NULL, comment_author_IP varchar(100) NOT NULL, comment_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, comment_content text NOT NULL, comment_karma int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (comment_ID) )"; $q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablecomments\" in the database.", $query, mysql_error()); $now = date('Y-m-d H:i:s'); $query = "INSERT INTO $tablecomments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content) VALUES ('1', 'miss b2', '[email protected]', 'http://example.com', '127.0.0.1', '$now', 'Hi, this is a comment.
To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.')"; $q = mysql_query($query) or mysql_doh("doh, can't insert a first comment in the table \"$tablecomments\" in the database.", $query, mysql_error()); echo "comments: OK
"; // $query = "DROP TABLE IF EXISTS $tablesettings"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablesettings\" in the database."); $query = "CREATE TABLE $tablesettings ( ID tinyint(3) DEFAULT '1' NOT NULL, posts_per_page int(4) unsigned DEFAULT '7' NOT NULL, what_to_show varchar(5) DEFAULT 'days' NOT NULL, archive_mode varchar(10) DEFAULT 'weekly' NOT NULL, time_difference tinyint(4) DEFAULT '0' NOT NULL, AutoBR tinyint(1) DEFAULT '1' NOT NULL, time_format varchar(20) DEFAULT 'H:i:s' NOT NULL, date_format varchar(20) DEFAULT 'Y/m/d' NOT NULL, PRIMARY KEY (ID), KEY ID (ID) )"; $q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablesettings\" in the database.", $query, mysql_error()); $query = "INSERT INTO $tablesettings ( ID, posts_per_page, what_to_show, archive_mode, time_difference, AutoBR, time_format, date_format) VALUES ( '1', '20', 'posts', 'monthly', '0', '1', 'H:i:s', 'd.m.y')"; $q = mysql_query($query) or mysql_doh("doh, can't set the default settings in the table \"$tablesettings\" in the database.", $query, mysql_error()); echo "settings: OK
"; // $query = "DROP TABLE IF EXISTS $tableusers"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableusers\" in the database."); $query = "CREATE TABLE $tableusers ( ID int(10) unsigned NOT NULL auto_increment, user_login varchar(20) NOT NULL, user_pass varchar(20) NOT NULL, user_firstname varchar(50) NOT NULL, user_lastname varchar(50) NOT NULL, user_nickname varchar(50) NOT NULL, user_icq int(10) unsigned DEFAULT '0' NOT NULL, user_email varchar(100) NOT NULL, user_url varchar(100) NOT NULL, user_ip varchar(15) NOT NULL, user_domain varchar(200) NOT NULL, user_browser varchar(200) NOT NULL, dateYMDhour datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, user_level int(2) unsigned DEFAULT '0' NOT NULL, user_aim varchar(50) NOT NULL, user_msn varchar(100) NOT NULL, user_yim varchar(50) NOT NULL, user_idmode varchar(20) NOT NULL, PRIMARY KEY (ID), UNIQUE ID (ID), UNIQUE (user_login) )"; $q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tableusers\" in the database.", $query, mysql_error()); $random_password = substr(md5(uniqid(microtime())),0,6); $query = "INSERT INTO $tableusers (ID, user_login, user_pass, user_firstname, user_lastname, user_nickname, user_icq, user_email, user_url, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_aim, user_msn, user_yim, user_idmode) VALUES ( '1', 'admin', '$random_password', '', '', 'admin', '0', '$admin_email', '', '127.0.0.1', '127.0.0.1', '', '00-00-0000 00:00:01', '10', '', '', '', 'nickname')"; $q = mysql_query($query) or mysql_doh("doh, can't set the default user in the table \"$tableusers\" in the database.", $query, mysql_error()); echo "users: OK
"; ?>
Installation successful !

now im not sure if all of this stuff is normal. if it is then im a fool, but then with i go to the b2login.php thing after that...this is what it says.
Quote:

$v) { if (is_array($v)) { $array[$k] = add_magic_quotes($v); } else { $array[$k] = addslashes($v); } } return $array; } } if (!get_magic_quotes_gpc()) { $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); } $b2varstoreset = array('action','mode','error','text','popupurl','popuptitle'); for ($i = 0; $i < count($b2varstoreset); $i = $i + 1) { $b2var = $b2varstoreset[$i]; if (!isset($$b2var)) { if (empty($HTTP_POST_VARS["$b2var"])) { if (empty($HTTP_GET_VARS["$b2var"])) { $$b2var = ''; } else { $$b2var = $HTTP_GET_VARS["$b2var"]; } } else { $$b2var = $HTTP_POST_VARS["$b2var"]; } } } /* connecting the db */ $connexion = @mysql_connect($server,$loginsql,$passsql) or die("Can't connect to the database
".mysql_error()); mysql_select_db("$base"); switch($action) { case "logout": setcookie("cafeloguser"); setcookie("cafelogpass"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); // for HTTP/1.1 header("Pragma: no-cache"); if ($is_IIS) { header("Refresh: 0;url=b2login.php"); } else { header("Location: b2login.php"); } exit(); break; case "login": if(!empty($HTTP_POST_VARS)) { $log = $HTTP_POST_VARS["log"]; $pwd = $HTTP_POST_VARS["pwd"]; $redirect_to = $HTTP_POST_VARS["redirect_to"]; } function login() { global $server,$loginsql,$passsql,$base,$log,$pwd,$error,$user_ID; global $tableusers, $pass_is_md5; $user_login=$log; $password=$pwd; if (!$user_login) { $error="ERROR: the login field is empty"; return false; } if (!$password) { $error="ERROR: the password field is empty"; return false; } if (substr($password,0,4)=="md5:") { $pass_is_md5 = 1; $password = substr($password,4,strlen($password)); $query = " SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND MD5(user_pass) = '$password' "; } else { $pass_is_md5 = 0; $query = " SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND user_pass = '$password' "; } $result = mysql_query($query) or die("Incorrect Login/Password request: ".mysql_error()); $lines = mysql_num_rows($result); if ($lines<1) { $error="ERROR: wrong login or password"; $pwd=""; return false; } else { $res=mysql_fetch_row($result); $user_ID=$res[0]; if (($pass_is_md5==0 && $res[1]==$user_login && $res[2]==$password) || ($pass_is_md5==1 && $res[1]==$user_login && md5($res[2])==$password)) { return true; } else { $error="ERROR: wrong login or password"; $pwd=""; return false; } } } if (!login()) { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); if ($is_IIS) { header("Refresh: 0;url=b2login.php"); } else { header("Location: b2login.php"); } exit(); } else { $user_login=$log; $user_pass=$pwd; setcookie("cafeloguser",$user_login,time()+31536000); if ($pass_is_md5) { setcookie("cafelogpass",$user_pass,time()+31536000); } else { setcookie("cafelogpass",md5($user_pass),time()+31536000); } if (empty($HTTP_COOKIE_VARS["cafelogblogid"])) { setcookie("cafelogblogid","1",time()+31536000); } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); switch($mode) { case "bookmarklet": $location="b2bookmarklet.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle"; break; case "sidebar": $location="sidebar.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle"; break; case "profile": $location="profile.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle"; break; default: $location="$redirect_to"; break; } if ($is_IIS) { header("Refresh: 0;url=$location"); } else { header("Location: $location"); } } break; case "lostpassword": ?>

then the little login box...and then
Quote:

The email could not be sent.
\n"; echo "Possible reason: your host may have disabled the mail() function...

"; die(); } else { echo "

The email was sent successfully to $user_login's email address.
\n"; echo "Click here to login !
"; die(); } break; default: if((!empty($HTTP_COOKIE_VARS["cafeloguser"])) && (!empty($HTTP_COOKIE_VARS["cafelogpass"]))) { $user_login = $HTTP_COOKIE_VARS["cafeloguser"]; $user_pass_md5 = $HTTP_COOKIE_VARS["cafelogpass"]; } function checklogin() { global $server,$loginsql,$passsql,$base; global $user_login,$user_pass_md5,$user_ID; $userdata = get_userdatabylogin($user_login); if ($user_pass_md5 != md5($userdata["user_pass"])) { return false; } else { return true; } } if ( !(checklogin()) ) { if (!empty($HTTP_COOKIE_VARS["cafeloguser"])) { $error="Error: wrong login/password"; //, or your session has expired."; } } else { header("Expires: Wed, 5 Jun 1979 23:41:00 GMT"); /* private joke: this is my birthdate - though officially it's on the 6th, since I'm GMT+1 Smile */ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); /* different all the time */ header("Cache-Control: no-cache, must-revalidate"); /* to cope with HTTP/1.1 */ header("Pragma: no-cache"); header("Location: b2edit.php"); exit(); } ?>

then the other little login box with a spot for a password
sorry this so long, but im not sure what would be useful in this whole mess of errors or whatever it is.
mind anyone that reads this, im very new with php and mysql ( i started trying to use it yesterday ) so be nice Smile
thanks for any help i can get
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Dec 25, 2003 6:57 am    Post subject: Reply with quote

Does your host have PHP installed?
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 6:58 am    Post subject: Reply with quote

i am the host, and yes i installed it today
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Dec 25, 2003 7:14 am    Post subject: Reply with quote

Any other PHP scripts working? Can you view a simple php page?

I did a search, maybe you can find some answers in these threads.
http://www.tidakada.com/board/viewtopic.php?t=3276
http://www.tidakada.com/board/viewtopic.php?t=2788

I didnt really read the threads to the finish, maybe it can help you though.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 7:17 am    Post subject: Reply with quote

see thats the thing, im a very new php user. so im not sure if anything is working. i guess when i setup apache to load php, it worked because i didnt get any errors. and i did get errors before. but thanks. ill go ahead and read away.
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Dec 25, 2003 7:21 am    Post subject: Reply with quote

You can make a new document called hello.php and place this in it, and run it in your browser, it should just output "Hello World".
Code:
<?php
    echo "Hello World<br />\n";
?>

_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 7:29 am    Post subject: Reply with quote

yeah, i just tried that and opened it in mozilla and all i got was this
Quote:

\n"; ?>

so im guessing that my php isnt installed correctly, but now i cant even begin to figure that out.
and also, i tired just making the database in mysql for laughs. i created it but it wouldnt connect. im guessing i just didnt install anything correctly. im guessing i need to find this apache/php/mysql installation package and try to do that.
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Dec 25, 2003 8:04 am    Post subject: Reply with quote

Ah, I'm sorry I couldn't help you out any further. I wish you good luck in figuring this out, maybe you can post a question at a PHP help forum or a webhosting forum (like WHT), and explain the situation there.

Happy Holidays!
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 8:06 am    Post subject: Reply with quote

no no you help out alright, you got me to question my installation and find out that it never worked to begin with. thats help right???
happy holidays and thanks
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
darth butternutz



Joined: 25 Dec 2003
Posts: 6
Location: california

PostPosted: Thu Dec 25, 2003 9:58 am    Post subject: Reply with quote

nope, im still getting the same errors. i went to http://www.devside.net/web/server/download to use their prepackaged apache/mysql/php setup. everything was installed correctly according to all of the test they put it thru. but im still getting all of the errors that i stated above. do i have to setup the mysql databases before i hit b2install.php or what. WHAT AM I DOIng wrong. thanks
_________________
the guy that put the fun back into funeral
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
epolady



Joined: 30 Jul 2002
Posts: 800
Location: Texas

PostPosted: Thu Dec 25, 2003 10:09 am    Post subject: Reply with quote

I've never used that, I use MiniServer, it works good. I also downloaded IBServer.
But I use miniserver for testing purposes, when I installed b2 on my miniserver, it worked fine.

Also, you may want to ask Devside.net's forum.

Yes, you are supposed to have a MySQL database ready, and have a user name password with access to the DB.
_________________
No more support from me. Goodbye!
Go upgrade to WordPress, you'll find better support there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Installation issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group