Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am used to a LAMP (Linux, Apache, MySQL, PHP) stack, but occasionally I must use a WAMP (Windows ...) stack to meet certain client requirements.

I haven't run into any significant differences, but I'm seeing this requirement more and more, with applications that are becoming more demanding and complex.

  • What should I watch out for between the two, or can I fully expect them to behave the same?

Please don't comment on the choice of stack or OS, I just need a list of gotchas moving from one to the other and vice versa.



locked by HopelessN00b Mar 16 '15 at 0:26

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Mar 16 '15 at 0:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – HopelessN00b
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 4 down vote accepted

The following come to mind:

  • Case Sensitivity. Windows is case insensitive, while Linux is case sensitive.
  • Path separator. Windows uses ";", Linux uses ":"
  • Directory separator. Windows uses "\", Linux uses "/"

As far as directory separator goes, PHP has the DIRECTORY_SEPARATOR constant, I've found that always using the Linux variant "/" to be more convenient as it works in both Linux and Windows.


Default settings are different in MySQL between the two platforms, particularly around case sensitivity of table names. Make sure you are perfect about either using all lower case table names, or always getting the case just right in the queries.

PHP's mail() function is quite a bit different under Windows from Linux. If you make heavy use of its features you should read the manual carefully. Many of the file system functions are also different because of system behaviors (like rename()). In general any function that interacts with the OS itself you will probably want to review the manual page for comments about behavior under Windows.

Good catch on the mail function! – Adam Davis May 14 '09 at 13:50

There are a few configuration differences in php.ini. Like your extensions will be dlls, you'll need to setup a default smtp server instead of relying on sendmail. It is kind of obvious when reading through the ini file though. I've seen the WIMP combo run just fine in production (so WAMP will be that much smoother). So I'd say it is mostly setup and configuration and maybe the existence of some extensions.


The directory separator thing has been mentioned, but an extra gotcha to watch out for:

On a LAMP machine, the separator is the same for both file system and web paths. On a LAMP machine, they're different. While this doesn't seem like it makes the situation much worse, I've dealt with more than a few web packages that discriminate between the file and web paths, but use the same separator constant for both (osCommerce, I'm looking at YOU.)

I've had lots of fun debugging that days after I thought I had all the path-insanity resolved.


Above the other items mentioned above, I have noted that $_SERVER["DOCUMENT_ROOT"] trails with a slash on windows, and not on linux.

Not a large issue, with nested includes/rewriting or even just linking css/js you'll need to check for a trailing slash act accordingly.

just because it was handy :) - I have a pre-written function.

function docroot() {
    $needle = '/';
    $haystack = $_SERVER["DOCUMENT_ROOT"];
    $length = strlen($needle);
    $end  = $length * -1; //negative

    if (substr($haystack, $end) === $needle) 
        return $_SERVER["DOCUMENT_ROOT"]; 
        return $_SERVER["DOCUMENT_ROOT"].'/';

Not the answer you're looking for? Browse other questions tagged or ask your own question.