0

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?

iOi
  • 403
  • 3
  • 8
  • 26
  • In my opinion, the dev environment should be as similar as possible to the production server. Is there a *real* bottleneck with performance in your development PC? –  Apr 01 '14 at 15:02
  • Like I suggested, if using WAMP/XAMP environment there is a significant amount of different. – iOi Apr 01 '14 at 17:32
  • @Areks It's the acceptance (or staging) environment that should be as similar as possible. The dev environment can differ without any problem as long as you do have a acceptance environment. Of course, iOi doesn't have an acceptance (per his question) so then it does become a problem... – Jasper Jun 27 '16 at 00:41

2 Answers2

2

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.

dbrumann
  • 16,803
  • 2
  • 42
  • 58
1

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)

ROLO
  • 581
  • 4
  • 13
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://stackoverflow.com/questions/ask). You can also [add a bounty](http://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. – Superbest Apr 01 '14 at 19:51
  • "Are there any other precautions to consider before attempting to use it as replacement for wamp?" my answer really answer the question, let me make it more clear – ROLO Apr 01 '14 at 19:52