Hey all!
I am reinventing the wheel and writing a basic authentication system with MYSQL. Currently I am using the php-cli built in server to serve my project locally with $ php --server localhost:8080 -t ../phpFun.
I have read the official php manual on the built in server & this stackverflow post.

Will I run into threading issues if I am interacting with a SQL database?

Are there any other issues I should expect. I do not think any issues on the manual or the stackoverflow post will apply to me, yet I did not see anything that applies to my use case.

I don't mind apache if it is the path of least resistance. I simply want to keep the focus on the authentication system and not the environment.

Well, the main thing to consider is that the internal server can only process one request at a time. As the manual says, if there are two requests at the same time, one will block until the other is completed.

This is a bit like the situation if you use file-based sessions: since the session file is locked, multiple requests that are part of the same session have to queue up and wait their turn to get a lock. With the inbuilt server, though, this single execution bottleneck is over all requests, not just on a per-session basis.

I'm not clear what your use case actually is: what is this authentication process actually for? The inbuilt server isn't suitable for anything public-facing. It's really more for local testing.

    Carver I don't mind apache if it is the path of least resistance. I simply want to keep the focus on the authentication system and not the environment.

    Could be a good case for using Docker containers or similar options...though that has a bit of a learning curve?

      Write a Reply...