Monday 22 November 2010 4:11:39 am
By : Thiago Campos Viana
In this post I will create a walkthrough on how to set up an php continuous enviroment on Windows. This is not a complete post, I will need your help to make it perfect.
Download XAMMP Lite
http://www.apachefriends.org/en/xampp-windows.html
Install it in C:\
\apache\conf\httpd.conf
Uncoment #LoadModule rewrite_module modules/mod_rewrite.so
Change the settings in the file: C:\xampplite\php\php.ini
max_execution_time 180 max_input_time 180 memory_limit 128
########################
Control Panel->System->Advanced->Environment Variables->User Variables for XXXX
Add or change the PATH variable with the value: C:\xampplite\php
########################
Download XDebug
http://xdebug.org/download.php
Rename the dll file to XDebug to php_xdebug.dll
Move it to C:\xampplite\php\ext
Open the file C:\xampplite\php\php.ini:
# At the XDebug block add: zend_extension = "XAMPP_HOME\php\ext\php_xdebug.dll". # Find and uncomment the line: xdebug.remote_host=localhost. Change the value of the setting from localhost to 127.0.0.1. # Find and uncomment the line: xdebug.remote_enable = 0. Change 0 to 1. # Find and uncomment the line: xdebug.remote_handler = "dbgp". # Find and uncomment the line: xdebug.remote_port = 9000. # Save the php.ini file.
########################
Install pear extensions
Start->Run->Type "cmd"
cd C:\xampplite\php pear channel-update pear.php.net pear channel-discover pear.symfony-project.com pear install symfony/YAML #pear upgrade symfony/YAML pear channel-discover components.ez.no pear install -a ezc/eZComponents #pear upgrade ezc/eZComponents pear channel-discover pear.phpunit.de pear remote-list -c phpunit pear install --alldeps phpunit/PHPUnit #pear upgrade phpunit/PHPUnit pear install PhpDocumentor pear install Testing_Selenium-beta pear install PHP_CodeSniffer pear channel-discover pear.xplib.de pear install xplib/PHP_CodeSniffer_Standards_EZC-beta pear install phpunit/PHP_CodeBrowser pear channel-discover pear.pdepend.org pear install pdepend/PHP_Depend-beta pear channel-discover pear.phpmd.org pear install phpmd/PHP_PMD-alpha pear install --alldeps phpunit/phpUnderControl
http://sourceforge.net/projects/cruisecontrol/files/
Install java jdk
change the JAVA_HOME variable to C:\Program Files\Java\jdk1.6.0_17
Maybe it could be needed to copy jdk_home/lib/tools.jar to jre6_home/lib/ext
Run using the Start menu the file cruisecontrol.bat
phpuc install "C:\Program Files\CruiseControl"
Close the cruisecontrol prompt and go to the Start menu and open it again.
########################
Download Netbeans (PHP or Full)
http://netbeans.org/downloads/index.html
Change Netbeans language:
Netbeans_Folder\etc
Open "netbeans.conf", find the default options line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
Add "-J-Duser.language=en -J-Duser.region=US" to the end of line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Duser.language=en -J-Duser.region=US"
Open the Netbeans
Tools->Options->PHP
General
PHP 5 Interpreter=C:\xampplite\php\php.exe
UnitTesting
PHPUnit Script: C:\xampplite\php\phpunit.bat
########################
Download NBGit
http://code.google.com/p/nbgit/
Netbeans->Tools->Plugins->Download->Add Plugin
Team->Git->Clone other
http://github.com/ezsystems/ezpublish.git ( Only the benchmark and tests folder are important now )
###########################
download netbeans php codesniffer
http://github.com/beberlei/netbeans-php-enhancements/downloads/
Tools->options->php->code sniffer->pear
#################################
available plugins
selenium module for php
#################################
php md for netbeans ( I'm not sure if it is woking )
http://sourceforge.net/projects/phpmdnb/
Tool->options->misc->phpmd
Using phpmd:
phpmd C:\xampplite\htdocs\ez\kernel\classes\ezaudit.php xml codesize,design,unusedcode,naming --reportfile C:\teste.xml
############################
Using pdepend:
pdepend --summary-xml=/tmp/summary.xml \ --jdepend-chart=/tmp/jdepend.svg \ --overview-pyramid=/tmp/pyramid.svg \ /usr/local/share/pear/PHP/Depend
############################
Download ez publish
http://share.ez.no/download-develop
C:\xampplite\htdocs
extract ezpublishcommunity-4.4.0-with_ezc-gpl.tar.gz
rename the folder ezpublish-4.4.0-with_ezc-gpl to ez
Install it.
#########
Running tests:
php bin/php/ezpgenerateautoloads.php -e php tests/runtests.php extension/extfolder
BD testing
php tests/runtests.php -D mysql://root@localhost/ezpublish extension/extfolder
#########
Now you need to set up cruisecontrol to work with your project.
Timing: | Jan 18 2025 02:13:32 |
Script start | |
Timing: | Jan 18 2025 02:13:32 |
Module start 'layout' | |
Timing: | Jan 18 2025 02:13:32 |
Module start 'content' | |
Timing: | Jan 18 2025 02:13:32 |
Module end 'content' | |
Timing: | Jan 18 2025 02:13:32 |
Script end |
Total runtime | 0.1241 sec |
Peak memory usage | 6,144.0000 KB |
Database Queries | 43 |
Checkpoint | Start (sec) | Duration (sec) | Memory at start (KB) | Memory used (KB) |
---|---|---|---|---|
Script start | 0.0000 | 0.0048 | 588.0703 | 152.6406 |
Module start 'layout' | 0.0048 | 0.0029 | 740.7109 | 39.4844 |
Module start 'content' | 0.0077 | 0.1148 | 780.1953 | 417.0469 |
Module end 'content' | 0.1225 | 0.0015 | 1,197.2422 | 19.7031 |
Script end | 0.1240 | 1,216.9453 |
Accumulator | Duration (sec) | Duration (%) | Count | Average (sec) |
---|---|---|---|---|
Ini load | ||||
Load cache | 0.0030 | 2.4360 | 15 | 0.0002 |
Check MTime | 0.0012 | 1.0019 | 15 | 0.0001 |
Mysql Total | ||||
Database connection | 0.0006 | 0.4852 | 1 | 0.0006 |
Mysqli_queries | 0.0377 | 30.3574 | 43 | 0.0009 |
Looping result | 0.0003 | 0.2488 | 41 | 0.0000 |
Template Total | 0.0949 | 76.5 | 2 | 0.0475 |
Template load | 0.0022 | 1.7704 | 2 | 0.0011 |
Template processing | 0.0927 | 74.7168 | 2 | 0.0464 |
Template load and register function | 0.0001 | 0.0895 | 1 | 0.0001 |
states | ||||
state_id_array | 0.0009 | 0.6883 | 1 | 0.0009 |
state_identifier_array | 0.0008 | 0.6681 | 2 | 0.0004 |
Override | ||||
Cache load | 0.0020 | 1.6509 | 174 | 0.0000 |
Sytem overhead | ||||
Fetch class attribute name | 0.0026 | 2.0638 | 3 | 0.0009 |
class_abstraction | ||||
Instantiating content class attribute | 0.0000 | 0.0081 | 3 | 0.0000 |
General | ||||
dbfile | 0.0006 | 0.5232 | 10 | 0.0001 |
String conversion | 0.0000 | 0.0073 | 4 | 0.0000 |
Note: percentages do not add up to 100% because some accumulators overlap |
Usage | Requested template | Template | Template loaded | Edit | Override |
---|---|---|---|---|---|
1 | node/view/full.tpl | blog_entry/full.tpl | extension/community_design/design/suncana/override/templates/blog_entry/full.tpl | ||
2 | content/datatype/view/ezxmltext.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tpl | ||
9 | content/datatype/view/ezxmltags/strong.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/strong.tpl | ||
23 | content/datatype/view/ezxmltags/line.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/line.tpl | ||
6 | content/datatype/view/ezxmltags/link.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/link.tpl | ||
13 | content/datatype/view/ezxmltags/paragraph.tpl | <No override> | extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl | ||
8 | content/datatype/view/ezxmltags/literal.tpl | <No override> | extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tpl | ||
1 | content/datatype/view/ezkeyword.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezkeyword.tpl | ||
1 | print_pagelayout.tpl | <No override> | extension/community/design/community/templates/print_pagelayout.tpl | ||
Number of times templates used: 64 Number of unique templates used: 9 |
Time used to render debug report: 0.0002 secs