Re: FW: parse error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 01:26 PM 10/13/2011, Robert Williams wrote:
On 10/13/11 10:06, "David Savage" <dsavage@xxxxxxxxxxxx> wrote:


>php -l voip_cdrs.php
>PHP Parse error:  parse error, unexpected T_STRING in
>/usr/local/cytrex/voip_cdrs.php on line 1050
>Errors parsing voip_cdrs.php
>
>                     $alias_sql_stmt="SELECT ani FROM ldrates WHERE
>ani='$termnum10'";    // <-----this is line 1050
>
>Could you please tell me what's wrong with the line 1050 ?   I've been
>pulling my hair out (figuratively speaking) trying to understand why the
>compiler sees this line as a problem.  Thanks for whatever help you can
>give.

My suspicion is that there's is an unmatched curly brace earlier in the
file. With this type of error, you'll generally get a report of a bad line
further down the file--sometimes way down--because the parser can't
recognize until it hits the later point that something is wrong. Try
double-checking that the {?} blocks prior to line 1050 properly balance,
and you'll probably find there's an extra one, or that one is missing, etc.

It's more likely an unterminated quoted string. It looks like PHP is giving up after finding unrecognizable stuff after either the first double or single quote on that line. If you're using an editor that doesn't do syntax high lighting, get one.

Ken

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux