Windows (Apache) Installation Instructions for Development

Wiki Purpose: To guide developers through the Zurmo bare installation process for development purposes.

Who should read this Wiki: A Developer who is a registered member of the Zurmo development program..

Please note this is not an installation guide for setting up a production server..
  1. Install Xampp
    1. Download and run the following installer.
      http://www.apachefriends.org/download.php?xampp-win32-1.7.4-VC6-installer.exe
    2. Follow Xampp installation instructions and install to C:\xampp (default)
      .
  2. php.ini configuration changes(C:\xampp\php\php.ini)
    1. Uncomment the line ;extension=php_curl.dll
    2. Uncomment the line ;extension=php_soap.dll
    3. Uncomment the line ;extension=php_pdo_mysql.dll
    4. Add the line extension=php_apc.dll
      download from http://downloads.php.net/pierre/ and save in \php\ext\
    5. Change date.timezone = America/Chicago
    6. Change memory_limit = 250m
    7. Change max_execution_time = 300
    8. Change post_max_size = 20M
    9. Restart apache for the php.ini changes to take effect
  3. my.ini  configuration(C:\xampp\mysql\bin)
    1. Add next lines under [mysqld] section:
    2. character-set-server=utf8
    3. collation-server=utf8_unicode_ci
    4. default-storage-engine=INNODB
    5. max_sp_recursion_depth=100
    6. max_allowed_packet = 20M
    7. thread_stack = 512K
    8. optimizer-search-depth = 0
    9. log_bin = 0 (this is default settings, and in most cases you will not need to modify it)
    10. Restart mysql for the my.ini changes to take effect
  4. Install putty, and all other binaries like pageand.exe, plink.exe. Using putty is an optional step and only required if you use a cmd line svn, if using a gui based svn this step can be optional.
    1. There is a package that contains the required files: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    2. Start PuttyGen (from Start/Applications/Putty menu)
    3. Generate ssh2-rsa key
    4. When key is generated, add your email address to Key Comment field
      *note this is the email address that you used for bitbucket account, this is an important step, because it will allow us to communicate with bitbucket server without having to log in
    5. Save public key as id_rsa.pub
    6. Login to bitbucket, go to Account, copy and paste the key, into list of your keys
    7. Save private key as id_rsa.ppk, under C:\Documents and Settings\YOUR_USERNAME\ssh
      *note – you will need to create the ssh directory
  5. TortoiseHg
    1. Download and install TortoiseHg http://tortoisehg.bitbucket.org/
    2. Create file C:\Documents and Settings\YOUR_USERNAME\mercural.ini, and add following code: [ui] username = username email@example.com ssh=”C:\Program Files\PuTTY\plink.exe” -ssh -i
      “C:\Documents and  Settings\YOUR_USERNAME\ssh\id_rsa.ppk”
  6. Clone Zurmo from Repository
      1. Go to htdocs
      2. Create Zurmo folder
      3. Right click and go TortoiseHG -> Clone
      4. Set destination as: C:\xampp\htdocs\zurmo
      5. Set source as https://<your bitbucket username>@bitbucket.org/zurmo/zurmo
      6. Click on clone and enter your password when requested
        .
  7. PhpUnit PhpUnit is based on PEAR package, so it is important to update PEAR package first. Assuming xampp is installed to C:\xampp- Open a command prompt and go to C:\xampp\php
    1. Type “pear upgrade pear”
    2. Type “pear update-channels” (updates channel definitions)
    3. Type “pear upgrade” (upgrades all existing packages and pear)
    4. Type “pear channel-discover components.ez.no” (this is needed for PHPUnit)
    5. Type “pear channel-discover pear.symfony-project.com” (also needed by PHPUnit)
    6. Type “pear channel-discover pear.phpunit.de” (This IS phpunit)
    7. Type “pear install --alldeps phpunit/PHPUnit” (installs PHPUnit and all dependencies)
    8. Type “pear upgrade phpunit/PHPUnit” (upgrade phpunit to recent version)
    9. Restart your computer!
  8. Install Selenium http://seleniumhq.org/download/
    1. Download and copy the .jar file to a folder of your choice commonly C:\selenium
    2. Create a batch file to run the server and add file to start up
    3. To run server use java –jar selenium-server-standalone-2.5.0.jar
      *note: requires Java to be installed (obviously)
  9. Install Memcache
    1. Use this link for installation files and setup instructions
      .
  10. Windows PATH additions Make sure the following paths are added to the windows path information.
    1. C:\xampp\php\
    2. C:\xampp\php\PEAR\
    3. C:\xampp\mysql\bin\
  11. Create MySql Database and User
    1. Create a Database called zurmo
    2. Create user zurmo  (a password is required, remember this password as it will be required during install)
    3. Grant user zurmo all privileges on zurmo database (important! That this user can create/drop databases)
    4. Create database called zurmo_test
    5. Create user zurmo_test set password to zurmo_test
    6. Grant user zurmo_test all privileges on zurmo_test database (important! That this user can create/drop databases)
    7. Create database called zurmo_temp
    8. Create user zurmo_temp set password to zurmo_temp
    9. Grant user zurmo_temp all privileges on zurmo_temp database (important! That this user can create/drop databases)
      .
  12. Run unit test
    1. Go to C:\xampp\htdocs\zurmo\app\protected\tests\unit from the command line
    2. Run phpunit –verbose TestSuite.php All (remember two dashes before the verbose)
    3. Run phpunit –verbose TestSuite.php All –no-freeze (remember two dashes before the verbose & no-freeze)
    4. Run functional tests
  13. You are ready to go to http://localhost/zurmo/app and install the application
    1. The install will check the environment setup and report on the results, fix any errors and rerun
    2. Add the database information
    3. The installation will create all tables and test data
    4. Open link to zurmo application
.

Additional Notes

    • Eclipse Tweaks
      • If you are using eclipse as your IDE, then install AnyEdit http://andrei.gmxhome.de/anyedit/
         which auto-strips trailing spaces on save
      • For the default text editor:
      • General > Editors > Text Editors > Insert spaces for tabs (check it) .
    • For PHP:
      • PHP > Code Style > Formatter > Tab policy (choose “spaces”)
      • PHP > Code Style > Formatter > Indentation size (set to 4)
      • Eclipse > Preferences > General > Editors>
      • Text Editors > Show Print Margin  set to 120
      • Tweak line delimiters to make sure they are linux http://www.freshblurbs.com/line-delimiters-eclipse Select ‘other’ UNIX

Leave a Comment

  • Jpablo

    I had an issue installing Zurmo,
    I ran this: http://localhost/zurmo/app/index.php?r=install/default
    and I’ve got this error:
    include(Tidy.php) [function.include]: failed to open stream: No such file or directory
    C:xampphtdocszurmoappprotectedextensionszurmoincframeworkviewsPageView.php(121): spl_autoload_call(“Tidy”)

    Maybe the file is missing in the distribution package?

    • Jason Green

      You should make sure you have the tidy extension installed with PHP. If you can please post this issue in the forums, i can better address it there. Also – did you run the tests?

    • Jason Green

      The issue is definitely because you don’t have the tidy extension installed with php. I have just checked in the fix. The fix will gracefully tell you before install you need that installed before you can continue. Sorry for the inconvenience. Once you install tidy in php, your install should come up fine.

  • San Brar

    Hello, I am trying get customization to work but it’s not having much success so far. I am working of the latest dev build. Here is what I did.

    Installed the standard package.
    Copied the animal module from Zurmozoo
    Created perInstanceConfig & ZurmoZooInstallUtil

    Now I am not sure how to install the new module. Please help.

    • San Brar

      I think I was approaching this a little a wrong way. I though a module can be installed after the app has been installed but may not be the case. Not sure if someone can clarify this. Thanks.

    • Jason Green

      Can you provide the bitbucket user digimagic with access to your repository? I can take a look and see what you did. I assume you forked this on bitbucket?

      • San Brar

        I got the animal module to work but only after a re-install. I can’t figure out how to make it work without a re-install.

        So after some what success with animal module I tried my own module. It mostly worked after a re-install. Couldn’t get the menu to appear. Repository is as follow:

        https://bitbucket.org/sanbrar/z120205

        extension –> hvac
        module –> sizing_calc (follow your animal example)

        As of now >> no menu & have to re-install to install the module.

        Thanks

        • Sacha Telgenhof

          Hi San,

          Re-install is not needed. If you navigate to Admin > Designer and then to your newly created module edit one of the Fields. After pressing Save, Zurmo is creating/updating your new model.

          At least, this is how I figured it out without re-installing :)

  • http://www.facebook.com/hatem.alimam Hatem Alimam

    Hello,
    Thank you for your work.
    I just want to make a point, it’s too hard to install zurmo with all these dependencies.
    maybe more explanation in this page would make it easier.

    • http://www.zurmo.com Jason Green

      Thanks for the feedback. Its a tough situation. All the dependencies mean things will work and work well, yet you are right regarding the install. If we relax the dependencies during the install, then we risk a bad experience where things are not working or some features can’t be turned on. If you have some additional ideas, please let me know, maybe you can help with making some pre-approved VM snapshots or something?

  • Shark

    Hello,
    I think you should add in the point 3.9 (my.ini configuration) this line too
    log_bin_trust_function_creators = 1
    I was getting this error “ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL,
    or READS SQL DATA in its declaration and binary logging is enabled
    (you *might* want to use the less safe log_bin_trust_function_creators
    variable)”, but after adding the above mentioned line in my.ini, the phpunit testing started working fine.

    • Ivica Nedeljkovic

      Well there are two ways to fix this issue:
      1. Set log_bin=off in my.ini or my.cnf file, and in this case you will not need to care about value of log_bin_trust_function_creator
      2. If log_bin=on, you need to set also log_bin_trust_function_creators=on, and that is case you explained in your comment.

  • Vinicius da Costa Pires

    Someway,

  • saeba

    Hi,
    I’m trying to install zurmo, but i have this error :
    Error code: 1045
    Message: Access denied for user

    under “Database Username”

    ?

  • Riki Yudistira

    hi i test instal zurmo and get some trouble Installation in progress. Please wait… never finish and

    in botom page have this messege PHP warning

    date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Krasnoyarsk’ for ’7.0/no DST’ instead

    C:xampphtdocszurmoappprotectedcoreutilsDateTimeUtil.php(135)

    123 }
    124
    125 public static function convertTimestampToDbFormatDate($timestamp)
    126 {
    127 assert(‘is_int($timestamp)’);
    128 return Yii::app()->dateFormatter->format(DatabaseCompatibilityUtil::getDateFormat(),
    129 $timestamp);
    130 }
    131
    132 public static function convertTimestampToDbFormatDateTime($timestamp)
    133 {
    134 assert(‘is_int($timestamp)’);
    135 $timeZone = date_default_timezone_get(‘Asia/Krasnoyarsk”);
    136 date_default_timezone_set(‘GMT’);

    and more sourcecode about time

    • http://www.facebook.com/people/Ray-Stoeckicht/100001473956853 Ray Stoeckicht

      Can you post this on our Forums? We have a section for Installation & Setup. Our developers and community members will assist with the issues you are having:
      http://zurmo.org/forums/index.php?/forum/8-installation-and-setup/

    • Vladimir Nikolic

      @Riki Yudistira
      Open you php.ini file and find directive about date default time zone and set it there.
      For example:
      date.timezone = ‘America/New_York’
      (uncomment the line if commented out)
      save php.ini and restart your server.

  • DEEPAN RAJ

    I am using wamp server, can you people, have any other instructions

    • Ivica Nedeljkovic

      Unfortunately we don’t have any instruction directly related to WAMP server, but I think you you can find all info you need in this article. If you still have some issues, I suggest you to post in forum, I think that we have few people who are using WAMP so they might help you with installation.

  • hasulike me

    getting error while install
    http://localhost/zurmo/app/index.php
    Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in D:xampphtdocszurmoappprotectedcorecomponentsWebApplication.php on line 138
    pls help

    • http://www.facebook.com/people/Ray-Stoeckicht/100001473956853 Ray Stoeckicht

      Did you run the tests? Can you post this on our Forums? We have a section for Installation & Setup. Our developers and community members will assist with the issues you are having:
      http://zurmo.org/forums/index….

  • http://www.facebook.com/beskinajay பெஸ்கின் அஜய்

    We are installing in wamp server and getting issue for log_bin =0 we are unable to set this value.
    Can any one help?

  • Sujit

    Hi
    I installed Zurmo successfully, but i don’t know the username and password to login.What would be the default login credential. any guess???.

    • Ray Stoeckicht

      Try this:
      username: super
      password: super