Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-17-2012, 07:11 PM   PM User | #1
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
Parse error: syntax error, unexpected ';'

Hello....I'm working on a wordpress site, and changed one small section in the functions page and received the parse error, taking the entire site down.

so I changed it back. got the same parse error.

i then recopied the entire fuctions.php file and pasted it in the WP editor, and still...the same error.

can anyone please please please tell me what the parse error is?

this is the functions.php file in my paste bin
http://pastebin.com/fVFdq4fg

this is the entire errorParse error: syntax error, unexpected ';' in /home/elysseq/public_html/wp-content/themes/monicaburnsv2/functions.php on line 378

this is line 378
Code:
echo get_avatar( $comment, $avatar_size );
and this is the site www.monicaburns.com

I'd very much appreciate any assistance...
intcon is offline   Reply With Quote
Old 11-17-2012, 07:31 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,495
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
I think it's inside the function somewhere and as you've not posted that..
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 11-17-2012, 07:36 PM   PM User | #3
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
this is the entire functions file...

http://pastebin.com/fVFdq4fg
intcon is offline   Reply With Quote
Old 11-17-2012, 07:43 PM   PM User | #4
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,495
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Maybe so but that is not where get_avatar() is defined.

As I told you previously, you have not posted the code for that. There is little point trying to point me to the same source that I have already looked at. I've already used 'Find' in Notepad++ and get_avatar is only found once in that code - line 378. It is not found anywhere else which means that get_avatar() is defined elsewhere.

You did say this was a wordpress site so maybe its in a wordpress file you've tinkered with.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 11-17-2012, 07:53 PM   PM User | #5
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
Code:
.avatar {}
#clearit{clear:both;}
#small-bc {margin: 0px 20px 0px 0px;float:left; width:150px;font-size:90%;text-align:center; font-weight:bold;}
#small-bc img {display:block; margin: 0 auto 0 auto; border: 1px solid #000000;}
#small-bc-text {margin: 0px; padding-left: 150px;}
.stat {color: #01394C;}
this is in the stylesheet, along with several other stylings.

it is here in content-single.php

Code:
<div id="author-avatar">
				<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'monicaburns_author_bio_avatar_size', 68 ) ); ?>
			</div><!-- #author-avatar -->
although that's just an author avatar...

and I don't see it anywhere else when I do a search on all of the php files.
intcon is offline   Reply With Quote
Old 11-17-2012, 08:06 PM   PM User | #6
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,495
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Well in content-single.php that is just another call to it using functions as parameters. It is not the function itself.

It may well be the case that the fault is in your functions file but I've looked and can't find anything glaringly obvious hence my suspicion about the file that contains this function.

Usually, unexpected errors usually mean the line above or below. In your functions file those are both ok hence my suspicions.

You really need to use the undo option on your editor and go all the way back to the start..
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 11-17-2012, 08:10 PM   PM User | #7
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
Unfortunately, the functions file I've posted IS the start. I'd been searching as to why her gravatars weren't posting, and had been trying to find a solution on the internet. I pasted in a bit of code from the gravatar website. It didn't do anything, so I replaced it with the regular code and then poof. The parse error.
So I went to the original functions.php file, copied it and pasted it into the wordpress editor.
same error.
now the entire site is down and I've got nowhere to turn and no ideas what else to try.
intcon is offline   Reply With Quote
Old 11-17-2012, 08:24 PM   PM User | #8
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,495
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
You do realise that file is missing a ?> at the end don't you?
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 11-17-2012, 08:31 PM   PM User | #9
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
um...no, I didn't. that should go after this?

Code:
add_filter( 'body_class', 'monicaburns_body_classes' );
intcon is offline   Reply With Quote
Old 11-17-2012, 08:34 PM   PM User | #10
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,495
Thanks: 44
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Yup

PHP code has a <?php at the beginning of it and a ?> at the end of it.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Users who have thanked tangoforce for this post:
intcon (11-17-2012)
Old 11-17-2012, 08:48 PM   PM User | #11
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
thank you for your extreme patience, I'll give that a shot.
intcon is offline   Reply With Quote
Old 11-17-2012, 08:58 PM   PM User | #12
intcon
New Coder

 
Join Date: Mar 2009
Posts: 89
Thanks: 27
Thanked 0 Times in 0 Posts
intcon is an unknown quantity at this point
sigh. no. but thank you for trying.
intcon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:06 PM.


Advertisement
Log in to turn off these ads.