开发者

Best PHP Webserver for Development [closed]

开发者 https://www.devze.com 2023-01-07 18:50 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I'm starting to work with PHP more these days and I've been wondering what the best PHP webserver might be for a dev environment. Ideally, it would be easy to build, live only in the project deps directory and be easy to configure. Also, decent performance would be a plus.

In python land, werkzeug would be an equi开发者_JS百科valent of the type of server I'm thinking of.


In my opinion, the best webserver for the dev environment is as close as you can come to exactly the webserver in production. PHP is a lot less 'stand-alone' in some cases then Python, and it prevents nasty errors and surprises when pushing code to the production server. All kinds of havoc can ensue when a $_SERVER array is just that essential bit different, or something runs as (fast)cgi instead of as a module.


If you can, look at exactly how your production server(s) are setup and duplicate that exactly as your dev environment. If you can't, just use XAMPP/MAMP and try to stick fairly close to what your server has (compare phpinfo() dumps till you get them similar as regards extensions). The former is both better & much easier though, if you can access the server config files,


Well, speaking of web servers, Apache is a state of art. Throw in a PHP module and you are set. That's all.


The web server is irrelevant for a development environment.

Whatever you like to use for your development: Eclpipse, NetBeans, Vim, xdebug, Firebug/FirePHP, "tail -f /var/log/syslog", phpTest,... all these can be used irregardless of whether you install, say, lightHttpd or Apache.

So, yes. As close to the production environment as possible is a good idea.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号