Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
5 registered (Stan, Dunny, driv, SteveS, id242), 34 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/25/03
Posts: 125
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#200888 - 11/08/07 12:44 PM Error when updating Portal Settings [7.2.2]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
I decided to change the number of Top Posters to 10 from 5 but when I click Submit it returns the following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/myserverpath/ubbthreads/cache_builders/custom/portal_box_3.php on line 34

Any ideas?
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#200889 - 11/08/07 12:50 PM Re: Error when updating Portal Settings [7.2.2] [Re: ScriptKeeper]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
Line 34:

$postid=$rowid['POST_ID'];
Top
#200890 - 11/08/07 01:03 PM Re: Error when updating Portal Settings [7.2.2] [Re: ScriptKeeper]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Can you post the full code in your custom/portal_box_3.php file?
Top
#200895 - 11/08/07 03:22 PM Re: Error when updating Portal Settings [7.2.2] [Re: Rick]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
OK, I downloaded it from the server but it hasn't formatted correctly so I've separated the lines as below and the error is now showing on line 38.

 Code:
<?php

/* PHP CODE HERE */

/* BODY HERE */

$body = <<<EOF

<?php

  // Open and select database

  $link = mysql_connect('server','username','password');
  if (!$link)
    {
    die('Cannot connect to server: '.mysql_error());
    }
  $db = mysql_select_db('database',$link);
  if (!$db)
    {
     die('Cannot select database: '. mysql_error());
    }

  // Find out post id's

      $query = "SELECT * FROM ubbt_TOPICS ORDER BY TOPIC_VIEWS DESC";
      $result = mysql_query($query);
      if (!$result)
        {
        die('Cannot read from database: '.mysql_error());
        }

  // Build table

      for ($i=0; $i <$num_results; $i++)
        {
        $rowid = mysql_fetch_array($result);
        $postid=$rowid['POST_ID'];
        $queryposting = "SELECT * FROM ubbt_POSTS where TOPIC_SUBJECT=".$topicsubject."";
        $resultposting = mysql_query($queryposting);
        if (!$result)
          {
          die('Cannot read from database: '.mysql_error());
          }
      echo '<div style="float:right">'.$topicviews.'</div>';
      echo '<div style="float:right">'.$topicsubject.'</div>';
      }
?>

EOF;

?>

Top
#200896 - 11/08/07 03:28 PM Re: Error when updating Portal Settings [7.2.2] [Re: ScriptKeeper]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
I'm now getting exactly the same error when I try to clear the cache ( admin/doclearcache.php ), update General Display Settings ( admin/dogen_display.php ), update Profiles ( admin/doprofiles.php ), etc.
Top
#200903 - 11/08/07 05:35 PM Re: Error when updating Portal Settings [7.2.2] [Re: ScriptKeeper]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
yah, you need to totally kill that one. it's totally screwed up.

just replace that portal_box_3.php with:

 PHP:

<?php
/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF
EOF;

?>



there are too many errors in that puppy to even begin to try to debug. dunno what someone was trying to do there..

this code:
 PHP:

<?php

  // Open and select database

  $link = mysql_connect('server','username','password');
  if (!$link)
    {
    die('Cannot connect to server: '.mysql_error());
    }
  $db = mysql_select_db('database',$link);
  if (!$db)
    {
     die('Cannot select database: '. mysql_error());
    }

  // Find out post id's

      $query = "SELECT * FROM ubbt_TOPICS ORDER BY TOPIC_VIEWS DESC";
      $result = mysql_query($query);
      if (!$result)
        {
        die('Cannot read from database: '.mysql_error());
        }

  // Build table

      for ($i=0; $i <$num_results; $i++)
        {
        $rowid = mysql_fetch_array($result);
        $postid=$rowid['POST_ID'];
        $queryposting = "SELECT * FROM ubbt_POSTS where TOPIC_SUBJECT=".$topicsubject."";
        $resultposting = mysql_query($queryposting);
        if (!$result)
          {
          die('Cannot read from database: '.mysql_error());
          }
      echo '<div style="float:right">'.$topicviews.'</div>';
      echo '<div style="float:right">'.$topicsubject.'</div>';
      }
?>

is destined to fail ;\)
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#200936 - 11/09/07 06:12 AM Re: Error when updating Portal Settings [7.2.2] [Re: SD]
ScriptKeeper Offline

veteran
Registered: 12/09/06
Posts: 1420
Loc: UK
Cheers SD. \:D

Haven't got a clue what happened to portal_box_3 but I've cleared it as you suggested and we're back to normal again. \:\)
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Due Date Calculator-Calculate When Your Baby is Due
by StewartMyduedate
12:54 AM
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
Forum Stats
10491 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image