SugarCRM running on Project Zero
Posted by nicholsr on March 29th, 2008. Other posts by nicholsr
In the few short months since I announced that we can run phpBB on Project Zero we have been pushing hard to extend the XAPI interfaces in the PHP runtime that give us access to the wealth of PHP extensions. As we flesh out the interface and attach more extensions to the runtime we are able to run more and more existing PHP code. We can now run SugarCRM Community Edition 5.0. Instructions on installing and configuring SugarCRM CE are below.
Installation Instructions
- Follow the instructions to install the Project Zero Command Line Interface. You need the code from Milestone 5 (M5) or later.
- Make sure both the Java bin directory ( Java SDK 5.0 or later ) and the zero directory are on your PATH.
- Create a new Zero PHP project called SugarCRM by running:
zero create SugarCRM
- Get the full installation package of SugarCRM CommunityEdition 5 (currently this is 5.0.0b ) and unzip it into the public directory of the new SugarCRM project.
- In the public directory there should now be a directory SugarCE-Full-5.0.0b.
- Move all the files and directories in the SugarCE-Full-5.0.0b directory up a level so that they are in the public directory and the SugarCE-Full-5.0.0b. is empty.
- Download and unzip Mysql Community Edition 5.1. On a command line start the mysql server by changing to the bin directory and running;
mysqld --console
- Now we are going to add two dependencies to the project. The first pulls in the mysql database connector and the second adds the PHP interpreter to the project. Edit SugarCRM/config/ivy.xml to add the following two lines :
<dependency name="mysql-connector-java" org="mysql" rev="5.1+"/>
<dependency name="zero.php" org="zero" rev="1.0+"/>
- Resolve the project before proceeding – this will cause the PHP interpreter to be fetched and added to the project. From the SugarCRM directory type this before editing the php.ini file
zero resolve
- Now make a few changes to the PHP configuration file in SugarCRM/config/php.ini :
- Comment out this error_reporting setting in php.ini
; error_reporting = E_ALL|E_STRICT
- uncomment this line in php.ini
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERR
- uncomment the include_path setting in php.ini so that it will include the current directory
include_path = ".";
- Change the session save handler in php.ini from zero to memory.
session.save_handler = memory
- If you are not using an IBM JVM you may need to increase the size of the heap. Do this by setting the environment variable “ZERO_OPTS” to the value “-Xmx100m”
- Start the project by typing this in the SugarCRM directory
zero run
- Browse to http://localhost:8080/ and follow the installation pages. Refer to the Sugar 5.0 Installation and Administration Guide for more information.
- NOTE that if you are using Windows and you do not already have it then you may need to install the 2005 version of the Microsoft C/C++ Runtime.
Rob Nicholson.

April 7th, 2008 at 10:12 am
The instructions are great, but you should note that the default heap size (on windows at least) for the JRE is 64M - which is not big enough for this install. I altered mine using -Xmx100m - either in zero.bat, or in the Eclipse Window->Preferences->Java->Installed JREs->Default VM Arguments.
April 15th, 2008 at 1:40 am
I think
include_path = “.”;
is optional.
April 16th, 2008 at 5:54 pm
[…] for sharing Jacob. As you read earlier, the Zero PHP runtime team has recently been working on running SugarCRM on Zero. Filed in […]