wordpress problem

telsave

DW Member +
Joined
Jun 8, 2002
Messages
658
Reaction score
33
Location
Newcastle
Hi M8's Can anyone help me sort this out suddenly one of my blogs is returning this error:-
Parse error: syntax error, unexpected '<' in /home/telsave/public_html/beststoresonthenet/information/wp-content/themes/twentyten/header.php on line 52

Line 52 is blank so I am showing lines 51 -53

51: // Add the blog description for the home/front page.
52:
53: $site_description = get_bloginfo( 'description', 'display' );

cheers
 
Delete line 52.

Those lines look ok to be honest, line 53 is just saying to load the blog discription and display information into the variable... but the syntax is correct.

I would suggest that you look at your apache / webserver logs and see what they are saying.

This just happened out of the blue?

Can you give me a link to the blog please.

Mickie
 
Unfortunately you have blank lines and I hav seen this throw the error messages out as the PHP parser ignores blank lines.

The < character is very common in both PHP and HTML so could be fun to spot.

What I would suggest is that there is an incorrectly terminated line in your code which then throws an error when it finds the symbol it doesn't expect.

if you zip header.php and attach it then I'm sure a couple of people will look at it for you
 
Line 52 is commented out so it is saying you have a rouge pointed bracket '<' somewhere above. Sometimes PHP does get funny about black lines, but only in certain places and they can WRECK your head, so might not hurt to delete them. Post the code to see if anyone can spot the problem.
 
Try this :)

Had you just ried to add the google analytics stuff? It seems that the google Javascript was in the middle of a php section.
 
would hazzard a guess that it is something to do with that function on line 47,

PHP:
You don't have permission to view the code content. Log in or register now.

for adding the blog name. What have you set as the blog name variable? Does it have anything that resembles the less than '<' sign in it?

To test it out, see if you can comment line 47 out temporerily by putting 2 forward slashes at the start of the line - "//" then save and run the page and see what it says then...

BTW, on your homepage, you have the arse end of an HTML comment "am panel --> " at the bottom of the page showing... That needs to be deleted mate.
 
Last edited:
Try this :)

Had you just ried to add the google analytics stuff? It seems that the google Javascript was in the middle of a php section.

True enough, you didn't close the php tags corectly mate, heres the Eazi's edit with the tag closed.

Be interesting to know if this solves it; think it might... Hadn't looked that far down myself Eazi...
 
hi madeinbeats

many thanks for this help. I have uploaded file and it now opens however if yopu would be kind enough to look at the site http://beststoresonthenet.com/information you will see that the right hand column has slipped to the end of the file. Do you know how this can be corected without a rebuild? I am old and decrepit and Dutcho's Dad so that is my excuse
 
Hi Eazi tried uploading file but as with Madeinbeats kind help the right hand column is pushed down the site, is it possible you may be able to help further it would be appreciated.
 
Thank Eazi for that mate - I just corrected his type-o, lol...

That recent posts div looks like it might be placed in the wrong place or it is getting pushed out.

Try cutting and pasting it after the...
Code:
You don't have permission to view the code content. Log in or register now.

..div. The recent post div looks like:

Code:
You don't have permission to view the code content. Log in or register now.
 
Hi M8's I have just tried opening the other pages and they load correctly it is only the home page that misbehaves.
 
Hi M8's I have just tried opening the other pages and they load correctly it is only the home page that misbehaves.

Then there is something different on this page that is pushing the div too far out... like a picture or those google ads... You have to to try and figure out what is different on this homepage to all the others and resize or remove it...
 
On the pages where it is going wrong, the Recent Posts widgit Div isn't placed inside the <div id="container"> div tags... Move
Code:
You don't have permission to view the code content. Log in or register now.

inside the container div at the bottom...

I just did it and it worked.
 
Sorry couldn't help further last night, bed called.

If @madeinbeats hasn't sorted you we can all continue later :)
 
Hi M8's thanks to your kind help I think I have solved the problem.

I deactived all the plug-ins and the web site worked as it should so I re-installed the plug ins one-by-one to find out which one caused the problem. It turned out to be adsense all in one when I activated it the home page did noty function correctly but the other pages were OK. So I prevented, through the settings, from adsense appearing on the home page and BINGO everything works OK. I actually unistalled the plug in and cleared the cache then re-instaled it but the problem still occured on the home page. Strange because every other blog is set up the same way and all work well, but as things are now working without adsense on the home page that is how it will stay.

Again I am grateful for the way you kindly took time out to help me it is really appreciated.

Cheers
 
Glad it's sorted mate. But if you want ad sense on the homepage then you just need to move that div as said above.

It help in web design if you test things after every step or so, so if something does go wrong, then it's easier to trace...
 
Back
Top