CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2002
    Posts
    2

    php/mysql better on windows or linux?

    We're building a site with php/mysql. Our developer is suggesting it is best to use a Windows platform. But I've spoken with a few other companies, and especially some hosting companies, who say that we would be compromising site quality by going with Windows vs. Linux.

    Our developer says we can choose to have them do it with Linux if we want; they say they are recommending Windows only because if we decide to change developers down the road, it will be easier to find other developers who work with Windows than Linux.

    What do you think we should do? And why?

    Thanks.

    Robert
    remdog99@hotmail.com

  2. #2
    Join Date
    Feb 2001
    Location
    teh INTARWEB
    Posts
    542
    I don't see a reason why your developer can't develop platform independent code in PHP; you can then deploy it anywhere .. on Windows or Linux. There are many popular large-sized PHP/mySQL products running without problems on Linux and Windows. The best example would be this board itself..which can run on Linux/Windows easily.
    So you should be asking your developer to code in PHP such that it can easily be deployed on any platform...so many developers develop their PHP/mySQL applications on Windows and then deploy it on Windows. This will ensure that you later have no problem looking for another developer .. you'll have to look for a PHP developer, not PHP/Win or PHP/unix developer.
    There are certain subtle differences in mySQL Windows and mySQL unix. Check them out and see if there is anything you have to be concerned about. I found a good cross-platform development article here, which I think you should take a look at.

    There should not be any compromise in site "quality", the only issues will be site's backend performance, because usually, Windows hosting is many times costlier than Unix hosting. So if you are looking at a specific price budget for the hosting, in most cases the money will fetch you a better-performing unix system than a windows one. But you should really be concerned about that if you site attracts heavy traffic (that is when database performance becomes a big issue).

  3. #3
    Join Date
    Jul 2002
    Posts
    2
    Thanks for the helpful links. Please note a few things:
    -I have very little technical knowledge when it comes to actually developing a site (I'm a marketing guy)--I do understand what the different languages do, but that's about it. I tell you this because the articles you suggested are only somewhat helpful as they are quite technical.
    -The question for us is not whether or not to use PHP. We are definitely going with the PHP/MySQL combo. The only question now is whether to run it on a Linux or Windows platform.

    You said that Windows becomes a drawback only if our site has heavy traffic. What types of problems could we encounter in this scenario?

    Finally, as you said, the trade off does indeed seem to be that developing in Windows means higher hosting charges, but easier site portability should we ever decide to switch developers. That being said, I believe there are many Linux developers out there (although not as many as there are Windows). It sounds like the deciions of Windows vs. linux then is really about what we foresee happening in the long-terrm: if we don't foresee a site with heavy traffic and don't plan to stick with the same developer, then Windows is the way to go. Heavy traffic and sticking with the same developer--Linux.

  4. #4
    Join Date
    Feb 2001
    Location
    teh INTARWEB
    Posts
    542
    hmm...okay. I attempt to present my views in a slightly more non-technical manner below. Hope this will help:

    All a developer needs to do is to get hold of an editor (Windows NotePad or any linux editor will do, but more advanced IDEs are a help to improve productivity), and a mysql installation. Mysql (its free) can be installed on a local machine on linux or Windows quite easily. The developer can develop the program in PHP(again, the download is free) using the editor and test the program out on the local machine itself with the local mysql installation. Question about the final development platform does not figure at this stage, until your developer does something platform-specific (which he really shouldn't be doing; there are always platform-independent ways to do it). Examples of this include him using some external utilities or operating-system-specific features.

    Now when the program is ready for deployment, the developer can easily export the mysql database (mysql provides very easy ways to do it) from his test machine to the deployment server. Note that here it does not matter which platforms both machines are on; since mysql doesn't care -- a database is a database. Your development machine can be a Windows machine and the target deployment server be a Linux one, or vice versa. He can also place the PHP files in the respective directory structure at the target server, and configure them to use the database of the target server. (just slight 1-2 line changes are required in configuring the database connection settings, which your developer should have kept in a separate configuration file. So all the program does is to read the target mysql settings from the configuration file and your task is limited to editing the config file to reflect the current machine's mysql configuration).
    So, in effect, you can even have a developer team, with each developer working in PHP/mySQL on a different OS, Windows, Linux, FreeBSD, etc. and collaborating to develop a site on a target server, which hosts a completely different OS than each one of them.

    Please note that you do not need developers specializing in Linux or Windows platform to do this. All you need is a developer specializing in PHP/mySQL, and he/she should be able to develop the site regardless of the target platform. And believe me, there is no dearth of such developers at present.

    Now about the servers. I didn't mean to say that Windows servers are a drawback at heavy traffic loads. I meant that for the same price, you can get a unix server hosting with better-performing-configuration than a Windows server. This is because Windows OS licensing costs, that means hundreds of $$$ for your hosting company. So it means for a fixed budget, there are chances that you will get a more resourceful unix machine than a Windows machine. Of course, there are no traffic-related drawbacks to a properly configured Windows server. Its all about costs I was talking about. You can always get good performance Windows hosting matching your traffic needs if you are ready to pay for it, which should be no less in performance than a similar-config unix machine; the only difference being in costs.

  5. #5
    Join Date
    Aug 2002
    Posts
    879
    From point of programming php/mysql there are
    no differences between the unix version and windows
    version of php. Only some functions like crypt()
    are only avaible for unix.
    One reason for unix would be that in most cases
    it php is faster on it than on Windowsserver.
    An other differnce is only that unix is casesensitive
    (filenames). But which is only important if you
    think to put an project developed on windows to
    an Unixsystem !

  6. #6
    Join Date
    Jul 2002
    Location
    Don't Know, Don't Care
    Posts
    346
    I'd go with a unix or linux box, they're much more cost effective. Not to bash windows, but unix is definetly less buggy (it may be bug free from what i've heard, but i've never dealt with it). Unix servers are definetly more reliable (note that unix and linux are generally the same, linux has an X-Windows interface). Unix doesn't deal with a graphical interface to an operating system (windows manipulates DOS which actually runs the computer). So that may be where the performance drop lies in the windows system. so i also vote for unix/linux.

    C G C F A D--Feel the Noise

    "When your life goes nowhere and leads back to me, doesn't that tell you something?"
    ~Gray Area Fury

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured