Results 1 to 4 of 4

Thread: My experience installing SugarCRM on Plesk

  1. #1
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default My experience installing SugarCRM on Plesk

    A lot of people have posted that there seems to be no final solution to installing SugarCRM on a Plesk managed server. That's just not true. It was a bit difficult for me to figure out how to do it, so I'm posting my findings on this forum for anyone trying to do the same.

    First of all, the major issue seems to be with the session.save_path PHP variable. Many people have posted that you can just set it in a .htaccess file. This doesn't seem to work on a Plesk server, as it doesn't seem to allow the changes at that level.

    Instead, I added the following code into the httpd.include file for the domainname.com Web site located at: /var/www/vhosts/domainname.com/conf/httpd.include

    Code:
    <Directory /var/www/vhosts/uidresource.com/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/uidresource.com/httpdocs:/tmp:/var/lib/php"
    php_admin_value "session.save_path" "/var/lib/php/session"
    php_admin_value safe_mode 0
    php_admin_value display_errors 0
    php_admin_value file_uploads 1
    php_admin_value allow_url_fopen 1
    php_admin_value output_buffering 1
    php_admin_value memory_limit 64M
    php_admin_value allow_call_time_pass_reference 1
    php_admin_value log_errors 0
    php_admin_value error_reporting 2039
    php_admin_value max_execution_time 1000
    php_admin_value register_globals 0
    php_admin_value register_long_arrays 1
    php_admin_value short_open_tag 1
    php_admin_value upload_max_filesize 24M
    </Directory>
    I also changed the owner of the session save_path directory to be apache.apache and chmod to 777. Then restarted the server ("service httpd restart").

    I noticed that the SugarCRM install process didn't seem to like the multiple session paths in the session.save_path variable. Maybe this is the issue that so many people have being running into. So, just use a single path with double quotes. I also placed double quotes around the session.save_path variable.

    php_admin_value "session.save_path" "/var/lib/php/session"


    Problems with this change:

    When updating the any of the Web site configuration. The settings will be deleted/overwritten.

    Note:

    Placing this code into an .htaccess file doesn't seem to work. It causes server failures. I'm not sure why. Maybe it's the PHP allow override settting.

    Good luck.
    SugarForge Projects:
    JJWDesign Google Maps
    JJWDesign Tools and Reports

    Follow my blog postings at JJW Design.

  2. #2
    Join Date
    Jul 2008
    Posts
    6

    Default Re: My experience installing SugarCRM on Plesk

    The problem is that the code is dependent upon the basedir variable. PLESK sets the basedir in the httpd.include to the virtual host direcory and /tmp. The easiest thing to do is to set the session.save_path in php.ini to /tmp so that PLESK's settings don't affect the outcome.

    Roger Wyatt
    Tynken Interactive

  3. #3
    ehab is offline Senior Member
    Join Date
    Apr 2009
    Posts
    39

    Default Re: My experience installing SugarCRM on Plesk

    Thanks for the info, does this solve the problem that with plesk any modifications you do to custom fields etc, mess up the owner and permission of files and makes sugar unstable?

    Oh by the way your module in your signature is amazing the report that shows what each user did, was just What I wanted. What I had dreamed about for sugar for a long time is a facebook wall type dashlet to show me what is happening in the company, this is close enough and good enough though for makeing sure people are doing their work.

  4. #4
    SteveDowe is offline Junior Member
    Join Date
    Jan 2011
    Posts
    3

    Smile Re: My experience installing SugarCRM on Plesk

    Thanks for this useful post.

    With a Plesk 9.5.x & Red Hat 5/ CentOS 5 install, I found that the modifications I had to make were:

    1) to create a sessions directory in /var/www/vhosts/<mydomain>

    # mkdir /var/www/vhosts/<mydomain>/sessions
    # chown apache /var/www/vhosts/<mydomain>/sessions
    # chmod 750 /var/www/vhosts/<mydomain>/sessions


    2) create a vhost.conf file for this domain, which allows you to remove open_basedir and writable session restrictions:

    # emacs /var/www/vhosts/<mydomain>/conf/vhost.conf

    Code:
    <Directory /var/www/vhosts/<mydomain>/httpdocs>
    <IfModule sapi_apache2.c>
                    php_admin_flag engine on
                    php_admin_flag safe_mode off
                    php_admin_value open_basedir "/var/www/vhosts/<mydomain>/sessions:/var/www/vhosts/<mydomain>/httpdocs:/tmp"
            </IfModule>
            <IfModule mod_php5.c>
                    php_admin_flag engine on
                    php_admin_flag safe_mode off
                    php_admin_value open_basedir "/var/www/vhosts/<mydomain>/sessions:/var/www/vhosts/<mydomain>/httpdocs:/tmp"	
            </IfModule>
    Options +FollowSymLinks
    </Directory>
    php_admin_value "session.save_path" "/var/www/vhosts/<mydomain>/sessions"
    3) For me, the best way to secure certain directories within the sugarcrm directory, was to specify apache as the user, thus:

    # chown apache cache custom data data/upload modules modules/*
    # chmod 750 cache custom data data/upload modules modules/*


    The install guide suggested opening permissions up to 766, but making the directories world-writable didn't seem like a bright idea to me. 766 didn't work for me anyway, but 777 did .... no way!

    These steps resolved most issues.

    4) Finally, the sugar installer seems to feel that 6MB uploads are a good minimum, so it's a quick trip to /etc/php.ini (I changed this from 2MB)

    Code:
    ; Maximum size of POST data that PHP will accept.
    post_max_size = 8M
    ...
    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 8M
    5) Just update the Plesk webserver manager and restart apache:

    # /usr/local/psa/admin/bin/websrvmng -av
    # service httpd restart


    .. and you should be good to go!

    Best regards,
    Steve

    Professional Web Development and Hosting
    One Cool Limited, Farnborough, UK

    Steve Dowe - The Blog!
    Last edited by SteveDowe; 2011-02-23 at 03:48 PM. Reason: Wanted to add a link to my blog ;-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unexpected session timeout
    By lvangool in forum Help
    Replies: 4
    Last Post: 2011-11-30, 07:33 PM
  2. Enable Logging
    By vidtechsteve in forum Help
    Replies: 12
    Last Post: 2009-11-09, 02:54 PM
  3. Replies: 5
    Last Post: 2007-11-13, 02:51 PM
  4. Merge Contacts show sql error
    By hheckner in forum General Discussion
    Replies: 5
    Last Post: 2006-10-04, 01:57 PM
  5. Installing SUGARCRM on Win XP Pro SP2
    By ross_petersen in forum Help
    Replies: 2
    Last Post: 2006-04-28, 09:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •