php - Creation of new process for each request of web page? -
it might basic question everytime user call php file server, create new process server ?
for example, have basic form (let's on index.php) submits text php file. in php file, print posix_getpid().
i opened in 2 tabs index.php filled in , submitted text , ended 2 different pid on each tab.
which lead me conclusion server create new process each script. right ?
cheers !
i assume you're running apache web server.
when request comes in, apache starts new thread. php invoked on new therad, hence why new process id every time.
this is, of course, simplified.
i recommend reading this article deeper understanding.
edit: seems process differs between platforms. works way described above on windows, multiple apache processes executed on unix.
Comments
Post a Comment