Page 1 of 1

Weird error

Posted: Sat Aug 31, 2002 1:50 pm
by rfigley
I'm getting this error for my script:

Parse error: parse error, unexpected $ in /home/name/public_html/page.php on line 65

This is a blank line after the script ends. Must be something in the code causeing it but no idea what?

Posted: Sat Aug 31, 2002 2:00 pm
by Dale
whats on line 60, 61, 62, 63, 64 and 65????

Posted: Sat Aug 31, 2002 8:31 pm
by gotDNS
You probably just put a $ where it shouldn't be....like if you did this:

Code: Select all

if(session_is_registered("$registered"))
and it should be:

Code: Select all

if(session_is_registered("registered"))
that may be the kind of thing you did, so just check. If not, it would be nice to see line 65.

later on, -Brian

Re: Weird error

Posted: Sun Sep 01, 2002 1:54 am
by gite_ashish
Hi,

ERROR:

Parse error: parse error, unexpected $ in /home/name/public_html/page.php on line 65

:idea: >> This is a blank line after the script ends. <<

The above line is important. If line 65 is the last line, then i think you are having some { or } mismatch.

Check the constructs like - if, else, while, for - etc.

All the best,

Posted: Sun Sep 01, 2002 9:56 am
by gotDNS
hey, Gite, I had actually suggested the same thing, then edited my entry otherwise. Would it give you an error concerning '$' if it was '{}' problem? I wasn't sure.

later on, -Brian

Posted: Sun Sep 01, 2002 10:03 am
by volka
you may use the command line version of the php interpreter with the -l option to only check the syntax of a script.
This is sometimes useful because you can comment out blocks or lines of code and check the script again to find the faulty part of it without running the partial script (if working).