Ive been developing my site locally with wampserver on windows and it is now ready to go live. I read in a few places that linux is better than drupal for windows, although the people who said this never really specified why. I am very surprised that there is no conclusive answer in the drupal docs about this as it is a pretty big issue. So I decided to try linux out and I was ready to switch over to it if it meant better performance from my drupal site.

Well what can I say about my experience with linux/ubuntu other than it is a serious crock of sh*t. Within a half an hour I had encountered multiple problems with firefox, including the back and forward buttons and the search bar not working. Then I tried creating files/folders and there was not enough space to even create a 1 byte text file as ubuntu decided to give itself a partition so small when I was installing (i selected the default options, like every other newcomer to linux would) that it was completely taken up by the operating system. So the two most common tasks performed on computers today - creating files and browsing the web - were not working correctly, stuff that was taken for granted back in Winows 98. This leads me to wonder that if I am running into such fundamental problems with the OS within half an hour of installing it how much time will I have to spend(waste) trying to fix every other little thing that will go wrong down the line. And judging by the ubuntu forums there are plenty of other people in the same boat and running into various problems that should not even be an issue in this day and age.

With all that in mind I am still willing to grit my teeth and stick with linux for another few days if it will ultimately benefit my drupal site. So I'm not sure what to do now. It seems that your website set should be as close to the same as possible as your local development enviroment, which for me is windows and wamp. However I don't know if any web hosts offer the windows/apache combination. From the hosts I looked at it's either windows/iis or linux/apache.

So my questions are -
1) How important is it that your local development environment matches your actual site?
2) What are the specific advantages of using linux instead of windows for drupal?
3) Are these advantages really that important?
4) Does anyone here develop on windows and host on linux? And how do you find it?

Comments

michelle’s picture

Drupal will run on IIS. The main "gotcha" you hear about is getting clean URLs to work. I don't know if they've ever found a solution so you may want to research that. Other than that, I think you'll run into support problems more than anything. If you ask for help with something and 99% of the people you are asking are on a different OS, that's going to make it harder.

Another option, though I realize it's not for everyone, is to develop on your host as well. That's what I do. I use WinSCP and Putty and I have SSH access. I do all my development work right there on my host so I have all the benefits of linux and am able to use Windows on my computer. The downsides are 1) No interactive debugger and 2) If I lose my internet connection, I can't work on the site. The biggest benefit, to me, is being able to just take the site out of maintainance mode to make it live temporarily if I'm asking someone for support on IRC. It's much easier to get help when they can see the problem.

Michelle

heine’s picture

It's not hard to get clean URLs to work on IIS 7, thanks to the free URL rewrite module by Microsoft:

To get Clean URLs working on IIS 7, install the new URL rewriter module (x86, x64) and add the following to the system.webServer section of the sites' web.config:

<rewrite>
  <rules>
    <rule name="Drupal clean URLs" enabled="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />    
        <add input="{REQUEST_URI}" negate="true" pattern="/favicon.ico$" />
      </conditions>
      <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>

You also need to install a hotfix to correct REQUEST_URI behaviour when using PHP via the FastCGI module. See KB954946 for more information. A symptom of this problem is when all form submissions get redirected to the frontpage of the site.

You may want to look into the Microsoft Web Platform, which contains an installer for Acquia Drupal.

heine’s picture

1) Not important _for me_ *)
2) Can't think of one
3) -
4) Yes. Works for me.

*) Make sure you do have a test site on the target OS though.

Apart from OS, I develop on an IIS machine and (usually) host on Apache. No issues so far.

dimitriz1’s picture

You should pick linux alwasys for drupal. linux is much better, only begginners use windows.

michelle’s picture

Generalize, much?

FWIW, Heine is hardly a beginner.

Use whatever OS works best for you. Drupal will adapt to either.

Michelle

dimitriz1’s picture

the op ask for best system not will drupal adapt. and linux is many times better system for drupal than winows. drupal is open source software desinged for open source system.

michelle’s picture

Read it again. He obviously doesn't want to use linux and is wanting to know if there's any compelling reason to do so just for Drupal. And the answer is no, he can use Drupal just fine on Windows. There's no need to insult Windows users and start up an OS war in the thread. Drupal works on Windows. Drupal works on linux. Use whatever is best for your needs, not what someone else thinks you should be using.

Michelle

dimitriz1’s picture

yes drupal works on windows but works better on linux. maybe you should try both and then comeback to tell us what is your opinions..

michelle’s picture

I have used it on Windows. I prefer it on linux, which is why I said I develop on my host's linux server. You might want to try actually reading the posts in this thread rather than just trolling.

That doesn't change the fact that Drupal does run on Windows and works fine. It doesn't work "better" on linux. It's just easier to develop on linux because the tools and support around here are all linux based.

Anyway, this is getting pointless. The OP's question has been answered. Further trolling will be ignored.

Michelle

heine’s picture

[...] linux is many times better system for drupal than winows [sic] [...]

Can you specify why it is better for Drupal?

FWIW; the only tool I use Unix for on the desktop (thank you Virtualbox) is KCacheGrind, and only because I don't want to run KDE on Cygwin or KDE 4 for Windows on this machine.

As to (Drupal) developer tools, you have:

IIS / Apache
MySQL / PostgreSQL
bzr/git/svn/cvs
patch, diff, grep, awk, sed, tar and other unixutils (or Cygwin)
emacs/vim/eclipse/netbeans
putty and friends

What I do find easier on certain Linux distributions is compiling extensions from PECL, but that's about it.

rocketboy37’s picture

First of all I'm a beginner by all intention of the word when it comes to Linux. Let me start by saying Linux is not for the faint of heart if you enjoy reading technical manuals and playing DD games or crunching numerical baseball statistics on the last game then Linux is for you. That is just the type of technical you must be willing to partake with Linux.

I don't do anything of the above, I just dive in and roll with the punches type of a guy. But fortunately with most open source software the community is what pulls you through. That is if you don't ask stupid questions and how willing the community is to accept new blood. I have found the Drupal crowd to be very open and easy going so far.

On the other hand Linux community not so much you have to prove your mettle with them. Spend at least 2 nights with a six of mountain dew trying to learn how to build Apache from scratch or some crazy sh*t like that. I may be exaggerating a bit but you get my point.

I have found with Linux that there are wayyyyyyyy more tools, to manipulate the operating system. Therefore making your Drupal installation a lot more efficient or easier to scale and customize. The other awesome thing about Linux is that there is tech out there that allows you to access the command line from your iPhone can you do that Win HELL NO! There is a huge learning curve and you will spend endless days and nights just making an install that will fit your particular needs. But the more you learn the more you will appreciate its vast openness.

I have been using Suse Linux 10.0 for the better of 7 months in which I have learned to compile my copy of imagemagick and make ln links, install a plethora of different modules for doing image manipulation to menu links. The more i learne about the OS the more I appreciate the fact that I can bend it to my will just like Neo in the Matrix. Many times I have decided to tap out like Matt Hughes against BJ penn fight, but fortunately my perseverance takes hold and i continued to push on. I'm mean some things like getting FTP on your Linux install to run with proper permissions has and can be quite a challenge. Its not a point and click type of environment its a think, research, and experiment type of environment.

Maybe you need to ask yourself how much time you have and how interested you are in learning something new like Linux which has been around much longer than Win and has proven it's mettle over and over again. Its also not a bad thing to put on your resume.

Good Luck

dimitriz1’s picture

yes good informaition in that post. linux is not for beginners, it is best for advance users. takes time to learn but works better than windows if a user has advance skill with computers. mintlinux is my chosen distro.

redpuma’s picture

Looks like you're using Linux as your desktop OS instead of Windows and having difficulties.

I do number 4 on your list. I have Win XP desktop, test in IE, Firefox, Chrome Safari, Opera etc. Have Photoshop etc. But use Debian for my development server running as a VMWARE image, with the /var/www dir Samba mounted so I can access it just like a windows partion. Then if I need the power Linux I can use Putty to get a command line.

So perhaps the best thing is to use what you're comfortable with to get the sites developed, but when you have to start updating multiple sites via the GUI you'll soon appreciate the command line coupled with something like DRUSH (seems I'm mentioning this all the time today :-) http://drupal.org/project/drush.

But I always use Linux servers for hosting.

ltwinner’s picture

So have I got this right. You work in windows so you can test in multiple browsers and use photoshop, but have a virtual machine running linux inside windows that you develop on? And you install php, mysql and apache into the linux inside this virtual machine?

vm’s picture

you can do it that way, although if you are already using WAMP you are fine and in a perfectly suitable environment.

redpuma’s picture

@ltwinner
Yes that's what I do.

But as VeryMisunderstood say's using WAMP is perfectly alright. If Linux is new to you then it'll get in the way, but at some point you may find the effort is rewarding as rocketboy37 said.

jnvsor’s picture

1) How important is it that your local development environment matches your actual site?
Not much, I dev on wamp but run on linux/apache 2...

2) What are the specific advantages of using linux instead of windows for drupal?
Well for one thing, stability... Linux can run for years without a reboot or a security issue, windows however has a maximum single boot limit of about a week as you will know if you like hibernation ;)

3) Are these advantages really that important?
HELL YES! - The only reason someone uses a windows server is because they use IIS - IIS not only disables clean urls (Which means some search engines won't even index you!) but it also has that annoying email bug...

Meaning your site will not be able to send emails: No activation urls: No users: No site

4) Does anyone here develop on windows and host on linux? And how do you find it?
I dev on windows and well... I don't host myself but almost every host out there hosts on linux... Usually windows hosts will show off their "High quality technilogy" IIS... They hope people are too dumb to realise windows is the worst thing to come to earth since...

There are no good hosts... End of story... If its a personal website without other users feel free to use a free server, they are usually great...

On the other hand if its a commercial server you are going to have to pay... and quite a lot if you want good quality...

heine’s picture

A legion of rewrite options exist for IIS. For IIS 7, there's a free URL rewrite module available from Microsoft.

jnvsor’s picture

The IIS 7 module is the only one that works... at least with drupal... After that you have to remember that IIS 7 only runs on the latest windows server/vista... and isn't very common...

Canadaka’s picture

Not true, there are several other rewrite modules beside the Microsoft one that work. I currently use ISAPI Rewrite 3 which lets you use the same rules as a .htaccess file.
http://www.helicontech.com/isapi_rewrite/

sjfarrar’s picture

Seconded.. the hosting environment I use.. uses this.

kaakuu’s picture

1) How important is it that your local development environment matches your actual site?

What I develop locally must run EXACTLY in a similar way on the actual site. I cannot redevelop and re-tweak the actual site.

2) What are the specific advantages of using linux instead of windows for drupal?

While I have used XAMPP and WAMP on Windows to run Drupal they occasionally get screwed up. A well configured linux shared host on the other hand never has given me such a problem. Moreover I find linux faster when you have some 20 to 30 modules and a biggish database.

3) Are these advantages really that important?

To me Yes. Performance is better, imho. And Price is cheaper. As well as the fact that support staff are more competent to help in case of any drupal related problem MORE on linux.

4) Does anyone here develop on windows and host on linux? And how do you find it?

I do THAT exactly and find it is the only way for me that works. If I have a second computer at home with linux I will develop on linux too :)

ltwinner’s picture

You say in 1) that what you develop locally must run exactly like the actual site so I presumed you both develop and host on linux. But in 4) you say you develop on windows? Do you use a virtual machine to develop in linux on windows?

Thanks for all the replies so far by the way, good to get some opinions on this as there is not much in the docs from what I can see.

kaakuu’s picture

I download the core files and module files in windows. Do theme changes, check whether all the modules I need and their features work for me or not etc in windows. I now upload all the db and folders to a linux shared host. If needed I work online to do small changes here and there. If things work OK I just copy the test folders (and db) to another folder which becomes the working site.

This is necessary as shared hosts can differ in their configurations and choice of linux distro. So once things are running fine in the shared host I go for the actual site in the same shared host. The test site remains to continue tests and incorporate anything in future into the actual site.

Canadaka’s picture

I run over 50 PHP based sites on 2 Windows Web Server 2008 servers using IIS7. In my opinion IIS7 kicks the shit out of apache. And PHP support and performance has GREATLY improved over the years, Its hard to find good benchmark comparisons, but I think PHP on IIS7 can be faster than on apache.

smriti.2889’s picture

Well, It is true that drupal gives best result in linux and I can say that because I have used both windows and linux(Ubuntu) for that.
You might find it tougher to install drupal in windows than in linux where there will be meager file permission problems while windows would ask to to do all sorts of changes in files and settings for drupal to work.
Above all, the main reason behind why its preferred is that as a content management system, it works too fast and efficiently in linux as the database connectivity is better so your querying is around 10 times as fast as that in windows.
Its just my own experience as I have spent quite much of time working over this stuff...
But yeah your site once hoisted would definitely show the difference of the os.
However the local development environment and actual site matching is not so important. Though I havent tried to develop on windows and host on linux.

ltwinner’s picture

I am now convinced linux is better for drupal. I switched to windows xp for development about 6 months ago as photoshop was a essential and it just ran too slow in virtualbox. Anyway I developed the site and for the last while several pages on my site were taking 6 seconds or more too load. It was becoming a pain to develop and I thought I was gonna have severe performance issues when it went live and would have to perform some serious optimizations. I decided to import it back into linux today to see how it ran as I always planned on hosting it on linux anyway. The difference in page load times is incredible. Pages that once took 8 seconds to open now load instantly.

heine’s picture

Alternatively, investigate the actual cause of slowness (eg using a my-small.ini variant, lacking apc/wincache).

Anyhow, happy cargo-culting!

ltwinner’s picture

What would be the point in trying to figure out why it's running so slow on windows when its gonna be hosted on linux anyway. It's pretty poor form that a page with one straightforward view was taking 8 seconds to load on localhost.

heine’s picture

There's no point. Your conclusion is to strong for the data you've assembled though.