문제

I would like to use the php built-in server just for dev environment, as opposed to starting WAMP everything, which consumes more resources, and since my site does not depend on any of the apache modules, I was able to do some work just fine, also using mysql from the command line.

The problem I have encountered is that, The built-in server is definitely slower compared to WAMP. Specially when doing database queries.

But what I would like to know is that, if the server is 100% reliable in-terms of building projects with it and directly uploading it to my server. Are there any other precautions to consider before attempting to use it as replacement for wamp?

도움이 되었습니까?

해결책

Your observations are correct. PHP's built-in webserver is usually slower than Apache+PHP, but for quick & dirty testing on your machine it's fine.

I prefer it over full stacks, because I don't like having Apache as a Service on my system which always starts (as XAMPP does by default) manually starting/restarting a Windows Service on the other hand can be quite annoying (compared to a simple php -S). You also might have to change configs (e.g. when using vhosts), copy/symlink your project, maybe edit your /etc/hosts-file. All in all I think the built-in server is less hassle, than full stacks like WAMP.

I don't think @Areks concern weighs heavily against using the built-in server. If this really is a concern for you, you should account for different systems/configurations, e.g. by writing tests and using tools TravisCI, Vagrant and/or others. If you develop for a specific system you probably have a staging environment (as similar to the production env as possible) anyway.

다른 팁

yes, you must been warned that the php builtin webserver does not provide support for .htaccess, which is extremely useful (though i use it quite often for small tests)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top