6 ms·
Do people really use Windows as a production server for PHP? Most people I know use Windows as a dev machine, which I guess will still be supported.
by me551ah 6y ago
Do people really use Windows as a production server for PHP? Most people I know use Windows as a dev machine, which I guess will still be supported.
- siliconapex 6y agoI always run it in a virtual machine when I'm developing on Windows or OS X.
- dx034 6y agoShouldn't WSL do the trick? Especially with WSL2 I found no need to use a dedicated virtual machine to use Linux applications in Windows.
- shakna 6y agoWSL2 _is_ a dedicated virtual machine for Linux on Windows. It runs under Hyper-V.
- Already__Taken 6y agoThat was wsl1, wsl2 is much tighter integrated than just thinking of it as a VM running in hyper V.
- ygra 6y agoWSL 1 was not a virtual machine. It was a re-implementation of the Linux kernel API within the Windows kernel. As such, it's probably more comparable to CoLinux (if that's still a thing).
- jawngee 6y agoIt's not really about running linux applications as much as running your application in the same or similar environment to what you are ultimately deploying on.
- siliconapex 6y agoExactly, I could run in WSL but I run in Docker or VirtualBox to emulate the production environment.
- input_sh 6y agoI once seen a production server running a WordPress site on Windows. The logic behind it was that the client had some other websites running on some .NET CMS (not .NET Core), so it made sense for them to run WordPress on the same one instead of getting another one.
- deleted 6y ago[deleted]
- ashkante 6y agoYes. In my experience, it usually comes down to "Our Windows admins don't know Linux, so it'll be easier for them to manage a server if it's running Windows!" Except they never do, because they don't know PHP on Windows either and are afraid of breaking things, and the customer ends up with a PHP/Wordpress installation that is 4 years out of date. Luckily, most of those are internal-only apps, but it still sucks.
- linker3000 6y agoThis is very accurate. Where I used to work, we developed and supported a SaaS app based on PHP with PostgreSQL and Apache. We had two self-hosting customers who ran on Windows Server with SQL Server for the exact reasons mentioned, and they were our most troublesome customers. Performance tuning (and hence regular complaints that 'our' app was horribly slow) was a particular issue - mostly due to their admins' lack of relevant experience on both the stack...and Windows Server(!). The whole setup was a pain because we got so much flak, despite the premise of 'self-hosting' being that the customer had sufficient smarts to support the infrastructure and stack and we'd just support the functional and development aspects of the app. One customer also had the system so locked down that for remote admin we had to connect to a jump box via VPN + RDP and then jump from that to the server with another RDP connection. Fetching large log files through that setup was a challenge. Partly for our sanity, we persuaded one customer to let us migrate them to a Linux server; that went very well and really cut down on angst all round even though we then took responsibility for platform support.
- solarengineer 6y agoPerhaps this is where "appliance VMs " could be of use.
- robertlagrant 6y agoOr "containers".
- nemacol 6y agoI don't blame the customer in these cases. The product shouldn't have been sold, or at least not sold with support, if the consumer was going deviate from build specs. In my limited experience, this is the sales team saying 'anything' to get the sale.
- deleted 6y ago[deleted]
- kkwtfeliz 6y agoI have experience with using PHP on a Windows server, both with Apache and IIS. With Apache, it's an unstable mess. IIS on the other hand works extremely well with PHP, we've had virtually 0 issues in more than 10 years using it for many different projects.
- encom 6y agoMy experiences are the polar opposite of yours, but you shouldn't be downvoted for being wrong. :)
- giancarlostoro 6y agoI dont think he is entirely wrong I had similar experience except in my case whether I used IIS or Apache with PHP didnt matter as much with my particular apps. IIS is fine if it works just like Windows apps generally are fine when they work its the odd time where it breaks that you are mystified about the whole thing.
- g8oz 6y ago>>With Apache, it's an unstable mess I've found it to be pretty good using FastCGI.
- vbgamer45 6y agoMe as well I use the builds on apachelounge.com Just have make you tweak the config files.
- MH15 6y agoWhere I intern, we do development on Windows machines with WAMP, but of course everything is served from Linux instances in the cloud.
- AdrianB1 6y agoWhy not? Manufacturing Execution Systems run on Windows; when virtually all your servers are Windows because of the apps you need to run, setting up a few Linux servers for minor apps for internal use only is not worth, so PHP in fast-CGI more under IIS is a very simple and effective solution. Having support people with good expertise on both Windows and Linux is expensive, having 2 separate teams in expensive (if you need high uptime), especially when the ratio Windows to Linux is just 10:1 or 20:1. Keep it simple, run PHP on Windows. EDIT: I forgot to mention the pseudo-SSO called Windows Integrated Authentication that works with just a few clicks on Windows, probably a lot more key presses (typing) in Linux.
- deleted 6y ago[deleted]
- ocdtrekkie 6y agoIf I had to run a PHP app at work today, it'd be on Windows. Why? Because no one app justifies the amount of additional maintenance overhead of supporting an additional operating system. If your entire IT workflow is built on Windows, it's really the only sane choice. And no, it probably wouldn't be WSL, it'd be using this. Because not everyone I work with is comfortable with Linux tooling and who knows if our management tools can see what's going on with it.
- mtnGoat 6y agoThe sane or lazy choice? Right tool, right job; would be the right choice.
- ocdtrekkie 6y agoWrong. When you have dozens of systems to manage that can all have security vulnerabilities, the less burden involved in keeping everything up to date and secure. Uniqueness breeds unique and unforeseen problems. (The modern way to describe this is to make servers like cattle, not pets.) In a Windows environment, the best tool for the job is almost always another Windows box. Arguably, sure, PHP is a poor choice for a Windows environment, but IT/operations rarely has the luxury of deciding what line of business apps other departments use.
- mtnGoat 6y agothats certainly one point of view. i would still call it lazy though.
- vbgamer45 6y agoI do for several large projects. But, I do not run IIS. Use Apache instead. I have webservers running windows server, and databases servers on centos. Main reasons familiarity started as a windows application developer, the gui in my case window explorer feels easier for the tasks that I need do. I have setup webservers on linux as well, Just I work faster in windows can fix things easier then having to google with linux when things go wrong. I prefer the windows file permissions