Apache+PHP on Windows Server 2008

16,534

I recently installed Apache on Windows Server 2008.

I just downloaded the latest stable release for both software packages. Note that for PHP, you need to keep this in mind (from http://windows.php.net/download/):

If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP.

Now the installer will list Apache 2.x as a configuration option.

If you are able to install, but not configure PHP, please comment on my answer, and I will provide you with some directives on how to set up PHP for apache with 2 lines in the configuration file.

Share:
16,534
Álvaro González
Author by

Álvaro González

Hi! I'm not asking you to enable error reporting, share the verbatim error message, inspect variables... to annoy you and show off how much fancy stuff I know. That's the straightforward problem solving method. Why guess and try random stuff for days when the language engine can tell you the exact issue? If you don't know what I mean or how to apply it, please don't pretend you didn't read my comments. Instead, ask for clarifications—I'll be glad to guide you. Further listening Mi sitio de programación en español: Borrame.com The humour site I haven't updated since 2004: Demogracia Mi hosting actual: Guebs.com

Updated on September 17, 2022

Comments

  • Álvaro González
    Álvaro González over 1 year

    I've installed Apache/2.2 and PHP/5.3 lots of times under Windows XP, Windows Vista and Windows Server 2003. The official *.msi installers work fine and configure everything. Now I need to install them into a Windows Server 2008 R2 Standard 64-bit box and I'm facing nothing but problems:

    1. There are no official 64 bit binaries for Apache and no binaries at all for PHP (official or third-party). It's alright, I'll do with good 32 bits, but it's kind of surprising.

    2. Official documentation is vague, generic and completely unaware of UAC or any recent Windows security feature.

    3. The PHP installer is unable to configure mod_php and the Apache installer is unable to configure... well, Apache.

    After three hours I've finally reached the point where I'm installing everything in the root folder and assigning full control access to all users in all files and directories and all I've got is a PHP-less Apache server that's able to serve static pages. So I guess it's time to stop and think. My question is:

    Has anyone installed an Apache+PHP production server under Windows Server 2008 in a serious, secure and reliable way and documented the whole process? Or should I just find a bundle like XAMPP and the like that requires no installation?

    === EDIT ===

    I've installed Xampp Lite 1.7.3 and everything was working in 5 minutes. I'd still like to find some documentation about installing the original packages: XAMPP installs tons of stuff I don't need and offers no tool to enable and disable PHP extensions.

  • Álvaro González
    Álvaro González over 14 years
    Definitively, XAMPP seems to be the best option. Other third party binaries tend to be obsolete and do not include the MSI installers. I presume you're not supposed to install a production server under Windows Server 2008: Windows support is probably aimed for development only.
  • Álvaro González
    Álvaro González about 14 years
    I'm afraid I don't have a spare server to test (the box that made me start the thread has been in use since I got 32 bit Xampp Lite working on its own top level folder). I understand you were able to install the 32 bit official binaries in the default location and the wizard was able to configure everything properly despite User Account Control; am I correct?
  • Thijs Tijsma
    Thijs Tijsma about 14 years
    I didn't get any User Account Control warnings because I was logged in as an Administrator (which you should be when you install system-wide software). And, yes I was able to install everything just fine.