Let’s say on the site I appeal to the
getip.php file, which is looking for new
IP at the well-known site addresses (this is all about the cycle). While he is looking for, no one can go to the site.
- What does this mean that PCP is single-throat?
- and there are languages in which there are many streams and on which sites do like PHP?
- How to implement in PHP a lot of streams so that there were no such problems?
- mysql also works in one thread?
- let’s say we will be able to make a multi-threaded PHP, will the connection to MySQL multi-threaded or solitary?
Explain, please, who are not too lazy.
Answer 1, Authority 100%
PHPis ideologically a single-threaded interpreter, and all attempts to add multitown to it are crutches.
What you have a lock at the time of execution of the query – most likely, the result of incorrect web server setup or may not be incorrect code of the query handler.
Every New Call to A PHP Script Creates a New Instance of PHP (Usually a New Process, in Rare Cases It’s Just Run Under A New Thread, But This Does Not Affect Your Question), and MultiPle Instances Run Independently of Each Other .
- The issue of simultaneous connections on the side of the
MySQL,is, of course, is also resolved. It is difficult to imagine a database that does not know how to serve more than one connect.
Answer 2, Authority 36%
I understand PHP inside is unintended, and a web server is responsible for processing multiple users, which for each connection launches a new process.
Answer 3, Authority 27%
Here is the first link in Google: almost real multithreading means PHP 5
Answer 4, Authority 9%
What about asynchronous sockets, multicurla, pnctl (forces) on Unix, as well as multi-rods to mysql?
Yes, it is a multithreading, but “multiprocessing” technically, but IMHO affects the final result.
About the best streaming – here Phtreads Library, read, implement.
But IMHO for “labor” multithreading is better to go to the languages that support it.
how many people here are …
While he is looking for, no one can go to the site. What does this mean that PCP is single-throat?
It means that you must first come from another browser, make sure that everything works fine and the smart word multipleness here is not at all, and then go and close in your search script session.
All answer options in the question are not related to the very question.
Client’s browser is waiting for an answer from the server. Nothing more. Therefore, “hangs.”
Teach Site page contacts the GetIP.php service via Ajax.