PLEASE INCLUDE THE LIST WHEN REPLYING! On 17 Oct 2011, at 18:21, David Savage wrote: > No... I log into a linux box, and use the vi editor (actually I use 'view', which is vi but without the color highlighting which is somewhat hard to see on some colors, such as blue on a black screen). As I said, get one. There are loads of free editors for all operating systems that do syntax highlighting for PHP. Get one, load the file up in that and have a look. -Stuart > From: Stuart Dallas [mailto:stuart@xxxxxxxx] > Sent: Thu 10/13/2011 1:43 PM > To: David Savage > Cc: PHP General > Subject: Re: FW: parse error > > Please include the list when replying. > > On 13 Oct 2011, at 19:44, David Savage wrote: > >> ok thanks for the quick reply. Still trying to figure out the line that is causing the problem above that line 1050....I'm a novice at php, and currently use it just for console programming, though I want to eventually learn how to place html code in it, and make it simpler to run this program in a web browser, instead of by the command line. > > Are you using an editor that does syntax highlighting? If not, find one and load up the file. If you have an unterminated string or similar error, the highlighting should tell you where that problem is. > > -Stuart > >> From: Stuart Dallas [mailto:stuart@xxxxxxxx] >> Sent: Thu 10/13/2011 12:04 PM >> To: David Savage >> Cc: php-general@xxxxxxxxxxxxx >> Subject: Re: FW: parse error >> >> 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/ >> -- Stuart Dallas 3ft9 Ltd http://3ft9.com/