Re: unexpected }



Jim Michaels wrote:
Jerry Stuckle wrote:
Oliver Grätz wrote:
Rik Wasmus schrieb:
Win64,
PHP 5.2.4 (cli) (built: Aug 30 2007 07:06:31),
Parse error: syntax error, unexpected '}' in quiztaker.php on line 648

Weird....
md5_file() => f0fa03b6e3479c5f45ff6f0174ad378d
Yours?

php -r "echo md5_file('quiztaker.php')";
f0fa03b6e3479c5f45ff6f0174ad378d

Nope, we're shoveling the same coals into the engine...

And I can even get some HTML output from the script after changing the
top of the file to

<?php
function getconfigvar() {return '';}
$_SESSION['minutes']=(int)(ini_get("session.gc_maxlifetime")/60);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
// now the rest follows...

so this is no fake OK message. It reallys seems to have something to do
with some very subtle differences in the PHP version or configuration.
Hard to catch, giving up...

OLLi


Remember, when you include the file, it's effectively the same as copying/pasting the source into the file. IOW, a syntax error (i.e. an unmatched '"'( can be carried over into the included file.


when I edited in dreamweaver 8 I don't think I saw any strings out of place.
I am using 3 different versions of PHP. PHP4 & PHP5 from XAMPP, PHP 5.2.3 CLI win32. ALL fail. all have warnings and errors set to full blast. with XAMPP, all errors are fed into apache/error.log.

I get some HTML, but it's essentially <body></body> with nothing in between. the basic HTML page. I also get an error message about the curly brace in the error log.
with the win32 version I get the error message straignt out on the command-line.
I'll try removing sections under a different filename and see what happens.
------------------------------------
Jim Michaels


Which says you have a basic syntax error.

Don't trust Dreamweaver (or any other editor) to do your work for you. They all can make mistakes. And ultimately, YOU are responsible for the code.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: unexpected }
    ... a syntax error (i.e. an unmatched '"'(can be carried over into the included file. ... CLI win32. ... I get some HTML, but it's essentially with nothing in between. ... I also get an error message about the curly brace in the error log. ...
    (comp.lang.php)
  • Re: Help with Docmd Open form
    ... of "Time card 2" I have used this code but I get an error message ... that says "Syntax error" ... subform of the form you want to open. ...
    (microsoft.public.access.formscoding)
  • Re: CRecordset::Open error
    ... get way from the pain of MFC data access ... This resulted in the folling error message: ... This gave the same syntax error. ... term in your query that's not in your table. ...
    (microsoft.public.vc.mfc)
  • Re: Function Help Required
    ... error icon to get a full error message. ... A syntax error most ... I am amending a web site and I have very little knowledge of ... Also are you sure all DBxxx inputs are eitther empty or just contain ...
    (microsoft.public.scripting.jscript)
  • Re: Filling a listbox with contents of an array
    ... Jim Michaels wrote: ... The error message is: ... I have spent quite a bit of time searching on google for the answer ... you have to cycle through the items. ...
    (microsoft.public.vb.controls)