-
Notifications
You must be signed in to change notification settings - Fork 0
Devbox installation guide
[andrerod: we should split this into Windows and Linux tracks...]
- Install git client from here.
- For MSFT employees, ask antonba to give you pull/push permissions to azure-sdk-for-php. [andrerod: we should remove the msft employees part :) this wiki will be public at some point :)]
You can perform this task either from GIT Bash or from GIT GUI.
From Git Gui, use the following URL
https://YourGitHubLogin@github.com/WindowsAzure/azure-sdk-for-php.git
From Git Bash, type the following command
git clone -b dev https://YourGitHubLogin@github.com/WindowsAzure/azure-sdk-for-php.git
[deepakv: there would be users who already have php installed like by using webpi which install non thread safe version of php, so this section could be skipped by those users or this section could be confusing to the user that this sdk would only work with thread safe version??] Download the version 5.3 thread safe version PHP you can use either:
-
MSI: in this case make sure to include the
php_info
andphp_xls
as they are not included by default. -
.zip: you should get copy from
go-pear
because sometimes it's not included with the download.
During installation, please choose a target path that doesn't contain spaces, which prohibit some scripts to run correctly on Windows. After completing the PHP installation, the PHP SDK code should be workable on the machine.
This document assumes that PHP is installed in C:\PHP
The complete instruction on configuring PHP on your machine is available here at this link.
In practice, PHP configuration comprises the following steps:
- set cgi.force_redirect =0; search cgi.force_redirect in php.ini, uncomment cgi.force_redirect by removing ; at the begging of the line, and set the value to 0.
- set cgi.fix_pathinfo, search cgi.fix_pathinfo in php.ini, uncomment cgi.fix_pathinfo by removing ; at the beginning of the line.
- set fastcgi.impersonate = 0, search fastcgi.impersonate in php.ini, uncomment fastcgi.impersonate by removing ; at the beginning of the line, and set the value to 0.
- disabling fastcgi.logging, search fastcgi.logging in php.ini, uncomment fastcgi.logging by removing ; at the beginning of the line, set the value to 0.
- set
date.timezone = "America/Los_Angeles"
- enable
extension=php_mbstring.dll
From PHP source directory, type [deepakv: I didn;t have go-pear may be a clue on where to get it would help?]
go-pear.bat
- select system for the system|local
- type enter for all the questions.
- when go-pear.bat is completed, a new file
C:\PHP\PEAR_ENV.reg
will be created. Double click this file to register it. - upgrade PEAR to the latest version by executing this command:
pear upgrade PEAR
Note: if you faced any problem first thing to do is to execute these commands:
pear clear-cache
pear config-set preferred_state beta
If that didn't work then you should tackle your mind and figure out the reason!
Requires libraries are:
-
HTTP_Request2:
pear install http_request2
-
Mail_Mime:
pear install mail_mime
-
Mail_mimeDecode:
pear install Mail_mimeDecode
Azure SDK PHP build include PHP documentation, unit testing and more. It is driven by ANT build system.
PHP unit test suite depends on properly installed xDebug, the correct configuration of TMG client and the right Azure account credential. For xDebug installation, please refer to xDebug installation page
The full installation manual for ant is available at Ant installation page
The ant can be download from a mirror on this page
Installation bottom line:
- Extract the Ant to a place on your disk, e.g. C:\ant
- Add the bin directory to your path. (add C:\ant\bin to your PATH)
- Set the ANT_HOME environment variable to the directory where you installed Ant. On some operating systems, Ant's startup scripts can guess ANT_HOME (Unix dialects and Windows NT/2000), but it is better to not rely on this behavior.
PHP QA tools include the unit test, checkstyle, code analysis and many other tools that is useful to ensure high quality PHP coding standard.
pear config-set auto_discover 1
pear install pear.phpqatools.org/phpqatools PHPDocumentor
Ensure that the following bat files reference the correct path to php.exe within them:
- pdependent.bat
- phpab.bat
- phpcb.bat
- phpcpd.bat
- phpdox.bat
- phploc.bat
- phpmd.bat
- phpunit.bat
The source code of Autoload is available at the this website, however, the installation can be completed in PEAR alone. The following three command will help you install Autoload.
pear channel-discover pear.netpirates.net
pear channel-discover components.ez.no
pear install theseer/Autoload
pear config-set preferred_state alpha
pear config-set auto_discover 1
pear install pear.netpirates.net/phpDox
The binary of xDebug can be found here, please find one according to your machine's configuration.
[andrerod: this section should also not be on the public wiki...] Please go to this website and pick the right version of the client according to your machine's OS type and install it following the instructions.
The unit test requires access of Windows Azure account, we need to pass a pair of valid Windows Azure storage account and Windows Azure storage key to the unit test by setting AZURE_ACCOUNT
and AZURE_KEY
in the environment variable.
[deepakv: following would be internal only detail]
If you do not have your own AZURE_ACCOUNT
and AZURE_KEY
, please login your windows azure account to create them through http://windows.azure.com
. If you do not have the corporate account to access this website, please contact Amit Sharma (amitshar)
using cmd.exe, navigate to the PHP SDK project directory, type ant
Download Java Runtime from here and install. For 32 bit operating system, install jdk-7u3-windows-i586.exe, for 64 bit operating system, install jdk-7u3-windows-x64.exe.
Netbeans is our perferred php editor you can pick up anything that you like. Download NetBeans full version from here and install following the instruction. This version of Netbeans has dependency of Java Runtime, as a result, please make sure JDK with version number > 1.6 installed properly.
FAQ [deepakv: I feel this should go to the 'Install Autoload' section, while I am installing autoload if an error occurs I might not scroll down to see the FAQ , instead I would immediately start binging for the error]
-
What if I see the following error message during the installation of Autoload?
theseer/DirectoryScanner requires PHP extension "fileinfo" theseer/Autoload requires package "theseer/DirectoryScanner" (version >= 1.1.0) No valid packages found
This is because fileinfo module hasn't been enabled. Make sure that php_fileinfo.dll
reside in ext directory. If php_fileinfo.dll
doesn't exist in ext directory, please download the zip file, and manually copy php_fileinfo.dll
to the ext directory.
-
What if we encounter "cannot find the release" error during pear package installation?
pear clear-cache pear config-set auto_discover 1