On 13 Oct 2011, at 18:06, David Savage wrote:
> I'm sorry....I need help with php v. 4.3.9 (cgi). I don't know where else to
> turn. I've looked on the php.net web site for details on this particular
> error, but am unable to find any.
>
> this is the version I use.
> php -v
> PHP 4.3.9 (cgi) (built: Jun 26 2006 09:46:03)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> I run the following command, and getting the following compile error on a
> linux environment:
> 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
>
> here is a portion of the code that includes the line number mentioned:
> if ($destlen==11) {
> $start_from_which_offset=1;
> }
> if ($destlen==10) {
> $start_from_which_offset=0;
> }
> $termnum10=substr($dest, $start_from_which_offset,10);
> $alias_sql_stmt="SELECT ani FROM ldrates WHERE
> ani='$termnum10'"; // <-----this is line 1050
> print "$alias_sql_stmt\n";
> $alias_result = $db->sql_query($alias_sql_stmt);
> if ($alias_result==TRUE) {
> if($db->sql_numrows($alias_result) > 0) {
> print "Found alias...\n";
> continue;
> }
> } else {
> die("problem with sql: $alias_sql_stmt");
> }
>
> 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.
There is nothing wrong with the code you've posted...
stuart@willow:~$ php -l test.php
No syntax errors detected in test.php
Which means the error is likely above that in the file.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php