Forever Loading issue


#1



<html>
  <head>
    <title>Solo For Loop!</title>
  </head>
  <body>
    <p>
      <?php
      // Write your for loop below!
      for ($i = 0; $i < 101; $i = $i + 10) {
    echo $i;
}
      ?>
    </p>
  </body>
</html>

When i press save and submit it just shows the spinning cog icon forever, it never gives me the success icon


#2

Refresh your browser! :slight_smile:


#3

Especially while you are in the loop section, but generally speaking anywhere in the PHP track it is a good idea to start each new lesson by pasting this in above the working code.

<?php else ?>

This will raise a parsing error that will disable the auto-refresh. With that out of the way you can code away with no bother. When ready to Save and Submit, remove that bit of code by cutting it so you can paste in the next lesson.


#4

Still having the same issue even when doing this. I'll try again when i'm using my school internet.


#5

Please include a link to the exercise so we can test your code. Thank you.


#6

https://www.codecademy.com/courses/web-beginner-en-L83Do/0/3?curriculum_id=5124ef4c78d510dd89003eb8#


#7

I tried your code after changing the $i = 0 to $i = 10 and it ran and passed. Try to refresh the page, or go back a lesson then advance to this one and try again.


#8

Your second tip of going back to a lesson and advancing to this one worked :slight_smile:
thanks!


#9

Uhhhh
So I went back onto my http://www.codecademy.com/en/tracks/php
page and it turns out that it didn't mark the exercise as complete even though it came up with the success button.
EDIT: So i went back and did the thing that marked it as a success before, but it came up with the same forever loading error.


#10

Copy your code to notepad. Reset the lesson and Refresh the page. Paste in the code to disable the auto-refresh. Paste your code back in and check it thoroughly for mistakes and againt the instructions. Cut the disabling code and Save.


#11

when i refresh the page, it auto loads the code which i know DOES have an infinite loop, instead of the blank template.
Could this be contributing to the issue?
also the preview area looks like this:
:


#12

Okay, now that makes sense. We need to wrestle control over the preview window to prevent execution on page load.

  1. Go to previous lessson.
  2. Set screen zoom sufficiently high so that the preview window disappears from view. Upwards of 200% scale.
  3. Advance to the next lesson.
  4. Copy the code on the screen to notepad so you can study the errors
  5. Reset the exercise
  6. Refresh
  7. Paste or type in the Lomborg-error, <?php else ?>
  8. Restore 100% zoom.

#13

Finally!
Thank you so much for your help and patience!!
:smiley:
No longer stuck on 98% completion! xD
Thank you so much :slight_smile: