Wednesday, September 22, 2010

SharePoint MySite Search 404 Page Not Found


Hope you are doing good. Today, my post is related to SharePoint. I hope you find this post interesting and useful.

I had moved MySites under a new site collection. Everything worked fine except when I clicked the link "Find all documents by " on my SharePoint MySite. The error was 404- Page not found.

I was surprised to see this error as the search option on MySite was working otherwise. If you are facing the same problem or even worst (the search feature doesnt work at all on MySite), then the following can provide some useful information to resolve the issue. I am not providing any definite solution but rather a directioon for you to get started in diagnosing and resolving the issue.

1. First check the URL of the search result page. This is the page which could not be opened with error 404.

2. Make sure that you can access the page directly by entering this URL in a new window/tab.

3. If you cannot access the page, then it may mean one of these two things:
a. You have accidentally deleted Search Center.
b. A wrong URL has been provided for Search Center.

Therefore, we need to perform few steps.

Create Search Center
1. Go to your homepage, then Site Actions--> Site Settings.
2. Click on Sites and Workspaces under Site Administration.
3. Add a new site with Title Search Center and site url should be "SearchCenter".
4. Select the site template as "Search Center" found under "Entrerprise" template.

Check Preferred Search Center Value
1. Open SharePoint Central Administration website.
2. Click on your Shared Service Provider's name under Shared Services Administration.
3. Click on MySite Settings.
4. Check the value of Preferred Search Center and verify if the URL is valid.
5. If the URL is not valid, provide the URL of the search center site you have just created.
6. In my case, I did not create any new Search Center but provided the URL of an existing one:


You may need to restart restart your IIS after making these changes.

Your situation may not be exactly identical with mine, but the aforementioned should provide you a rough idea about the problem and its resolution. You may have to perform all or some of the above suggested steps in order to resolve your issue.

Best of Luck!

Tuesday, August 3, 2010

How to Install SugarCRM with SQL Server 2008 and IIS 7.0


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!



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"
cgi.force_redirect = 0
fastcgi.impersonate = 1
fastcgi.logging = 0
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:;displaylang=en

4. Install SugarCRM
1. Download SugarCRM Community Edition 5.5.4 from the following location:

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.

Sunday, July 18, 2010

How to install PHP 5.3.2 with FastCGI on IIS 5.1/6.0

Last week, I was required to install PHP 5.3.2 on a Windows XP machine with IIS 5.1. Installing Microsoft products have always been easier. For someone like me having technology background in Microsoft products, the installation was not a piece-of-cake.

So like always, I trusted my friend Google. Unfortunately, most of the guides describing the procedure were either not precise or obsolete. Most of them relied on php5isapi.dll which is no longer packaged with PHP 5.3.2. However, after spending some time, I was able to successfully install PHP on IIS. I am writing this entry to help those who are facing the same situation as I was last week.

In this post, I have assumed that you are a programmer and well acquainted with Microsoft Windows XP. I will be describing the installation procedure but will not be telling you how to open or edit a file. Lets start now.

Since php5isapi.dll is not included in PHP anymore, first you need to install FastCGI from Microsoft's official website.

To learn about FastCGI extension, please visit the following site:

The installation is pretty simple since it is from Microsoft!

Now you need to download latest version of PHP which is 5.3.2 from:

Please download Windows Binary VC9 x86 Non Thread Safe Zip Package. I am assuming here that you are using 32-bit architecture.

Extract the content of the package to C:\PHP. You can use a different path if you really need to. In this post, I will use this path everywhere so if you go for a different path, please use it everywhere.

Note that in C:\PHP folder, there is no php5isapi.dll file. However, we have php-cgi.exe file which will be useful for us later. There will be two php.ini files. One will be for use during development and one for use in production. I used the later one. So rename the production file php.ini-production to php.ini. Open this file and make sure that following entries appear like these. (Remove comments whenever required or change key values)

extension_dir = "C:\PHP\ext"
cgi.force_redirect = 0
fastcgi.impersonate = 1
fastcgi.logging = 0

Save and close the file. Please make sure that all files/folders exist as specified in the above entries.

Now go to Properties of My Computer->Advanced and set the system environment variable "Path" to ";c:\PHP\".

Once done, go to C:\Windows\System32\inetsrv folder and open file fcgiext.ini and add the following:



Restart your computer.

Once restarted, type "inetmgr" on Windows Run command.

View Properties of "Websites", open "Home Directory" tab and click on "Configuration" button.
Click "Add" and provide the following values:
1. "C:\Windows\System32\inetsrv\fcgiext.dll" to "Executable" field.
2. ".php" to "Extension" field.
3. "Get,Head,Post" to "Verbs- Limit to"
4. "Script engine" and "Check that file exists" checkboxes should be checked.

Now go to "Documents" tab and add "index.php" to the list of default documents.
Open notepad and enter a simple script:


Save it as "index.php". Make a virtual directory in IIS and copy "index.php" to your website. Please make sure that the settings you made for "Websites" earlier are propagated to this Website.

View "Properties" of the website you have just added in IIS and under "Virtual Directory" tab, set "Application Protection to "Low (IIS Process)". Restart IIS.

Now open your website in a browser and you should see a page like this:

I will try to add screen snapshots to this tutorial to make it more understabable.
Future extension to this post:
I will demonstrate how to install SugarCRM (Open Source CRM) on this platform alongwith SQL Server 2008.
Best of Luck!