On 12/16/2015 8:51 PM, N/A Programmer 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
Connect with Us