I have a 638 line glob of PHP code & HTML that won't run.
I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.php
on line 594".
I wrote a brace checker that checks perens, square brackets, and curly
braces for mismatches & opens and it checks out perfect. so I don't
know what it is about the curly brace error. it's false.
anybody have a clue as to what the real error might be? the code looks
pristine to me.
------------------------------------
Jim Michaels
for email, edit the address
"Because we do not understand the brain very well we are constantly
tempted to use the latest technology as a model for trying to understand
it. In my childhood we were always assured that the brain was a
telephone switchboard. ('What else could it be?') I was amused to see
that Sherrington, the great British neuroscientist, thought that the
brain worked like a telegraph system. Freud often compared the brain to
hydraulic and electro-magnetic systems. Leibniz compared it to a mill,
and I am told some of the ancient Greeks thought the brain functions
like a catapult. At present, obviously, the metaphor is the digital
computer." - John R Searls. 20 3168
"Jim Michaels" <jm************ @THISPLEASEyaho o.comwrote in message
news:Fd******** *************** *******@comcast .com...
>I have a 638 line glob of PHP code & HTML that won't run.
I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.php on
line 594".
I wrote a brace checker that checks perens, square brackets, and curly
braces for mismatches & opens and it checks out perfect. so I don't know
what it is about the curly brace error. it's false.
anybody have a clue as to what the real error might be? the code looks
pristine to me.
It does appear, from that description, that the error is in error.
But, just on a lark, look to see if you have "{$" inside a string somewhere.
Curly bracket followed by a dollar sign tells PHP that it's a complex,
inline variable.
So, if you that, it could produce the error you describe, without raising
the alarm with your bracket-checker.
>
------------------------------------
Jim Michaels
for email, edit the address
"Because we do not understand the brain very well we are constantly
tempted to use the latest technology as a model for trying to understand
it. In my childhood we were always assured that the brain was a telephone
switchboard. ('What else could it be?') I was amused to see that
Sherrington, the great British neuroscientist, thought that the brain
worked like a telegraph system. Freud often compared the brain to
hydraulic and electro-magnetic systems. Leibniz compared it to a mill, and
I am told some of the ancient Greeks thought the brain functions like a
catapult. At present, obviously, the metaphor is the digital
puter." - John R Searls.
Jim Michaels wrote:
I have a 638 line glob of PHP code & HTML that won't run.
I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.php
on line 594".
I wrote a brace checker that checks perens, square brackets, and curly
braces for mismatches & opens and it checks out perfect. so I don't
know what it is about the curly brace error. it's false.
anybody have a clue as to what the real error might be? the code looks
pristine to me.
------------------------------------
Jim Michaels
for email, edit the address
"Because we do not understand the brain very well we are constantly
tempted to use the latest technology as a model for trying to understand
it. In my childhood we were always assured that the brain was a
telephone switchboard. ('What else could it be?') I was amused to see
that Sherrington, the great British neuroscientist, thought that the
brain worked like a telegraph system. Freud often compared the brain to
hydraulic and electro-magnetic systems. Leibniz compared it to a mill,
and I am told some of the ancient Greeks thought the brain functions
like a catapult. At present, obviously, the metaphor is the digital
computer." - John R Searls.
Jim,
Obviously there's a mismatch somewhere :-). Did your brace checker
ignore braces within strings? Or within comments? Either one can throw
it off.
Try a editor with syntax highlighting. On Windows I recommend Crimson;
it has the added advantage of matching up braces for you.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
On Mon, 19 Nov 2007 06:44:14 +0100, Jim Michaels
<jm************ @THISPLEASEyaho o.comwrote:
I have a 638 line glob of PHP code & HTML that won't run.
I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.php
on line 594".
I wrote a brace checker that checks perens, square brackets, and curly
braces for mismatches & opens and it checks out perfect. so I don't
know what it is about the curly brace error. it's false.
anybody have a clue as to what the real error might be? the code looks
pristine to me.
An unexpected '}' doesn't mean that curly brace should not be there. For
me, most of the time I get this it means the previous expression wasn't
finished (missing ')' or ';'). If you'd have posted you code leading up to
the offending brace at line 594 maybe we could spot it...
--
Rik Wasmus
Jerry Stuckle wrote:
Jim Michaels wrote:
>I have a 638 line glob of PHP code & HTML that won't run. I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.p hp on line 594". I wrote a brace checker that checks perens, square brackets, and curly braces for mismatches & opens and it checks out perfect. so I don't know what it is about the curly brace error. it's false. anybody have a clue as to what the real error might be? the code looks pristine to me.
------------------------------------ Jim Michaels for email, edit the address
"Because we do not understand the brain very well we are constantly tempted to use the latest technology as a model for trying to understand it. In my childhood we were always assured that the brain was a telephone switchboard. ('What else could it be?') I was amused to see that Sherrington, the great British neuroscientist, thought that the brain worked like a telegraph system. Freud often compared the brain to hydraulic and electro-magnetic systems. Leibniz compared it to a mill, and I am told some of the ancient Greeks thought the brain functions like a catapult. At present, obviously, the metaphor is the digital computer." - John R Searls.
Jim,
Obviously there's a mismatch somewhere :-). Did your brace checker
ignore braces within strings? Or within comments? Either one can throw
it off.
Try a editor with syntax highlighting. On Windows I recommend Crimson;
it has the added advantage of matching up braces for you.
it ignores within comments. and as I said, braces match.
--
------------------------------------
Jim Michaels
for email, edit the address
"Because we do not understand the brain very well we are constantly
tempted to use the latest technology as a model for trying to understand
it. In my childhood we were always assured that the brain was a
telephone switchboard. ('What else could it be?') I was amused to see
that Sherrington, the great British neuroscientist, thought that the
brain worked like a telegraph system. Freud often compared the brain to
hydraulic and electro-magnetic systems. Leibniz compared it to a mill,
and I am told some of the ancient Greeks thought the brain functions
like a catapult. At present, obviously, the metaphor is the digital
computer." - John R Searls.
On Tue, 20 Nov 2007 06:26:15 +0100, Jim Michaels
<jm************ @THISPLEASEyaho o.comwrote:
Rik Wasmus wrote:
If you'd have posted you code leading up
>to the offending brace at line 594 maybe we could spot it...
I need a 2nd pair of eyes on this problem.
Guess what? We do need the lines to see...
(And thanks for the correct sig seperator BTW :) )
--
Rik Wasmus
Jim Michaels schrieb:
>>I have a 638 line glob of PHP code & HTML that won't run. I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.ph p on line 594".
Your attachment won't help, the error is not in quiztaker.php but in
quiz.php,
OLLi
--
Cordy: "I think it - I say it. It's my way."
[Angel 107]
On Wed, 21 Nov 2007 20:13:45 +0100, Oliver Grätz <ol***********@ gmx.de>
wrote:
Jim Michaels schrieb:
>>>I have a 638 line glob of PHP code & HTML that won't run. I get "PHP Parse error: syntax error, unexpected '}' in quiz\\quiz.p hp on line 594".
Your attachment won't help, the error is not in quiztaker.php but in
quiz.php,
Ah, an attachment, that's why there was no code in the post. As this group
hasn't got 'binary' or 'binaries' in its name it didn't even occur to
check to me to check for that :).
Allthough it's a big nono to post attachments, a quick look learns me I
will unfortunatly not check this code. This is truly a maintenance
nightmare. Templates and/or isolating some deeply nested
if/else/while/switch statements seems to be badly needed.
--
Rik Wasmus
Rik Wasmus schrieb:
Allthough it's a big nono to post attachments, a quick look learns me I
will unfortunatly not check this code. This is truly a maintenance
nightmare. Templates and/or isolating some deeply nested
if/else/while/switch statements seems to be badly needed.
A "php -l" did not yield a parsing error AND the file is 692 lines long
(not 638) AND it is not matching the filename from the error message, so
I doubt the file in question was attached...
Your remarks about isolating are right. Just take out inner blocks until
the error message fades away. Go back one step and find the error
position...
OLLi
--
"My urination just hasn't been public enough lately."
[Cordelia in Angel 105] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robert Mazur |
last post by:
MySQL 5.0 alpha (binary install) on
Solaris 9 -or- RedHat 8.0
mysql-connector-java-3.0.8-stable
-----------------------
Is there something different going on with JDBC and the alpha version
of MySQL 5.0? When trying to connect I am getting:
** BEGIN NESTED EXCEPTION **
|
by: Ken |
last post by:
Any thoughts on making explicit calls to unexpected()? My sense is
that this function is really intended to be invoked automatically as
part of exception handling. Are there times when explicit calls would
be useful? Or would doing so introduce bug risks or maintanance
headaches unnecessarily?
Thanks for any opinions!
Ken
|
by: Teddy |
last post by:
Hello all
According to "Think in C++ Volume2", the code below should run
smoothly:
#include <iostream>
#include <exception>
using namespace std;
class ex {
};
|
by: Gerhard Esterhuizen |
last post by:
Hi,
I am observing unexpected behaviour, in the form of a corrupted class
member access, from a simple C++ program that accesses an attribute
declared in a virtual base class via a chain of virtual method calls.
To further complicate (or perhaps simplify) matters, some compilers
(GCC and MingW) produce the expected behaviour, while others (MSVS 7.1)
do not. I can only offer two explanations for my observations:
1. The Microsoft...
|
by: Eric Anderson Vianet SAO |
last post by:
hello all
When i tried ´pg_dump -v -f dump.dmp dtbtransporte´ I got the error:
pg_dump: restoring data for table tbdmovimento
pg_dump: dumping out the contents of table tbdmovimento
pg_dump: ERROR: unexpected chunk number 8 (expected 0) for toast value 6935693
| |
by: Vijayakrishna Pondala |
last post by:
Hi,
We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:
The underlying connection was closed: An unexpected error occurred on a
receive.
We are using .NET v1.1.
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by including the -q64 option in
xlC compiler. And we are able to link all these libraries to one of
the main applications and generate an executable. SKLoader. But, when
we try to run this main executable, we are getting the following
errors:
|
by: Jim Michaels |
last post by:
C:\prj\quiz\withusers>php tareports.php
PHP Parse error: syntax error, unexpected T_ELSE in
C:\prj\quiz\withusers\tareports.php on line 205
this is the section of code.
if (isset($row4)) {
if (isset($row5)) { //answer given?
if ($row4==$row5) {
|
by: Anup Daware |
last post by:
Hi Group,
I am facing a strange problem here:
I am trying to read xml response from a servlet using XmlTextWriter.
I am able to read the read half of the xml and suddenly an exception:
“Unexpected end of file while parsing Name has occurred†isbeing
thrown.
Following is the part o xml I am trying to read:
<CHECK_ITEM_OUT>
|
by: bintom |
last post by:
I ran the following simple code in C++ and got unexpected results:
float f = 139.4;
cout << f;
Output:
139.399994;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |