Wow! - That was my initial reaction when I first saw early versions of SugarCRM 7.0 (Sugar 7) a little over a year ago. It reminded me of how impressed I was the first time I saw Sugar in its 3.0 days.
Fast forward to today and a lot of folks have had a chance to experience the same. New customers utilizing the SugarCRM OnDemand environment have had access to 7.0 for a few months. More recently, new on-premise customers utilizing classic LAMP stacks have also been able to take advantage of all the great new features in 7.0.
As the with any new software release, as it gets exposed to greater quantity of users, certain patterns emerge relating to common problems users encounter. Sugar 7 is no exception.
Perhaps the most common issue in the 7.0 world today is one where the install procedure completes without error, but after completion, the Sugar login page never displays. In its place, users will see the following:
It would seem Sugar never stops loading because the message never goes away. This is actually not far from the truth, but fortunately, there is a very simple fix to this problem. Before we look at the solution, it is worth briefly discussing the nature of the problem, as it is directly related to an important change that has been introduced into the Sugar architecture.
The reason for the error is that Sugar 7 relies on a web server feature termed URL rewriting in order to access its new RESTful API and in turn, function as an application. Were you to examine the .htaccess file located in the root directory of a Sugar 7 install, you would see the various rewrite rules that Sugar 7 relies upon.
Side note: If you wish to learn more about URL rewriting, take a look at this post: http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/
In order for this feature to work on Apache, one must do two things: enable the mod_rewrite Apache module and configure the corresponding directory for a site to allow rewriting. Both of these are typically accomplished by means of some edits to the Apache configuration file, httpd.conf.
Most Linux distributions already include mod_rewrite, but it is not always enabled. To enable it, edit the Apache configuration file and ensure that the line loading the mod_rewrite.so module is not commented out. Note that depending on your distribution, the main Apache configuration file may be loading other configuration files indicating which modules should be loaded.
Our next change relates to the configuration of the directory where the Sugar 7 files have been placed. For the purposes of our example, let us assume that Sugar 7 was installed to /var/www/html/sugarcrm/
Our httpd.conf entry for this directory would need to be configured as follows:
Options Indexes FollowSymLinks MultiViews
Allow from all
After you have applied your changes, restart Apache and try loading Sugar 7 once again. If all went well, you should now see the new login page, picture below:
If you continue to see the Loading... message, double check that the mod_rewrite module is indeed enabled. One quick way to check from within your browser if the configuration is adequate is by attempting to visit the following URL:
Should you see anything besides a help file listing a number of API methods, it is an indicator that mod_rewrite is not functioning/enabled or the directory configuration is not allowing rewriting. Neither of these is optional.