Code Monkey home page Code Monkey logo

xphp's Introduction

Build status

xPhp

Contributing

Please check out common DSC Resources contributing guidelines.

Resources

xPhp

  • PackageFolder: The folder to download the PHP and Visual C++ 2012 packages to. Note: this must already exist.
  • DownloadUri: The URL/URI for the PHP package.
  • VcRedistDownloadUri: The URL/URI for the Visual Studio C++ 2012 Redistributiable package.
  • DestinationPath: The path to install PHP.
  • ConfigurationPath: The path to the file to use as PHP.ini.
  • InstallMySqlExt: A boolean indicating if the MySQL extension should be installed.

Versions

1.0.1

  • Initial release with the following resources
    • xPhp

Examples

Setup a PHP Server on a single node

This configuration will setup a PHP server on a single node. Note: this configuration requires the following other modules: xWebAdministration, and xPsDesiredStateConfiguration.

# This configuration will, via the xPHP composite configuration: 
# 1) Make sure IIS is installed 
# 2) Make sure PHP is present 
# 3) Make sure that PHP is registered with IIS 
# 4) Make sure PHP is in the path 
# 
# ********* NOTE *********** 
# PHP changes their download URLs frequently.  Please verify the URL. 
# the VC Redist URL changes less frequently, but should still be verified. 
# After verifying the download URLs for the products and update them appropriately. 
# ************************** 
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path 
$phpIniPath = (Join-Path $scriptRoot "phpConfigTemplate.txt") 
if (-not (Test-Path $phpIniPath)) 
{ 
    $message = "Missing required file $phpIniPath" 
    # This file is in the samples folder of the resource 
    throw $message 
} 
Configuration SamplePhp 
{ 
    # Import composite resources 
    Import-DscResource -module xPhp 
    Node "localhost" 
    { 
        File PackagesFolder 
        { 
            DestinationPath = "C:\package" 
            Type = "Directory" 
            Ensure = "Present" 
        } 
        # Make sure PHP is installed in IIS 
        xPhp  php 
        { 
            InstallMySqlExt = $true 
            PackageFolder =  "C:\package" 
            # Update with the latest "VC11 x64 Non Thread Safe" from http://windows.php.net/download/ 
            DownloadURI = "http://windows.php.net/downloads/releases/php-5.5.14-nts-Win32-VC11-x64.zip" 
            DestinationPath = "C:\php" 
            ConfigurationPath = $phpIniPath 
            Vc2012RedistDownloadUri = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" 
            # Removed because this dependency does not work in Windows Server 2012 R2 and below 
            # This should work in WMF v5 and above 
            # DependsOn = "[IisPreReqs_WordPress]Iis" 
        } 
    } 
} 
SamplePhp 
Start-DscConfiguration -path .\SamplePhp -wait -verbose

xphp's People

Contributors

joeyaiello avatar powershellteam avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.