Page 1 of 1

getting rid of an error that's coming up [Surrendered]

PostPosted: Mon Apr 30, 2007 9:25 am
Author: zenrei
Your phpBB Version: 2.0.22
phpBB Type: phpBB / IMPortal
MODs: Yes
Your knowledge: Basic Knowledge
Board URL: http://www.falloutzone.net

PHP Version:
MySQL Version:


What was done before the problem appeared?
Just upgraded to version 141 from 140


What was done to try to solve the problem?
Trying to figure out which file is returning the error



De.scription and Message

Hi,

Just basically trying to tweak out some errors in my site.

When i view a thread, it takes a little bit of time to pull up, it comes up, but IE returns an error:

Line: 732
Char: 42
Error: Expected ';'
Code: 0
URL: http://www.falloutzone.net/foz/viewtopi ... 0528#60528

now, here is a piece of my viewtopic.php file... it can't be line 732, because it's not long enough to have a character 42 and it's the line with only //

Code: Select all
 $select_post_days = '<select>';for($i = 0; $i < count($previous_days); $i++){     $selected = ($post_days == $previous_days[$i]) ? ' selected="selected"' ] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';}$select_post_days .= '</select>';  //// Decide how to order the post display[color=red]//[/color]if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) ){    $post_order = (!empty($HTTP_POST_VARS['postorder'])) ? htmlspecialchars($HTTP_POST_VARS['postorder']) ]);    $post_time_order = ($post_order == "asc") ? "ASC" : "DESC";}else{    $post_order = 'asc';    $post_time_order = 'ASC';}  


Is it possible it's either a different line that's missing the ; or on a different page... when you click on the thread title to view posts, what other files are involved??

I compared my current viewtopic.php with the one from 140, and i don't see any difference in that area, which is why I think it's in another file

Re: getting rid of an error that's coming up

PostPosted: Mon Apr 30, 2007 9:05 pm
Author: Helter
the thread title goes to viewtopic, which also calls

extension.inc
common.php
includes/bbcode.php
includes/functions_post.php
includes/functions_bookmark.php
includes/def_icons - reupload this and chmod to 666
includes/functions_calendar.php
profilcp/functions_profile.php

PostPosted: Mon Apr 30, 2007 10:09 pm
Author: zenrei
ok.. uploaded and chmodded to 666 and i still get the error

and i went through every file and looked in that general area and it looks to my untrained eye that every finished line ends with a ;

so i'm stumped.

Re: getting rid of an error that's coming up

PostPosted: Mon Apr 30, 2007 10:53 pm
Author: Helter
the ";" is missing. try reuploading all these files. Its possible that one was damaged during the first upload

PostPosted: Thu May 03, 2007 10:59 am
Author: zenrei
ok... yesterday i did a fresh install and a step by step mod reinstall, and the error is from the shop mod 2.6.0

it's the 2nd have of the viewtopic modification that's doing it... I'm going to be attempting an upgrade to the newer version (i was planning on doing that anyway) and seeing if the upgrade corrects it.

PostPosted: Mon May 07, 2007 7:26 pm
Author: zenrei
is there a program out there that tests codes for errors? I just can't find the problem <img>

Re: getting rid of an error that's coming up

PostPosted: Mon May 07, 2007 11:03 pm
Author: Helter
can you post a link to the newer version your trying to install?

Re: getting rid of an error that's coming up

PostPosted: Mon May 07, 2007 11:04 pm
Author: Frost
You could try showing your possibly corrupted file here for us to look at, meanwhile I would suggest taking a look at some online php code testers.

Try this:

http://forumferney.free.fr/stester.html

Edit: Oops sorry Helter <img>

PostPosted: Tue May 08, 2007 7:24 pm
Author: zenrei
i tried that link, nothing comes up in the exectution box, i tried IE and Mozilla

I'm starting to think the error in the code has gained conciousness and is purposely thwarting my efforts in the hopes to survive.

PostPosted: Tue May 08, 2007 7:55 pm
Author: zenrei
ok. i'm not going to sweat this anymore.

i took the following code out of viewtopic.php

Code: Select all
      $usernameurl = append_sid("shop.".$phpEx."?action=inventory&searchid=".$postrow[$i]['user_id']);       $usereffects = explode("ÃÅÂ ¸", $postrow[$i]['user_effects']);     $userprivs = explode("ÃÅÂ ¸", $postrow[$i]['user_privs']);     $usercustitle = explode("ÃÅÂ ¸", $postrow[$i]['user_custitle']);     $userbs = array();     $usercount = count($userprivs);     for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }     $usercount = count($usereffects);     for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }     $usercount = count($usercustitle);     for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }     $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']);     $shoparraycount = count ($shoparray);     $shopstatarray = array();     for ($x = 0; $x < $shoparraycount; $x++)     {         $temparray = explode("ÃÅÂ ¾", $shoparray[$x]);         $shopstatarray[] = $temparray[0];         $shopstatarray[] = $temparray[1];     }     if ((($userbs[12] == on) && ($shopstatarray[14] == on)) || (($userbs[14] == on) && ($shopstataray[16] = on))) {         $nameeffects = "<span>'.$poster.'</span>';         $poster = $nameeffects;     }     if (($shopstatarray[6] == on) && ($userbs[2] != on) && ($poster_rank != "Site Admin")) { $poster_avatar = ""; }     if (($shopstatarray[8] == on) && ($userbs[4] != on) && ($poster_rank != "Site Admin")) { $user_sig = ""; }     if (($shopstatarray[10] == on) && ($userbs[6] != on) && ($poster_rank != "Site Admin")) { $poster_rank = "None"; $rank_image = ""; }


It doesn't seem to effect the shop mod at all... effects still come up, and so do the items... so removed it an all is well with the world again.