PHP, browser crashes due to For loop errors

Course Wide errors:

Course: PHP

Error Level: 6

(See "Additional Information" for more information on Error Levels)



It’s been brought to my attention on several occasions, as well as experiencing the error myself that the PHP courses have a bug that mostly involves “for” loops. I will be discussing a few possibilities below as to how to fix this error, as well as an explanation as to how I believe this error to be occurring.

Description of Error:

When programming for loops in PHP many individuals will experience the website crashing, refreshing at a frequented rate, and being unable to submit code for the lesson. The lesson will error out, and not allow the user to pass and requires an inordinate amount of patience to pass. This error is most likely caused by the courses constant update system; which causes any action by the user to potentially crash the browser.

Current solutions to the Problem:

The way I was able to pass the course, whenever using for loops more specifically, was to comment out all of my code until it was completed, and then uncommenting the code from the bottom of the for loop to the top of the for loop. This still sometimes caused crashes of my browser so my answer may have simply been a coincidence. I have not heard of any other way to complete the course.

Proposed Solution:

If possible, I believe the solution to the problem would be to have the contractor for the course redo the system just so that it doesn't have a constant refresh rate. I'm not assuming this would be a simple fix, however it is in my opinion that this must be done for the reasons I have supplied in this post.

Closing Arguments

For the assurance of further use in the PHP course, it is of many members concern that action must be taken for this to correct the errors presented in this topic. Many individuals are having the same issues and are incapable of passing lessons due to the examples I have provided.

Thank you in advance for your cooperation and expedient reply.

Do you want this error fixed?

(Select an option below) [poll] - Yes! Please help! - No, This argument is wrong. - This doesn't apply to me. [/poll]

Additional Information:

Error Levels: (Only for Codecademy Programming section. Not Forums related issues.) 1) Minor bug, effects very few people. 2) Minor bug, can be replicated. 3) Minor error, Specific to a lesson. 4) Minor error, Specific to a course. 5) Error that stops the user from coding, Specific to lesson. 6) Error that stops the user from coding, Specific to Course. 7) Error that stops the user from coding, Codecademy wide. 8) Major Error that in some way changes or disables CodeCademy. 9) Major Error that in some way affects the users browser or computer 10) Virus or otherwise Damaging issue related problem.
1 Like

Very formal complaint @lolman, I like it… The post, not the bug! … Although I haven’t been able to get to this part of the course yet because of that stupid spinning gear! @alexcommunitymgr get this fixed please, ASAP!!

Thanks, JibblyJ. :heart:

1 Like

IN the meantime, preface your code with a simple, easy to remove in one step error:

<?php else ?>

Thanks @lolman

Thanks for the feedback! I’ll pass it along to the rest of the team. Please feel free to keep sending us your feedback on the Codecademy product. It’s what makes us better every iteration.

For infinite loops, I’d recommend refreshing your page and trying again. If that doesn’t work, please open an incognito window and finish your exercise there. You’ll have to change your code to make sure that you’ve fixed your loop.

Thank you,
-Codecademy Community Manager