homepage Welcome to WebmasterWorld Guest from 54.226.191.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Parse error: syntax error, unexpected T STRING
help me
fiberlinux




msg:4571063
 10:30 am on May 6, 2013 (gmt 0)

hey`
i keep getting this error
i dont know about php so can you help me

Parse error: syntax error, unexpected T_STRING in /home/appjakar/public_html/fiber.php on line 514

$perms=';


i have add put some ' at the code but it getting another error

sorry for my bad english :(

[edited by: jatar_k at 2:53 pm (utc) on May 8, 2013]
[edit reason] removed url [/edit]

 

DrDoc




msg:4571174
 4:20 pm on May 6, 2013 (gmt 0)

Welcome to Webmaster World!

I would look at line 514 (and perhaps a 5-10 lines prior and after) to see if you have missed something. Typically there would be a missing semicolon or quote (single or double).

Are you using an editor which color codes the script for you? Doing so is most helpful for catching simple parsing errors like this appears to be.

lucy24




msg:4571276
 9:06 pm on May 6, 2013 (gmt 0)

Are you using an editor which color codes the script for you?

fwiw, mine flags line 513, consisting in full of
$perms=';
(one single quote) That is: $perms is in a different color from the normal variable-name color-- and then the entire remainder of the code goes into the color meant for strings, except for the bits that really are strings. It fixes itself when it gets to the later line
Recoded By X'1n73ct
--apparently quotation marks trump "comment" markup.

Ordinarily I would not venture to address a php question for fear it would get me unceremoniously booted from the Forums. But this happens to be an error message I recognize because I got it myself within the last day or two. It was T_something-else, but the underlying mistake was the same:
$variable-name = 'blahblah';
and then the line ends before you've delivered all of the "= 'blahblah';" component. In my case I'd accidentally deleted half of a line.

jatar_k




msg:4571869
 2:54 pm on May 8, 2013 (gmt 0)

as lucy24 mentioned you should be fine if you replace

$perms=';

with

$perms='';

you were just missing the closing quote

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved