While Microsoft does not officially endorse PHP, I’ve done lots of PHP work. When presenting at the Zend PHP Conference a couple of weeks ago, I met the folks from SugarCRM.
SugarCRM offers both a commercial version of their product and a free Open Source version.
The SugarCRM guys were interesting to talk to and their demo was interesting so this weekend I thought I’d install it and play around with discovering what it might take to get the OpenSource version to run on SQL-Server .
Well, I had some issues. Often, when Microsoft slips a product delivery, its because all the backward compatibility work is so time consuming.
It turns out that SugarCRM (at least the free version) does not support current versions of PHP or current versions of MySQL.
The current PHP version is 5.0.5 and 5.1.0 is in beta at the time of this writing. But SugarCRM will only install on PHP 4.x. This is a problem since the Object Oriented features in PHP are not in version 4.x, only in 5+.
So I’m not going to give up OO to run SugarCRM.
What’s more. SugarCRM doesn’t yet support Microsoft SQL Server and it fails to install on the latest version of MySQL, version 5.0, it wants the older version 4.1
First I’ll tackle the database issue.
You can run multiple instance of MS-SQL or MySQL (or both) on Windows at the same time.
Simply install MySQL 4 on an UNUSED port and a unique service name.
Note that on my box I have multiple instances of both Microsoft SQL and MySQL running at the same time.
But what about running multiple versions of PHP on a single machine at the same time? I posted this question in several forums, asked a few Linux/Apache admins that I know, and researched in the Apache books at B&N and couldn’t find a way to do this on Linux or Windows with Apache, but with Windows IIS(5/6) it was easy.
Since PHP applications are processed on Windows as either a CGI script or by an ISAPI extension (depending in your configuration), IIS doesn’t require a virtual directory to be configured for PHP applications. But, if you choose to use the features, IIS can do some lifting for you and will allow you to specify application handlers on a directory by directory basis.
This is how you can install and run multiple versions of PHP on the same Windows box and side step the application compatibility problems that are often found between Open Source platform products and Open Source application products.
It’s easiest to install the newest version of PHP LAST. (Assuming that is the version that you want to use by default.) So here are the steps:
Now, download and install SugarCRM, I used the install directory c:\inetpub\wwwroot\SugarCRM
Then open the IIS configuration manager.
Select the SugarCRM directory (In this image it’s already an application root.)
Right click in the SugarCRM directory and select “Properties”.
Click on the Create Button to convert SugarCRM into an IIS application.
The click on the “Configuration” button.
Hi-light the .PHP extension (or the deprecated extension if appropriate) and click the “Edit” tab.
The executable handler will point to which ever PHP instance that you installed LAST.
Click the browse button to find and select the older version that SugarCRM requires (PHP 4.x)
Now you can install SugarCRM because the Application directory will be managed by IIS and IIS will use PHP4 to run .php files in that directory.
When you run the SugarCRM installer, if you have multiple instances of MySQL and the older version (4.1) is not the default – you have to specify the port number for the older instance of MySQL that SugarCRM requires.
And POOF !
IIS ROCKS !!!
And if you think that’s cool, wait until you see what you will be able to do with IIS 7 !!!