SugarCRM upgrade to 5.0.0a

We decided to take the plunge and upgrade to SugarCRM 5.0.0a on our internal test and production server. We ran SugarCRM 4.5.1g on a Gentoo Linux box which kept having problems while an install on our i520 although slow was pretty stable. We had taken MySQL and SugarCRM down over the Christmas period and not started it up until now. To say we had problems is an understatement, 2 days later and we now have a working install again.

We wont go into all the details of how we upgraded because the upgrade wizard available in SugarCRM seems to be pretty good at getting the job done. The following are just a few notes on the problems we encountered and how we got over them.

First problem was trying to start MySQL on the i520, we kept getting an error which pointed to a missing mysql.host file! We have not touched the install so could not understand what has happened. We also looked in the logs to see a file /usr/local/mysql/share/mysql/english/errmsg.sys was missing. One thing we did do was remove the Platform install? Could the removal of the platform have removed these files? Platform does install its own copy of a MySQL server instance so its possible. We also implemented the PASE_TZ variable as mentioned in a previous post which could have contributed to the problem as the date within the PHP environment has been changed.

We copied the sugarcrm directory from the mysql/data directory and removed the entire installation. We then re-installed following the normal installation instructions including setting up the access to the msql tables again. We had a few more issues running the server associated with the finding of certain objects but cleaning up the LIBPATH environment variable seems to have cleared that up? Once we had the MySQL server instance up and running we simply moved the sugarcrm directory back into the mysql/data directory, restarted the server and we could see the database in phpmyadmin. We had to set up the sugarcrm user profile as well as the required authorities manually because we didn’t restore the mysql tables into the data directory(not sure if this would have worked?)

We could now start the SugarCRM webserver and successfully signed into the application and all of the data was back in place. The i520 while I love it, is terrible at serving the SugraCRM data (probably would be the same for any PHP application?) so we have made the decision to move the SugarCRM install back to the Linux Server. To do this we had to migrate the data from the i5 to the Linux MySQL instance. This was not as easy as I first thought it would be! First we had to upgrade the 4.5.1g version to 5.0.0a on the Linux Box.

The upgrade went well except for a couple of problems, we had to set up the SugarCRM install to accept our version of PHP. We run Gentoo on the server so when php returns its version it returns 5.2.4_p20070914-pl2-gentoo which is not in the suported version array for SugarCRM. We had to go into the utils.php file in the include directory of the SugarCRM install to add the required entry. We also had to change a number of size limits for POST data and upload file sizes which are detailed in the installation instructions. Failing to do this will stop the upgrade wizard in it tracks. We downloaded the file locally and used it to do the upgrade, trying to use the SugarForge just didnt work for us.

We then had to do the same for the i520, while the process wasn’t without error and took immensely longer than on the Linux Box it did eventually complete. We had similar problems as the Linux box in terms of having the correct environment variables but the timeouts caught us many more times probably because its so slow! A feature we found most disturbing was the browser would time out and go blank, we just kept checking the active jobs and could see the ZENDCORE jobs and MySQL server jobs were running with a high CPU utilization, once they returned to idle we could refresh the browser and all would be fine!

We now had 2 systems with the same level of database, we just had to move the data from the mysql database to the other. We started off by clearing everything out from the target MySQL Database, the we tried to export the data, we started off with the accounts. Trying to use the export function on the i5 in SugrarCRM kept failing? its was probably our impatience which added to the problem but it sat there at 90% for ever (or so it seemed) so we kept canning the process! We then went to the MyPHPAdmin functions to export the various tables manually. Accounts went well, but the dump of the contacts table did not. The account information for the contact is not in the contact table, so importing the contacts did not tie it up to the account! Eventually we found that if we exported the data in smaller chunks we could get the export function to work, it also correctly exported the information required to link the various objects during the import! Eventually we were able to export the Accounts, contacts, opportunities and leads with no problems.

Importing the to the Linux box also failed a number of times but persistence paid off.

We now have a fully functioning SugarCRM install on our Linux Box, we will leave the i520 install up and running for test purposes but it totally inadequate for production purposes.

A couple of notes we would like to add, firstly the lack of a scheduler such as CRON on the i5 limited the SugarCRM capabilities. The i520 just isn’t man enough to run the application effectively, we only have limited users and the performance was heartbreaking! We do have the i515 installtion to complete which we will do just to see if performance is better on the unrestricted CPU? If th System i family are to be considered suitable hosts for PHP applications IBM (no one else has the ability to do it) MUST improve the PHP/PASE environment. I would rather see PHP running as a true i5OS job as the PASE environment seems to have a lot of challenges (see our previous posts). We have now decided against developing PHP interfaces to our products which run on the i5, we dont feel the experience would be a good one for the type of products we develop and sell?

This post is not about how to perform an upgrade of SugarCRM, its just showing some of the problems we have experienced and the opinions we have formed from those experiences. Hopefully you can see where we went wrong and not make the same mistakes.

Chris…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.