Hello everyone,
I am trying to install Erpal 7.x-2.3 on a Windows 10 computer with Apache 2.4.23 WIN 64 VC14, PHP 7.0.12 VC 14 x64, and MySQL 5.7.16.0, as a local install. When running the install.php script, I had issues with Verifying Requirements. Got those fixed, and have been able to proceed. I got as far as selecting "Quick Installation", the progress bar showed 100% (I assumed it finished installing) and then get the following error message:
Fatal error: 'continue' not in the 'loop' or 'switch' context in C:\Apache24\htdocs\erpal\profiles\erpal\modules\contrib\editablefields\editablefields.module on line 214

I had a similar error before, (i have dumped the database and reinstalled several times), except it said 'break' not in the 'loop' or 'switch' context in.....(fixed by commenting out ''break;'' I also got the AJAX error 200, and seem to have fixed them. Clicking on the "continue to error page" brings me to a white page with the error printed at the top. I can't go any farther than this with the install process. Anyone have any ideas?

Comments

Guitar-D created an issue. See original summary.

Francewhoa’s picture

Guitar-D :) I'm not familiar with that specific error

I suggest to double check all those ERPAL requirements. And double check your PHP version. What is your PHP version? If it's PHP 5.3 or more recent, and PHP 6.x or less. it should work.

The likely cause of the issue is PHP 7.x. "Since in PHP 7.0 and higher, a break statement is no longer permitted outside of for, foreach or switch statements and gives a fatal error."

If needed IIS claimed that you can run multiple versions of PHP on Windows

Another option is to run your ERPAL on Linux. Such as the free Debian. Which is owned and supported by a community. Available PHP versions here. Jessie 8 is the current stable version with 5.6.x.

Francewhoa’s picture

Status: Active » Needs review
Related issues: +#2686329: PHP 7 Compatiblity

Guitar-D :) We had the same error on one of our server.

The Ubertus team identified a few more options to resolved that error. In your case that option 2 might be the easiest. About applying a patch. Are you interested to try it and let us know here if working?

Guitar-D’s picture

I would try applying a patch to fix this error. The only thing is that I was riddled with errors during installation, and never did make it completely through the install process. If you would like me to try the patch as a way for the Erpal team to work towards being compatible with PHP 7, I would be glad to help.

In doing more research over the last few days, I realized that most of the errors I encountered during installation were for modules, which I now realized all have their own pages where bug fixes and issues can be reported. Would it be better for me to report the remaining issues to the ones developing these modules?

Francewhoa’s picture

I would try applying a patch to fix this error. The only thing is that I was riddled with errors during installation, and never did make it completely through the install process. If you would like me to try the patch as a way for the Erpal team to work towards being compatible with PHP 7, I would be glad to help.

Guitar-D :) Your contributions are welcome. Yes if you are interested to test that patch and post the result here that would be appreciated. Welcome to the Drupal community :) If you are not familiar with patches, I suggest to double check that that patch is compatible with the module version that comes with ERPAL. Also to not loose your valuable data, I suggest to test that patch on a non-production environment first. Such as a development or test environment.

In doing more research over the last few days, I realized that most of the errors I encountered during installation were for modules, which I now realized all have their own pages where bug fixes and issues can be reported. Would it be better for me to report the remaining issues to the ones developing these modules?

Yes. If you know which module caused the error you will get a much faster response by reporting the issue to each module issue queue.

About the other errors during ERPAL installation, you will get a much faster response this ERPAL issue queue. Have you tried that ERPAL documentation page? At the bottom of that page there is a list of links. They contain solutions to the most frequent errors during ERPAL installation.