Forum Moderators: coopster

Message Too Old, No Replies

Parse error - unexpected T_STRING

         

holla

2:19 am on Mar 10, 2007 (gmt 0)

10+ Year Member



Hey im now and was wondering if you guys could help me out im getting :

Parse error: parse error, unexpected T_STRING in d:\InetPub\wwwroot\clientwebspace\www.example.co.uk\mkportal\admin\ad_perms.php on line 164

when i go to set the permissions in my portal CP now i can see a problem with the offending file is anything else what could be effecting it or am i being silly and missing the obious.?

here are a few lines from the file (164 is in bold):

if ($row['g_send_reviews'] == 1) {
$y[22] = "checked";
$n[22] = "";
}
if ($row['g_mod_reviews'] == 1) {
$y[23] = "checked";
$n[23] = "";
}
if ($row['g_access_media'] == 1) {
$y[24] = "checked";
$n[24] = "";
}
if ($row['g_send_media'] == 1) {
$y[25] = "checked";
$n[25] = "";
}
if ($row['g_mod_media'] == 1) {
$y[26] = "checked";
$n[26] = "";
}
if ($row['g_access_websites'] == 1) {
$y[27] = "checked";
$n[27] = "";
}
if ($row['g_send_websites'] == 1) {
$y[28] = "checked";
$n[28] = "";
}
if ($row['g_mod_websites'] == 1) {
$y[29] = "checked";
$n[29] = "";
}
if ($row['g_access_tutorials'] == 1) {
$y[30] = "checked";
$n[30] = "";
}
if ($row['g_send_tutorials'] == 1) {
$y[31] = "checked";
$n[31] = "";
}
if ($row['g_mod_tutorials'] == 1) {
$y[32] = "checked";
$n[32] = "";

[edited by: eelixduppy at 3:04 am (utc) on Mar. 10, 2007]
[edit reason] removed specifics [/edit]

cmarshall

3:49 am on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! This is a great place to hang.

I don't see anything visible, but I have been nailed by "gremlins" before. These are either invisible, or "look alike" characters that don't fit the programming language's idea of proper code.

I use a text editor with a "zap gremlins" feature, and it has solved very similar issues for me before.

eelixduppy

6:46 am on Mar 10, 2007 (gmt 0)



Definitely don't see anything, holla. Are you sure that this is the correct line in the script? Are you getting any other errors? This one seems "fishy" :)

holla

11:09 am on Mar 10, 2007 (gmt 0)

10+ Year Member



well i wondered with it saying checked what is it mento to be checking and have i messed that file up that is definatly the line, also where can i download that program?

cmarshall

12:47 pm on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP line numbers are not always accurate for that particular error. I often get errors reported for lines that close an improperly closed brace, etc.

The same "zap gremlins" text editor I use (BBEdit for Mac) also has some good code-balancing checks.

Oh, yeah. The #1 reason I get that error is because I didn't end a line with a semicolon. Drives me nuts, because sometimes I program in Python, and you never use semicolons in Python.

You may also want to carefully read the error, and make sure you have the right file. PHP is very nice about informing me of errors in included files.