memory_limit - Recommended setting: 512M or higher. The memory_limit parameter mainly comes into play when executing large transactions such as mass update, export and import. If this setting is too low when trying to perform one of these actions, the end user will encounter a fatal error and the process will not complete. upload_max_filesize and post_max_size - Recommended setting: 30M or higher. Both of these settings work in conjunction with each other when uploading files through SugarCRM which includes future upgrades as well as document and note attachments. Please note that there is also a setting in the application which can limit file upload file size for end users so the settings in PHP should be high enough to allow any future upgrade files to be loaded without error. max_execution_time = Recommended setting: 300. This setting controls how long a PHP process will remain active. It is important to set this parameter to a value that will allow for large requests to complete if necessary but also will not hamper performance of the server if running too long.
In regards to PHP setup, the following parameters should be set with values as indicated:
Maximum upload size Admin > System Settings 30000000 (~30 MB) The 'Maximum upload size' controls the maximum file size your users can upload into Sugar. This setting should not exceed the post_max_size and upload_max_filesize parameters in your PHP configuration.
.htaccess
The .htaccess file is a simple text file placed in the directory you want the contents of the file to affect. The rules and configuration directives in the .htaccess file will be enforced on whatever directory it is in and all sub-directories as well. In order to password protect content, there are a few directives we must become familiar with. One of these directives in the .htaccess file ( the AuthUserFile directive ) tells the Apache web server where to look to find the username/password pairs.
.htpasswd
The .htpasswd file is the second part of the affair. The .htpasswd file is also a simple text file. Instead of directives, the .htpasswd file contains username/password pairs. The password will be stored in encrypted form and the username will be in plaintext.
There is a special program on a *nix machine that is designed to manipulate the .htpasswd file on your behalf. The name of this program is htpasswd.
The first way is to create a new .htpasswd file and add a username/password pair to the file. The second way is to add a username/password pair to an existing .htpasswd file.
To create a new .htpasswd file in /usr/uj/jurbanek/ with username john, the following command would be used.
# '-c' stands for 'create'. Only to be used when creating a new .htpasswd file.
# You will be prompted for the password you would like to use after entering the command below.
htpasswd -c /usr/uj/jurbanek/.htpasswd john
In this article we explain how you can utilize the apache authentication to restrict access to you website or parts of your website.
You have to create the files .htaccess and .htpasswd. These files are protected by the server software so you can not download or view them with your web browser.
japtone
Senior Member
Join Date
Nov 2010
Posts
49
Re: Transferring SugarCRM to a new server
If you're using Linux try to have the same version of PHP, Apache, and DB (MySQL for instance) in order to avoid compatibility issues. In your production server tar up the sugarcrm root directory, transfer it to the new server and untar wherever your new root directory will be.
Next take a db dump of your database, transfer it to the new server and do a restore. Make sure apache is configured on the new server to point to the root of sugarcrm and start it up.
Make sure to modify config.php to account for any change in paths and hostname.
that's what I've found to be the easiest way to 'clone' sugar.
mysqldump -h localhost -u [MySQL user, e.g. root] -p[database password] -c --add-drop-table --add-locks --all --quick --lock-tables [name of the database] > sqldump.sql
Copy Filesystem
Copy all your files to the new server. This can be done simply by locating the root directory on your old instance and copy and pasting it to the new server location.
Import Database
Import the mysql database into the new server. Here's how you would restore your custback.sql file to the Customers database.
mysql -u sadmin -p pass21 Customers < custback.sql
Here's the general format you would follow:
mysql -u [username] -p [password] [database_to_restore] < [backupfile]
Check Files and Permissions
Check Config.php
Open <sugarroot/config.php> and make sure that all settings still apply to the new server, such as: array ( 'db_host_name' => 'localhost', 'db_user_name' => 'root', 'db_password' => 'PASSWORD', 'db_name' => 'DATABASE_NAME', 'db_type' => 'mysql', ), 'site_url' =>, etc...
Check htaccess
Open <sugarroot/.htaccess> and ensure that the new server URLs are used correctly.
Check Permissions
Check that the permissions are correct on the new server. That is the entire custom and cache directories (and all the sub directories) in addition to the config.php file are owned and writable by the user that runs the application on the server.
its a very powerful query engine/data transformation tool.
what's fascinating is its ability to load web data from static html pages, tables on web pages, web services, etc. I had a need to search recent activity on Twitter and decided to test drive Data Explorer in Excel.