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 

What does this mean?

 
Post new topic   Reply to topic    boardom Forum Index -> PHP help
View previous topic :: View next topic  
Author Message
un-perfect



Joined: 18 Aug 2003
Posts: 4

PostPosted: Mon Aug 18, 2003 2:54 am    Post subject: What does this mean? Reply with quote

This is what I get at the b2login.php

*/

include("./b2config.php");
include($b2inc."/b2functions.php");

function add_magic_quotes($array) {
foreach ($array as $k => $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');
for ($i=0; $iERROR: please enter a Login");
}

/* checking the password has been typed twice */
if ($pass1=='' ||$pass2=='') {
die ("ERROR: please enter your password twice");
}

/* checking the password has been typed twice the same */
if ($pass1!=$pass2) {
die ("ERROR: please type the same password in the two password fields");
}
$user_nickname=$user_login;

/* checking e-mail address */
if ($user_email=="") {
die ("ERROR: please type your e-mail address");
} else if (!is_email($user_email)) {
die ("ERROR: the email address isn't correct");
}

$id=mysql_connect($server,$loginsql,$passsql);
if ($id==false) {
die ("OOPS: can't connect to the server !".mysql_error());
}

mysql_select_db("$base") or die ("OOPS: can't select the database $base : ".mysql_error());

/* checking the login isn't already used by another user */
$request = " SELECT user_login FROM $tableusers WHERE user_login = '$user_login'";
$result = mysql_query($request,$id) or die ("OOPS: can't check the login...");
$lines = mysql_num_rows($result);
mysql_free_result($result);
if ($lines>=1) {
die ("ERROR: this login is already registered, please choose another one");
}

$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ;
$user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] );
$user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];

$user_login=addslashes($user_login);
$pass1=addslashes($pass1);
$user_nickname=addslashes($user_nickname);

$query = "INSERT INTO $tableusers (user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode) VALUES ('$user_login','$pass1','$user_nickname','$user_email','$user_ip','$user_domain','$user_browser',NOW(),'$new_users_can_blog','nickname')";
$result = mysql_query($query);
if ($result==false) {
die ("ERROR: couldn't register you... please contact the webmaster !".mysql_error());
}

$stars="";
for ($i = 0; $i < strlen($pass1); $i = $i + 1) {
$stars .= "*";
}

$message = "new user registration on your blog $blogname:\r\n\r\n";
$message .= "login: $user_login\r\n\r\ne-mail: $user_email";

@mail($admin_email,"new user registration on your blog $blogname",$message);

?>


Can you tell me what todo to fix it the correct way???
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Mizkie



Joined: 19 Mar 2003
Posts: 51
Location: Bloomington, IN

PostPosted: Mon Aug 18, 2003 5:11 am    Post subject: Reply with quote

is that what you get when you go to http://youraddress/b2login.php?

cause maybe your host doesn't support php or something...
_________________
Mick

HSS = High School Sucks
Back to top
View user's profile Send private message Visit poster's website AIM Address
Viper007Bond



Joined: 15 Aug 2003
Posts: 266
Location: Portland, Oregon, USA

PostPosted: Mon Aug 18, 2003 9:46 am    Post subject: Reply with quote

That was my guess as well. If it's hosted at a free site, chances are it doesn't support PHP.
_________________
http://www.viper007bond.com

If you haven't already installed b2, I advise you look into WordPress or b2evo instead as b2 is dead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
moose



Joined: 04 May 2003
Posts: 196
Location: Winnipeg Canada

PostPosted: Mon Aug 18, 2003 5:41 pm    Post subject: Reply with quote

your host might only support cgi/perl (eek, change hosts if they do ). maybe ask your host if they can install php for you, or find another script that isin't in php.
Back to top
View user's profile Send private message Visit poster's website
David
Guest





PostPosted: Thu Dec 18, 2003 5:35 pm    Post subject: Reply with quote

YOU HAVENT OPENED PHP SCRIPT! THIS MEANS YOU NEED TO PUT <?php AT THE BEGGINING INSTEAD OF /*. The page is throwing out the code because it is not actually trying to interprerat the code.
Back to top
David
Guest





PostPosted: Thu Dec 18, 2003 5:37 pm    Post subject: Reply with quote

Or. Your /* is the wrong way around. It should be /* to open and */ to close commenting. Am i being really rude? Ill stop.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> PHP help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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