Filled the site to the server. Appeared SUDDEN problem with captcha. When a form appears instead of a captcha - a picture that indicates for sure that the file-picture was not found. When updating the captcha, the picture finally appears. html captcha code: <img src="captcha.php" id="captcha" />

Captcha update (js):

  img.src = "captcha.php?number=" + parseInt(Math.random()*1000); 

This code works great in Denver, what's the matter? Where does the file disappear when the page loads?

  • one
    Nothing is clear. @Deus, try to describe in more detail what is wrong. Forget about your project and re-read the question. What happens, what a picture that indicates that the file was not found, at what update is the captcha (update version? Does the update of the captcha picture itself?) Does the picture finally appear? What do you mean? The code that you posted is not talking about anything. Looking for logs. There are always answers. - KryDos
  • Thank you for noticing, everything is fine, just the site has just been flooded, but they probably still haven’t figured out the paths, just checked - there is a captcha. - Deus

1 answer 1

I, of course, not a telepath. But I strongly suspect that captcha.php has something like:

 if( isset($_GET['number']) ) { /* показать капчу с числом */ } 

Therefore, I propose to look at the source captcha on its own and try to answer your own question. And / or to start, look into the server logs, search for lines with captcha.php and meditate on them. And / or run wget -S http://test.ru/captcha.php and meditate on what you see ...

  • @klopp, everything is ok. The problem was not in the code, but on the server, thanks. - Deus