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 

Can't Login b2header.php error

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



Joined: 24 Oct 2004
Posts: 2
Location: http://mbensel.com/v-web/b2/index.php

PostPosted: Sun Oct 24, 2004 8:20 pm    Post subject: Can't Login b2header.php error Reply with quote

I keep getting the error Parse error: parse error, unexpected $ in /home/mbenselc/.panel/web/b2/b2header.php on line 169
when I try to login to my blog.

on http://mbensel.com/v-web/b2/index.php

Code:

<?php

require_once("b2config.php");
require_once($b2inc."/b2template.functions.php");
require_once($b2inc."/b2verifauth.php");
require_once($b2inc."/b2vars.php");
require_once($b2inc."/b2functions.php");
require_once($b2inc."/xmlrpc.inc");
require_once($b2inc."/xmlrpcs.inc");

if (!isset($use_cache))   $use_cache=1;
if (!isset($blogID))   $blog_ID=1;
if (!isset($debug))      $debug=0;
timer_start();

get_currentuserinfo();

$request = " SELECT * FROM $tablesettings ";
$result = mysql_query($request);
$querycount++;
while($row = mysql_fetch_object($result)) {
   $posts_per_page=$row->posts_per_page;
   $what_to_show=$row->what_to_show;
   $archive_mode=$row->archive_mode;
   $time_difference=$row->time_difference;
   $autobr=$row->AutoBR;
   $date_format=stripslashes($row->date_format);
   $time_format=stripslashes($row->time_format);
}

// let's deactivate quicktags on IE Mac and Lynx, because they don't work there.
if (($is_macIE) || ($is_lynx))
   $use_quicktags=0;

$b2varstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
for ($i=0; $i<count($b2varstoreset); $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"];
      }
   }
}

if ($standalone == 0) {

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>b2 > <?php echo $title; ?></title>
<link rel="stylesheet" href="<?php echo $b2inc; ?>/b2.css" type="text/css">
<style type="text/css">
<!--
<?php
if (!$is_NS4) {
?>
td.menutop {
   padding-top: 2px;
   padding-bottom: 2px;
   border-color: #999999;
   border-top-width: 1px;
   border-bottom-width: 1px;
   border-left-width: 0px;
   border-right-width: 0px;
   border-style: dashed;
}
textarea,input,select {
   background-color: #f0f0f0;
   border-width: 1px;
   border-color: #cccccc;
   border-style: solid;
   padding: 2px;
   margin: 1px;
}
.checkbox {
<?php
if ((preg_match("/MSIE/",$HTTP_USER_AGENT)) && (!preg_match("/Mac/",$HTTP_USER_AGENT))) {
?>   background-color: #ffffff;
   border-width: 0px;
   padding: 0px;
   margin: 0px;
}
<?php
}
}
?>
-->
</style>
<?php
if ($use_spellchecker) {
?><script type="text/javascript" language="javascript">
<!--
function DoSpell(formname, subject, body)
{
document.SPELLDATA.formname.value=formname
document.SPELLDATA.subjectname.value=subject
document.SPELLDATA.messagebodyname.value=body
document.SPELLDATA.companyID.value="custom\\http://cafelog.com"
document.SPELLDATA.language.value=1033
document.SPELLDATA.opener.value="<?php echo $pathserver ?>/sproxy.pl"
document.SPELLDATA.formaction.value="http://www.spellchecker.com/spell/startspelling.asp "
window.open("<?php echo $pathserver ?>/b2spell.php","Spell",
"toolbar=no,directories=no,location=yes,resizable=yes,width=620,height=400,top=100,left=100")
}
//-->
</script><?php
}
if ($redirect==1) {
?>
<script language="javascript">
<!--
function redirect() {
  window.location = "<?php echo $redirect_url; ?>";
}
setTimeout("redirect();", 600);
//-->
</script>
<?php
}
?>
<script language="javascript">
<!-- hiding from old terrible browsers

   function profile(userID) {
      window.open ("b2profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
   }

   function preview(form) {
      var preview_date = "<?php echo date("Y-m-d H:i:s"); ?>";
      var preview_userid = "<?php echo $user_ID ?>";
      var preview_title = form.post_title.value;
      var preview_category = form.post_category.value;
      var preview_content = form.content.value;
      var preview_autobr = form.post_autobr.value;
      preview_date = escape(preview_date);
      preview_userid = escape(preview_userid);
      preview_title = escape(preview_title);
      preview_category = escape(preview_category);
      preview_content = escape(preview_content);
      preview_autobr = escape(preview_autobr);
      window.open ("<?php echo "$siteurl/$blogfilename" ?>?preview=1&preview_date="+preview_date +"&preview_userid="+preview_userid +"&preview_title="+preview_title +"&preview_category="+preview_category +"&preview_content="+preview_content +"&preview_autobr="+preview_autobr ,"Preview", "location=0,menubar=1,resizable=1,scrollbars=yes,status=1,toolbar=0");
   }

   function launchupload() {
      window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
   }

//  End -->
</script>
</head>
<body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellspacing="0" cellpadding="0" align="center">

<tbody><tr height="60">
<td valign="top">

<br /></td>
</tr><tr>

<td valign="top">
<img width="35" height="24" border="0" src="http://host103.ipowerweb.com:8080/panel/host/b2-img/blank.gif" />

_________________
Thanks,
Sandman3
Back to top
View user's profile Send private message Visit poster's website
stevem



Joined: 15 Mar 2003
Posts: 369

PostPosted: Sun Oct 24, 2004 10:42 pm    Post subject: Reply with quote

That seems to be missing some lines at the end. After </head> it should have
Code:
<body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellpadding="0" cellspacing="0" align="center">
<?php
if ($profile==0) {
?>
<tr height="60">
<td valign="top">
<?php include($b2inc."/b2menutop.php") ?>
</td>
</tr><tr>
<?php
}
?>
<td valign="top">
<img src="b2-img/blank.gif" border="0" width="35" height="24" />
<div class="panelbody">
<?php

}
?>
Back to top
View user's profile Send private message
mbensel
Guest





PostPosted: Mon Oct 25, 2004 12:46 am    Post subject: Didn't work Reply with quote

Tried by adding what was posted after </head>

visit b2's website logged in as :

>
> Post / EditMy ProfileTeam= $k[0]) { echo "$sep".trim($k[2]).""; } $i=$i+1; $j=$menu[$i]; if (trim($j) == "***") $j=""; } } ?>
" class="menutop">View site Logout

::

Parse error: parse error, unexpected T_LNUMBER, expecting ']' in /home/mbenselc/.panel/web/b2/b2-include/b2edit.form.php on line 41

This is the error I get now.
Back to top
mbensel
Guest





PostPosted: Mon Oct 25, 2004 1:59 am    Post subject: Played a little more Reply with quote

I played with the code a little more and now get the error Parse error: parse error, unexpected '}' in /home/mbenselc/.panel/web/b2/b2header.php on line 174

Code:

</head>
<body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellpadding="0" cellspacing="0" align="center">

<tbody><tr height="60">
<td valign="top">
<?php include($b2inc."/b2menutop.php") ?>
</td>
</tr><tr>
<?php
}
?>
<td valign="top">
<img width="35" height="24" border="0" src="/home/mbenselc/.panel/web/b2/b2-img/blank.gif" />
<div class="panelbody">
</div></td></tr></tbody></table></body>
<?php
}
?>


WHen I included what was posted above it did not give me the login screen.
Now it is just back to the parse error.
One of the things I noticed was that the image location in my first post for the blank.gif was incorrect.

When I add the code below is when it gives me the edit page all messed up.
Code:
<?php if ($profile==0) {
?>
Back to top
Sandman3



Joined: 24 Oct 2004
Posts: 2
Location: http://mbensel.com/v-web/b2/index.php

PostPosted: Mon Oct 25, 2004 12:07 pm    Post subject: Issue resolved Reply with quote

I resolved the issue. It was caused by opening b2 pages in the page builder that is default on my hosting compaany and then closing it. Even when you do not make a change to the page the page builder adds HTML tags to the php page. Once there are html tags the pages that are opened no longer function. I had to replace the pages with pages from a recent backup that I made.
_________________
Thanks,
Sandman3
Back to top
View user's profile Send private message Visit poster's website
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