EN49

Page 467

Appendix A: Installing a PHP environment on Windows Section A.1: Download, Install and use WAMP WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases. WampServer is available for free (under GPML license) in two distinct versions : 32 and 64 bits. Wampserver 2.5 is not compatible with Windows XP, neither with SP3, nor Windows Server 2003. Older WampServer versions are available on SourceForge. WampServer versions: WampServer (64 BITS) 3 WampServer (32 BITS) 3 Providing currently: Apache: 2.4.18 MySQL: 5.7.11 PHP: 5.6.19 & 7.0.4 Installation is simple, just execute the installer, choose the location and finish it. Once that is done, you may start WampServer. Then it starts in the system tray (taskbar), initially red in color and then turns green once the server is up. You may goto a browser and type localhost or 127.0.0.1 to get the index page of WAMP. You may work on PHP locally from now by storing the files in <PATH_TO_WAMP>/www/<php_or_html_file> and check the result on http://localhost/<php_or_html_file_name>

Section A.2: Install PHP and use it with IIS First of all you need to have IIS (Internet Information Services) installed and running on your machine; IIS isn't available by default, you have to add the characteristic from Control Panel -> Programs -> Windows Characteristics. 1. Download the PHP version you like from http://windows.php.net/download/ and make sure you download the Non-Thread Safe (NTS) versions of PHP. 2. Extract the files into C:\PHP\. 3. Open the Internet Information Services Administrator IIS. 4. Select the root item in the left panel. 5. Double click on Handler Mappings. 6. On the right side panel click on Add Module Mapping. 7. Setup the values like this: Request Path: *.php Module: FastCgiModule Executable: C:\PHP\php-cgi.exe Name: PHP_FastCGI Request Restrictions: Folder or File, All Verbs, Access: Script

8. Install vcredist_x64.exe or vcredist_x86.exe (Visual C++ 2012 Redistributable) from GoalKicker.com – PHP Notes for Professionals

454


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.