Tuesday, August 3, 2010

How to Install SugarCRM with SQL Server 2008 and IIS 7.0

Hi!

Welcome to my blog again. So, here is something useful for you. The following post can be used as a reference to install SugarCRM on a Windows Server 2008 machine with IIS 7.0. Please note that unlike IIS 5.1 or 6.0, IIS 7.0 comes with FastCGI, so you do not have to install the CGI component.


In this guide, I have assumed that SQL Server is installed on a different machine than Web Server. If you want to install SugarCRM with SQL Server on a single machine, still you can use this guide. You just have to change the SQL server information in Step 6 of Chapter 4.

I have included screen snapshots to demonstrate the entire process. However, I have not covered much details regarding SQL Server installation. I assume, you are well acquainted with it.


Best of Luck!


JS

------------------------------------------------------------------------

Table of Contents

1. Assumptions
2. Install PHP
3. Install SQL Server Express Edition
4. Configure SugarCRM

1. Assumptions

The following are the assumptions:

1. Web server is running on Windows Server 2008 machine.

2. IIS 7.0 is installed as webserver.

3. SQL Server 2008 is installed on database server.

4. sa account is active in SQL server, that is, both SQL Authentication and Windows Authentication are enabled as login methods.



2. Install PHP

and download PHP Windows binaries “PHP 5.2.14 VC6 x86 Non Thread Safe” Zip package. Please make sure that you do not install latest version (5.3.x) as support for Microsoft SQL Server has been temporarily taken out from the new versions.










2. Extract the package into C:\PHP\

3. Go to Properties of My Computer->Advanced and append the system environment variable "Path" to ";c:\PHP\".





















4. Create a new environment variable. Call it “PHPRC” and assign it value "c:\PHP\".

5. Go to “c:\PHP” folder, and rename “php.ini-recommended” to “php.ini”

6. Open “php.ini” file and make sure the following entries, appear like these:

extension_dir = "C:\PHP\ext"
error_log="C:\inetpub\temp\php-errors.log"
cgi.force_redirect = 0
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
extension=php_mbstring.dll
extension = php_mssql.dll
mssql.charset = "UTF-8"
mssql.datetimeconvert = Off
mssql.secure_connection = Off
variables_order = "EGPCS"
error_reporting = E_ALL & ~E_NOTICE
display_errors = on
display_startup_errors = On

7. Make sure that FastCGI scripts are enabled in IIS by going to the following page:
Server Manager -> Roles -> Add Role Services. On the Select Role Services page















8. Open IIS Manager and at server level, open Handler Mappings.













9. On right, select “Add Module Mapping”. Provide the following values and restart IIS:
Request path: *.php
Module: FastCgiModule
Executable: "C:\PHP\php-cgi.exe"
Name: PHP via FastCGI














10. Add PHPVersionInfo as a website in IIS and set “index.php” as default page.

11. Create a simple PHP script file “index.php” and save it in PHPVersionInfo website.


3. Install SQL Server Express Edition Express
1. Install SQL Server Express Edition.

2. Make sure that SQL Native Client is installed. If not installed, please use the following link:
http://www.microsoft.com/downloads/details.aspx?FamilyID=c6c3e9ef-ba29-4a43-8d69-a2bed18fe73c&displaylang=enp;displaylang=en



4. Install SugarCRM
1. Download SugarCRM Community Edition 5.5.4 from the following location:http://www.sugarforge.org/frs/?group_id=6/frs/?group_id=6


2. Extract all the files in C:\Inetpub\wwwroot\SugarCRM folder. Please make sure that IIS user has “full-control” rights to the SugarCRM folder.

3. Add this folder as a website in IIS and set “index.php” as default document.
4. Now open “install.php” in internet explorer from SugarCRM website. The setup will check the system requirements and will prompt for issues.

















5. If “install.php” shows SQL Server problem, download “ntwdblib.dll” from

and replace the existing one in "C:\PHP\" with this one.























7. Complete SugarCRM installation.





http://www.dlldll.com/ntwdblib.dll_download.html





2 comments:

  1. hi

    Database failure. Please refer to sugarcrm.log for details.
    i try to install sugar with sql server but i have always this message. my user is admin

    ReplyDelete