Php On Windows 10 4,9/5 7575 reviews

We’ve previously shown you how to get a working local installation of Apache on your Windows PC. In this article, we’ll show how to install PHP 5 as an Apache 2.2 module.

  1. Upgrade Php On Windows 10
  2. Php Installation On Windows 10 Step By Step
  3. Enable Php On Windows 10
  4. Install Php On Windows 10 Wamp
  • Note that many parts of this process were learned from the concise article Install PHP7 and Composer on Windows 10 from the website KIZU 514. Install PHP 7 on Windows 10. Install the Visual C Redistributable for Visual Studio 2015—this is linked in the sidebar of the PHP for Windows Download page, but it's kind of hidden.
  • Mar 28, 2019  This is Drupal and PHP running on IIS 10 on Windows 10! Further considerations. Just like any other application running on IIS, you want to take some things into account when running PHP applications on IIS: Isolate applications from each other by running them in separate application pools.

Why PHP?

If you are looking for information about older systems, such as Windows XP, 2003, 98 or Apache 1.x, see the Legacy Info section. The Official releases of PHP on Windows are recommended for production use. However, you are welcome to build PHP from Source. You will need a Visual Studio environment. This site is dedicated to supporting PHP on Microsoft Windows. It also supports ports of PHP extensions or features as well as providing special builds for the various Windows architectures. If you like to build your own PHP binaries, instructions can be found on the Wiki. Aug 21, 2015  I just upgraded to Windows 10. When I upgraded I just wanted to setup a small PHP website. I enabled IIS, CGI and all stuff needed for getting PHP working. PHP is working fine, however, I was trying to install PHP manager on Windows 10 but I am not having success. I found that some people had issues because.NET 3.5 was not installed.

PHP remains the most widespread and popular server-side programming language on the web. It is installed by most web hosts, has a simple learning curve, close ties with the MySQL database, and an excellent collection of libraries to cut your development time. PHP may not be perfect, but it should certainly be considered for your next web application. Both Yahoo and Facebook use it with great success.

Why Install PHP Locally?

Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows version of Apache 2.2. Mac and Linux users will probably have it installed already.

All-in-One packages

There are some excellent all-in-one Windows distributions that contain Apache, PHP, MySQL and other applications in a single installation file, e.g. XAMPP (including a Mac version), WampServer and Web.Developer. There is nothing wrong with using these packages, although manually installing Apache and PHP will help you learn more about the system and its configuration options.

The PHP Installer

Although an installer is available from php.net, I would recommend the manual installation if you already have a web server configured and running.

Manual Installation

Manual installation offers several benefits:

  • backing up, reinstalling, or moving the web server can be achieved in seconds (see 8 Tips for Surviving PC Failure) and
  • you have more control over PHP and Apache configuration.

Step 1: Download the files

Download the latest PHP 5 ZIP package from www.php.net/downloads.php

As always, virus scan the file and check its MD5 checksum using a tool such as fsum.

Step 2: Extract the files

We will install the PHP files to C:php, so create that folder and extract the contents of the ZIP file into it.

PHP can be installed anywhere on your system, but you will need to change the paths referenced in the following steps.

Step 3: Configure php.ini

Copy C:phpphp.ini-development to C:phpphp.ini. There are several lines you will need to change in a text editor (use search to find the current setting). Where applicable, you will need to remove the leading semicolon to uncomment these setting. Avery design pro software for windows 10.

Define the extension directory:

Enable extensions. This will depend on the libraries you want to use, but the following extensions should be suitable for the majority of applications:

If you want to send emails using the PHP mail() function, enter the details of an SMTP server (your ISP’s server should be suitable):

Step 4: Add C:php to the path environment variable

To ensure Windows can find PHP, you need to change the path environment variable. Open Settings, type ‘environment variables’ into the search field and open the result. Select the “Advanced” tab, and click the “Environment Variables” button.

Scroll down the System variables list and click on “Path” followed by the “Edit” button. Click “Edit text” and add ;C:php to the end of the Variable value line (remember the semicolon).

Now click OK until you’re out. You might need to reboot at this stage. Free raster to vector software.

Step 5: Configure PHP as an Apache module

Ensure Apache is not running (use net stop Apache2.2 from the command line) and open its confhttpd.conf configuration file in an editor. The following lines should be changed:

On line 239, add index.php as a default file name:

At the bottom of the file, add the following lines (change the PHP file locations if necessary):

Save the configuration file and test it from the command line (Start > Run > cmd):

Step 6: Test a PHP file

Create a file named index.php in Apache’s web page root (either htdocs or D:WebPages) and add this code:

Ensure Apache has started successfully, open a web browser and enter the address http://localhost/. If all goes well, a “PHP version” page should appear showing all the configuration settings.

See also:

  • Book: PHP & MySQL: Novice to Ninja, 6th Edition.
  • Book: Jump Start PHP Environment, as well as many more books in our library.

Best of luck!

-->

by Tali Smith

The fastest and easiest way to install PHP on Internet Information Services (IIS) is by using the Microsoft® Web Platform Installer (Web PI). Web PI completely automates setting up IIS, FastCGI, and the latest version of PHP from the php.net Web site. With Web PI, you can navigate to the 'Web Platform' tab and select 'PHP' under 'Framework and Runtimes' customize link. Alternately, use the instructions that follow as guidance for installing PHP with Windows® Installer or using a compressed (Zip) file installation.

There are two builds for each PHP version: one is thread-safe, and one is not (referred to as the non-thread-safe [NTS] version). The thread-safe version is designed for environments where the Web server core can keep the PHP engine in memory, running multiple treads of execution for different Web requests simultaneously. The architecture of IIS and the FastCGI extension provide an isolation model that keeps requests separate, removing the need for a thread-safe version. The NTS version does not have any of the code that allows PHP to manage multiple threads. As a result, there is a performance improvement on IIS when using the NTS version when compared to the tread-safe version because the NTS version avoids unnecessary thread-safety checks (FastCGI ensures a single-threaded execution environment).

Install PHP

There are two main ways to install PHP on a Windows®-based computer: download the Windows Installer or use the Windows Zip file from the PHP Web site. Either method will get PHP working, but both have some extra steps that are needed to make PHP work well.

Windows Installer

Upgrade Php On Windows 10

The Windows Installer version can get a complete PHP environment up and running, but the installation of extensions can be confusing. By default, no extensions are installed, and this can adversely affect the usefulness of the PHP installation. Alternately, all of the extensions can be installed; this results in an unstable system because some of the extensions can conflict with others. It is generally easier to use the Zip file installation.

Zip File Installation

To use the Zip file installation, follow the instructions in Using FastCGI to Host PHP Applications on IIS 7.0 and Above. The Zip file installation installs many of the extensions that are available for the Windows Installer version; however, none of the extensions are enabled until their entries in the Php.ini file are set up.

Php Installation On Windows 10 Step By Step

  1. Download the latest non-thread-safe Zip file package with binaries of PHP. Under Windows Binaries, click on the most current PHP non-thread-safe Zip package to download the PHP files.
  2. Unpack the files to a directory of your choice (for example, C:PHP) on your IIS server.
  3. Rename the Php.ini-recommended to php.ini.
  4. Open the Php.ini file in a text editor, then uncomment and modify settings as follows:

    • Set fastcgi.impersonate = 1.
      FastCGI under IIS supports the ability to impersonate security tokens of the calling client. This allows IIS to define the security context that the request runs under.
    • Set cgi.fix_pathinfo = 0
      The cgi.fix_pathinfo provides PATH_INFO/PATH_TRANSLATED support for Common Gateway Interface (CGI). Setting this to 1 will cause PHP CGI to fix its paths to conform to the specification.
    • Set cgi.force_redirect = 0.
    • Set open_basedir to point to a folder or network path where the content of the Web site(s) is located.
    • Set extension_dir to point to a location where PHP extensions reside. For PHP 5.2.X, this is typically extension_dir = './ext'.
    • Set error_log='C:php_errors.log'
      This can help with troubleshooting.
    • Enable the required PHP extension by un-commenting corresponding lines. More information follows in the section, Extensions.


      Figure 1 Windows extensions

  5. Click on Start, Settings, Control Panel, and then double-click on the System icon (using the class view).
  6. Click on the Advanced system settings link in the left column.
  7. From the System Properties window, click on the Advanced tab, and then click on the Environment Variables button at the bottom.
  8. Select the Path variable from the System Variables section, and then click on Edit. Add: c:php to your system path.


    Figure 2: Edit System Variable

  9. Click OK until you have exited the System Properties window.
  10. Start IIS Manager by clicking on Start, Programs, Administrative Tools, and then Internet Information Services (IIS) Manager.
  11. From the IIS Manager, click on the hostname of your server in the Connections panel on the left.
  12. Double-click on the Handler Mappings icon.


    Figure 3: Internet Information Services (IIS) Manager

  13. From the Handler MappingsActions panel, click on Add Module Mapping.


    Figure 4: Handler Mappings

  14. Type the following information into the appropriate text boxes, and then click OK.

    • Request path: *.php
    • Module : FastCGImodule
    • Executable: C:phpphp-cgi.exe
    • Name: FastCGI


    Figure 5: Add Script Map

  15. Click OK, and then c lick Yes.
  16. In the left panel, click on your server's hostname, and then double-click on the Default Document icon.
  17. From the Actions panel on the right, click Add.
  18. Enter index.php as the new default document name, and then click OK.
  19. Enter default.php as the new default document name, and then click OK.
  20. In the left panel, click on your server's hostname.
  21. In the Actions panel on the right, click Restart.
  22. Create a new text document, and save it as c:inetpubwwwrootphpinfo.php with the following content:

  23. You should now see the PHP information page at http://localhost/phpinfo.php.


    Figure 6: PHP information page

Enable Php On Windows 10

Extensions

It is important to determine which extensions are needed by the applications that will be running and then to limit the installed extensions to only those. For a typical open-source application installation, for example, the following extensions are installed:

Install Php On Windows 10 Wamp

  • Database Extensions — Most open-source applications that use MySQL for a database engine use either the php_mysql or the php_mysqli extensions. For new development work, either of these extensions work well, or consider using the PDO versions of the MySQL driver (PDO is a PHP extension providing aUsing FastCGI to Host PHP Applications on IIS 7.0 and Above' by Ruslan Yakushev, published on December 5, 2007.

    See also

    • PHP on Windows Training Kit.
    • Installing PHP on Windows Server 2008.
    • PHP on IIS7.
    • Deploying IIS 7.5 + FASTCGI + PHP on Server Core.
Coments are closed
Scroll to top