Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Fatal error: 'break' not in the 'loop' or 'switch' context


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Dec 17, 2015 1:00 PM Last Post By: Milan Vydareny Threads: [ Previous | Next ]
Milan Vydareny

Posts: 17
Registered: 11/6/11
Fatal error: 'break' not in the 'loop' or 'switch' context  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 11:45 AM
Fatal error: 'break' not in the 'loop' or 'switch' context:

I'm just starting to explore HTML5 Builder and am having difficulty with
what looks like a trivial task.

Working with the Server Mobile Hello World tutorial at the very
beginning of the Help file, I am unable to successfully execute the
deployed the code. It deploys successfully to my local webserver and to
my Android tablet. However, when I try to execute the Android app it
displays the "Error loading page" message. If attempt to display the
page in a web browser I receive the message:

Fatal error: 'break' not in the 'loop' or 'switch' context in
C:\inetpub\wwwroot\ServerMobile\rpcl\extctrls.inc.php on line 3496

If I check line 3496, there is indeed a break that seems to be a coding
error. (I'm very new to PHP so I'm no expert.)

I have also tried to explore my PHP.ini settings to see if I may have
some settings that are incorrect, but so far haven't been able to spot
any significant differences between the php.ini.template of H5b and my
php.ini.

I'm using IIS 7 as a local webserver and PHP 7.0.0 as my PHP component.
(This may also be a factor in my difficulties.)

Any suggestions for resolving this would be appreciated.
--
Milan Vydareny
Erick Engelke

Posts: 101
Registered: 12/5/02
Re: Fatal error: 'break' not in the 'loop' or 'switch' context  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 6:51 PM   in response to: Milan Vydareny in response to: Milan Vydareny
Milan Vydareny wrote:
Fatal error: 'break' not in the 'loop' or 'switch' context:

I'm just starting to explore HTML5 Builder and am having difficulty with
what looks like a trivial task.

Working with the Server Mobile Hello World tutorial at the very
beginning of the Help file, I am unable to successfully execute the
deployed the code. It deploys successfully to my local webserver and to
my Android tablet. However, when I try to execute the Android app it
displays the "Error loading page" message. If attempt to display the
page in a web browser I receive the message:

Fatal error: 'break' not in the 'loop' or 'switch' context in
C:\inetpub\wwwroot\ServerMobile\rpcl\extctrls.inc.php on line 3496

If I check line 3496, there is indeed a break that seems to be a coding
error. (I'm very new to PHP so I'm no expert.)

I have also tried to explore my PHP.ini settings to see if I may have
some settings that are incorrect, but so far haven't been able to spot
any significant differences between the php.ini.template of H5b and my
php.ini.

I'm using IIS 7 as a local webserver and PHP 7.0.0 as my PHP component.
(This may also be a factor in my difficulties.)

Any suggestions for resolving this would be appreciated.
--
Milan Vydareny

The RPCL code shipped with H5B is almost certalnly not PHP 7 compatible yet.
I think my servers are running PHP 5.6.8

Most open source systems have kind of a Trusted/Stable branch and a new fangled exploratory branch. The newest has the coolest features, but the old ones aren't dead. They update security releases in older versions for a few years so you have stability.

Why does this matter? Well, some companies use a beta version of a compiler, on a beta version of an OS to write code they ship to customers, and people wonder why it breaks so often. Usually the stable branches are one or two versions old and have had most of their bugs worked out when they get past version x.1.9. ;-)

Erick
--
Erick Engelke
HTML5 Builder Book
http://www.erickengelke.com
Milan Vydareny

Posts: 17
Registered: 11/6/11
Re: Fatal error: 'break' not in the 'loop' or 'switch' context  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2015 10:43 PM   in response to: Erick Engelke in response to: Erick Engelke
On 12/16/2015 8:51 PM, N/A Programmer wrote:
Milan Vydareny wrote:
Fatal error: 'break' not in the 'loop' or 'switch' context:

I'm just starting to explore HTML5 Builder and am having difficulty with
what looks like a trivial task.

Working with the Server Mobile Hello World tutorial at the very
beginning of the Help file, I am unable to successfully execute the
deployed the code. It deploys successfully to my local webserver and to
my Android tablet. However, when I try to execute the Android app it
displays the "Error loading page" message. If attempt to display the
page in a web browser I receive the message:

Fatal error: 'break' not in the 'loop' or 'switch' context in
C:\inetpub\wwwroot\ServerMobile\rpcl\extctrls.inc.php on line 3496

If I check line 3496, there is indeed a break that seems to be a coding
error. (I'm very new to PHP so I'm no expert.)

I have also tried to explore my PHP.ini settings to see if I may have
some settings that are incorrect, but so far haven't been able to spot
any significant differences between the php.ini.template of H5b and my
php.ini.

I'm using IIS 7 as a local webserver and PHP 7.0.0 as my PHP component.
(This may also be a factor in my difficulties.)

Any suggestions for resolving this would be appreciated.
--
Milan Vydareny

The RPCL code shipped with H5B is almost certalnly not PHP 7 compatible yet.
I think my servers are running PHP 5.6.8

Most open source systems have kind of a Trusted/Stable branch and a new fangled exploratory branch. The newest has the coolest features, but the old ones aren't dead. They update security releases in older versions for a few years so you have stability.

Why does this matter? Well, some companies use a beta version of a compiler, on a beta version of an OS to write code they ship to customers, and people wonder why it breaks so often. Usually the stable branches are one or two versions old and have had most of their bugs worked out when they get past version x.1.9. ;-)

Erick
--
Erick Engelke
HTML5 Builder Book
http://www.erickengelke.com
Now that I'm getting more familiar with configuring IIS and PHP I'll try
one of the older versions of PHP. I use a test instance of IIS on my
workstation, so trashing something is not a major concern.

My copy of your book arrived today. I've only had time to work through
Chapter 1 but I do have several margin notes that I'll be happy to share
with you. If you want them, let me know how you want to receive them.

MV

PS: Changing the offending line from Break to Return clears the error
and permits the Chapter 1 example to run successfully.

--
Milan Vydareny
Erick Engelke

Posts: 101
Registered: 12/5/02
Re: Fatal error: 'break' not in the 'loop' or 'switch' context  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 17, 2015 6:39 AM   in response to: Milan Vydareny in response to: Milan Vydareny
Now that I'm getting more familiar with configuring IIS and PHP I'll try
one of the older versions of PHP. I use a test instance of IIS on my
workstation, so trashing something is not a major concern.

The H5B development environment puts Apache on a non-standard port, so it won't conflict with IIS
or other Apache's installed on the same machine.


My copy of your book arrived today. I've only had time to work through
Chapter 1 but I do have several margin notes that I'll be happy to share
with you. If you want them, let me know how you want to receive them.

Email to erickengelke at gmail dot com I appreciate all feedback and criticism.

I will gladly make an errata sheet available when I get more input. Hopefully even an expanded second edition at some point.

PS: Changing the offending line from Break to Return clears the error
and permits the Chapter 1 example to run successfully.

That's good news. There are a few bugs in RPCL. In the book I mention how to navigate some of the worst ones. I do hope there will be another release of H5B in the coming year - even if just to fix bugs and update versions.

Erick

--
Erick Engelke
HTML5 Builder Book
http://www.erickengelke.com

Milan Vydareny

Posts: 17
Registered: 11/6/11
Re: Fatal error: 'break' not in the 'loop' or 'switch' context  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 17, 2015 1:00 PM   in response to: Erick Engelke in response to: Erick Engelke
On 12/17/2015 8:39 AM, N/A Programmer wrote:
PS: Changing the offending line from Break to Return clears the error
and permits the Chapter 1 example to run successfully.

That's good news. There are a few bugs in RPCL. In the book I mention how to navigate some of the worst ones. I do hope there will be another release of H5B in the coming year - even if just to fix bugs and update versions.

Erick

--
Erick Engelke
HTML5 Builder Book
http://www.erickengelke.com

Switched my IIS to use PHP 5.6.16 and the fatal error does not occur. So
it clearly seems to be related to trying to run with PHP 7.0.0.

--
Milan Vydareny
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02