954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Parse error

I recently install wprdpress to my website, after all steps done, when I log in it show this error:

Parse error: syntax error, unexpected '@' in /home/carsonle/public_html/wp-includes/general-template.php on line 430

After check my general-template.php files line 430 it show this:
if ( !empty($cat) ) {

Anyone can help me?

lws1976
Newbie Poster
2 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

may not be physical ine 430, logical line 430
included files add lines
single logical lines if(condition) { code } may be spread over multiple physical lines
makes it harder to find coz it could be before or after line 430search for a @character in the file and then included files

see also wordpress.com helpscreens , it may be known,, with a fix or update

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

Sorry, I not familiar wirh php. So now I need to look for @ character inside the files? How can which @ character is the problem?

lws1976
Newbie Poster
2 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

@ is not a common character, it was chosen as the email delimter because it isnt common
I am not familiar with wordpress's setup so I'm not sure how many @ there will be or how close to physical line 430 the one with an error will be, or what the fix will be when you find it, sometimes the error is simple and visible
example: $address=fred@fredsite.com;
that should be $address='fred@fredsite.com';
othertimes it makes no sense at all

It may be a corruption during file transfer or setup that you have to run the setup script again
it could be something ridiculously simple if you know wordpress
this should be posted at Wordpress.org help forums they have wordpress gurus

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

@ is not a common character, it was chosen as the email delimter because it isnt common I am not familiar with wordpress's setup so I'm not sure how many @ there will be or how close to physical line 430 the one with an error will be, or what the fix will be when you find it, sometimes the error is simple and visible example: $address=fred@fredsite.com; that should be $address='fred@fredsite.com'; othertimes it makes no sense at all

It may be a corruption during file transfer or setup that you have to run the setup script again it could be something ridiculously simple if you know wordpress this should be posted at Wordpress.org help forums they have wordpress gurus


@ is also used as error suppression in PHP ie.,

// don't do this EVER
$something = @mysql_fetch_assoc($someres); // suppress the error if $someres isn't a valid resource
ShawnCplus
Code Monkey
Team Colleague
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: