GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 02-Feb-2006, 15:48
vigilantweather vigilantweather is offline
New Member
 
Join Date: Feb 2006
Posts: 28
vigilantweather is on a distinguished road

Parse Error


Well...

I have had my phpbb forum since late August 2005. I know little to nothing about MySQL/PHP! My hosting provider has an automatic installation of phpbb at no cost. I believe i have phpbb 2.0.18. But anyway... Last night I went to phpbbhacks for the first time. I downloaded the Jr Admin/Moderator Control Panel hack. Well, I tried to step-by-step follow the installation instructions, which involved many files, and I think I did it correctly--now I rethink that assumption.

When I try to access my phpBB administrator control panel, I get this error, nothing else:

Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in [directories to board, i took unimportant ones out]/board/includes/functions_jr_admin.php on line 253

And this is the "real thing" on line 253:
$debug = false;

Like it told me to do... Yet it says there is no ',' or ';'!

It doesn't end here...

On the bottom of every board page (forums, common stuff like that...) reads the following:

Parse error: parse error, unexpected ':' in [directories to board, i took unimportant ones out]/board/includes/page_tail.php on line 32

on line 32 I have:
$admin_link = jr_admin_make_admin_link(); '</a><br /><br />' : '';

And I believe I was told to do that!!

Could anyone please help me. I would really appreciate it. Right now I am having a traffic slow-down with this "Hack Horror!"

Thanks.
  #2  
Old 02-Feb-2006, 16:06
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Parse Error


Hello and Welcome to GIDForums™ vigilantweather. Would it be possible for you to post more of your code than just the particular line. Maybe +and - 10 lines. Your ':' problem very possibly involves a misplaced ' or something similar. The other may be a missing ';' but it is impossible for me to tell without seeing some more code.

When you post it, wrap the whole she-bang in [php] ...your code ...[/php] so it will be marked up. That alone is very helpful in finding misplaced single quotes.

Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #3  
Old 02-Feb-2006, 17:31
vigilantweather vigilantweather is offline
New Member
 
Join Date: Feb 2006
Posts: 28
vigilantweather is on a distinguished road

Re: Parse Error


Well, the first error is on functions_jr_admin.php in the board/includes folder. The error is displayed on line 253:

PHP Code:

function jr_admin_secure($file)
{
   global $HTTP_GET_VARS, $HTTP_POST_VARS, $db, $lang, $userdata, $admin
    
    /* Debugging in this function causes changes to the way ADMIN users
    are interpreted.  You are warned */
    $debug = false;
    
    $jr_admin_userdata = jr_admin_get_user_info($userdata['user_id']);
    
    if ($debug)
    {
        if (!preg_match("/^index.$phpEx/", $file))
        {
            print '<pre><span class="gen"><font color="red">DEBUG - File Accessed - ';
            print $file;
            print '</pre></font></span><br>';
        }
    }
    if ($userdata['user_level'] == ADMIN && !$debug)
    {
        //Admin always has access
        $userdata['user_level'] == ADMIN
        || $jr_admin_userdata['user_jr_admin']
        return true; 



And number 2 is in board/includes and named page_tail.php... it says the error is in line 32:

PHP Code:

if ( !defined('IN_PHPBB') )
{
    die('Hacking attempt');
}

//
// Show the overall footer.
//
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$admin_link = jr_admin_make_admin_link(); '</a><br /><br />' : '';

$template->set_filenames(array(
    'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
    'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
    'ADMIN_LINK' => $admin_link)
);

$template->pparse('overall_footer'); 



Any help appreciated.. hope that helps too!

Thanks.
  #4  
Old 02-Feb-2006, 17:57
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Parse Error


The first one is a missing semi-colon BEFORE the error line given. This is very common. That's why I asked to see the lines before the error.

PHP Code:

function jr_admin_secure($file)
{
   // you are missing the semi-colon at the end of the following line
   global $HTTP_GET_VARS, $HTTP_POST_VARS, $db, $lang, $userdata, $admin
    
    /* Debugging in this function causes changes to the way ADMIN users
    are interpreted.  You are warned */
    $debug = false; 



The second one looks like some trouble.
PHP Code:

// your code
//
// Show the overall footer.
//
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$admin_link = jr_admin_make_admin_link(); '</a><br /><br />' : ''; 



Deleted incomplete answer...
I'll look a little deeper if I get a chance later.

HTH
Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #5  
Old 02-Feb-2006, 18:10
vigilantweather vigilantweather is offline
New Member
 
Join Date: Feb 2006
Posts: 28
vigilantweather is on a distinguished road

Re: Parse Error


I added the semicolon after that list of words like you recommended...

And for #2...

Any recommendations there?

Thanks!!
  #6  
Old 02-Feb-2006, 19:10
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Parse Error


Quote:
Originally Posted by vigilantweather
And number 2 is in board/includes and named page_tail.php... it says the error is in line 32:

PHP Code:

if ( !defined('IN_PHPBB') )
{
    die('Hacking attempt');
}

//
// Show the overall footer.
//
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$admin_link = jr_admin_make_admin_link(); '</a><br /><br />' : ''; 



Any help appreciated.. hope that helps too!

Thanks.

Ok, now that I have looked at it I'm pretty sure that the semi-colon after jr_admin_etc() should be a question mark. I looks as if it wants to be evaluated that way anyhow, using the conditional operator.

Your code, my guess...
PHP Code:

$admin_link = jr_admin_make_admin_link()? '</a><br /><br />' : ''; 


The conditional is evaluated as, if the first statement is true, the code between the ? and the : is used, otherwise, the code after the : is used.

HTH
Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #7  
Old 04-Feb-2006, 13:15
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Parse Error


How'd you make out with those changes? Inquiry Minds want to Know.

MarK
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 15:41
Winsock error when compiling FLTK 2.0 Projects mauriciorossi FLTK Forum 3 16-Aug-2005 10:18
Help with syntax errors PeteGallo C Programming Language 7 08-Aug-2005 20:30
What is "Ambigious symbol" ??*( a compilation error) small_ticket C++ Forum 2 07-Jan-2005 21:10
Can enum have same name as class? crystalattice C++ Forum 3 08-Dec-2004 16:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:55.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.