Installing a Manual PHP 5.6 Environment - Windows

This article will explain how to install and set-up a PHP 5.6 environment with Apache 2.4 so that it'll run Scriptcase.

Follow the steps below with caution.

Download the Apache 2.4 , mod\_fcgid and PHP 5.6 on the followinh links:

[Apache download](http://www.apachelounge.com/download/)

[mod\_fcgid download](http://www.apachelounge.com/download/)

[PHP 5.6 download](http://windows.php.net/downloads/releases/)

Note: The PHP that should be downloaded is the Non Thread Safe and all the downloads needs to be in the 32-bit architect.

After downloading the Apache and the PHP 5.4, extract both of them on the root of the C:\ Drive

Rename the folders to Apache24 and PHP, like the example below:

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/01.jpg)

Extract the Mod fcgid, and copy the file mod\_fcgid.so and paste it in the directory C:/Apache24/modules

## Setting up the Apache

Open the file C:/Apache24/conf/httpd.conf and add the following lines above the line IfModule unixd\_module of the file:

LoadModule fcgid\_module modules/mod\_fcgid.so  
FcgidInitialEnv PHPRC "c:/php"  
AddHandler fcgid-script .php  
FcgidWrapper "c:/php/php-cgi.exe" .php

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/02.jpg)

In the same file search for #ServerName [www.example.com:80](http://www.example.com/) and change it to ServerName localhost:80  
  
Search for:  
  
    DirectoryIndex index.html  
  
  
And change it to  
  
    DirectoryIndex index.html index.php index.phtml

Add the text: Options ExecCGI in the option Directory "c/:Apache24/htdocs"

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/03.jpg)

Search for IfModule mime\_module above this option, add the text below:

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/04.jpg)

## Adding the service of the Apache in Windows

Open the Command Prompt(CMD) as Administrator and type the following command:

c:\apache24\bin\httpd.exe -k install

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/05.png)

Important: In case of an error, and you're informed that the file msvcr110.dll is missing, you can download the file [clicking here](http://cdn1.netmake.com.br/img_kb/pt_br/configurando_ambiente_manualmente_php_54_windows/msvcr110.zip). Extract and place the file in the directory : C:\Windows\System e C:\Windows\System32. Run the command again in the command prompt(CMD).

## Setting up the PHP 5.6

Open the folder C:\php and rename the file php.ini-development to php.ini.

Now open the file php.ini (C:\php), and search for the variable extension\_dir and set the value "C:/php/ext" like the image below.

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/06.png)

Remove the comments of the extensions listed below. (To uncomment the extensions, just remove the ";" from the starting point of each extension)

extension=php\_bz2.dll

extension=php\_curl.dll

extension=php\_gd2.dll

extension=php\_imap.dll

extension=php\_interbase.dll

extension=php\_ldap.dll

extension=php\_mbstring.dll

extension=php\_exif.dll

extension=php\_mysql.dll

extension=php\_mysqli.dll

extension=php\_oci8.dll

extension=php\_pdo\_firebird.dll

extension=php\_pdo\_mssql.dll

extension=php\_pdo\_mysql.dll

extension=php\_pdo\_oci.dll

extension=php\_pdo\_odbc.dll

extension=php\_pdo\_pgsql.dll

extension=php\_pdo\_sqlite.dll

extension=php\_pgsql.dll

extension=php\_pspell.dll

extension=php\_shmop.dll

extension=php\_sqlite.dll

extension=php\_sqlite3.dll

extension=php\_xmlrpc.dll

extension=php\_xsl.dll

extension=php\_zip.dll

Set-up the TimeZone according to your region following the list that's available at [the php website](http://php.net/manual/en/timezones.php). Still with the php.ini opened look for the variable date.timezone and insert a value available in the list.

![](http://cdn1.netmake.com.br/img_kb/en_us/setting_environment_manually_php_54_windows/php_apache/07.png)

Save all the modifications done in the php.ini and close it.

Restart the Apache running the command c:\apache24\bin\httpd.exe -k restart

## Activating the Zend Guard Loader

Download the Zend Guard Loader dll for Windows, on link below and place the dll in the C:/php/ext.

[Download ZendGuardLoader](http://cdn1.netmake.com.br/download/ZendGuardLoader/Windows/zend-loader-php5.6-windows-x86.zip)

Open the php.ini (C:/php/php.ini) and at the end of the file, add the line:

*[zend]  
zend\_extension=C:/php/ext/ZendLoader.dll  
zend\_loader.enable=1  
zend\_loader.disable\_licensing=0  
zend\_loader.license\_path=*

After this procedure restart the Apache using the command c:\apache24\bin\httpd.exe -k restart in the CMD