Forum Moderators: coopster
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]
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.
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.